-
ZPL2: Textfeld mit variabler Breite
Hallo Experten!
Nachdem jetzt mein Zebra läuft und ich die ersten Etiketten gedruckt habe, hänge ich nun an den Feinheiten und hoffe hier wieder auf Hilfe!
Ich erstelle die Lables on-the-fly in meiner Webanwendung (ASP). Dazu habe ich mir ein Layout im ZebraDesigner gebastelt, dieses als PRN abgespeichert und verwende dies als Grundlage.
Das sieht dann ungefähr so aus:
Code:
^XA~TA000~JSN^LT0^MMT^MNW^MTT^PON^PMN^LH0,0^JMA^PR6,6^MD10^JUS^LRN^CI0^XZ
^XA^LL0203
^PW406
^BY1,3,34^FT120,178^BCN,,Y,N
^FD##Barcodefeld##^FS
^FT22,30^A0N,28,28^FH\^FD##Firmenname##^FS
^FT22,70^A0N,28,28^FH\^FD##Stadt##^FS
^FT298,70^A0N,28,33^FH\^FD##Abteitlung##^FS
^FT22,122^A0N,28,24^FH\^FD##bli bla bub##^FS
^PQ1,0,1,Y^XZ
Die Felder mit ##TEXT## ersetze ich in der Webanwendung mit dem richtigen Text.
Das funktioniert auch, mein Problem ist nur, dass die Felder alle absolut positioniert sind und eine feste Größe haben, der Text, den ich einfüge, aber unterschiedlich lang sein kann.
Gibt es ein Textfeld, dessen Breite ich festlegen kann und in dem der Text, auch wenn er nicht die ganze Breite des Feldes benötigt, z.B. links ausgerichtet ist ohne das der Text auf die ganze Länge des Feldes gestreckt wird? (hab ich das verständlich rübergebracht??? )
Das Barcodefeld würde ich z.B. gerne auf die gesamte Breite des Etiketts ziehen, und der eigentliche Barcode wird zentriert in diesem Feld dargestellt... geht das???
Gruß, Alex
-
Dazu musst du dir mal das ZPL-Handbuch nehmen um die einzelnen Codes zu verstehen.
Es gibt keine festen Textfelder, der Inhalt zwischen ^FD und ^FS wird gedruckt.
Barcodes können nicht zentriert werden, wohl sog. Textblöcke:
^FB
Field Block
Description
The ^FB command allows you to print text into a defined block type format.
This command formats an
^FD or ^SN string into a block of text using the origin, font, and
rotation specified for the text string. The
^FB command also contains an automatic word-wrap
function.
Format
^FBa,b,c,d,e
This table identifies the parameters for this format:
Parameters Details
a
= width of text
block line (in
dots)
Accepted Values:
0 to the width of the label
Default Value:
0
If the value is less than font width or not specified, text does
not print.
b
= maximum
number of lines
in text block
Accepted Values:
1
Text exceeding the maximum number of lines overwrites the
last line. Changing the font size automatically increases or
decreases the size of the block.
c
= add or delete
space between
lines (in dots)
Accepted Values:
-9999 to 9999
Default Value:
0
Numbers are considered to be positive unless preceded by a
minus sign. Positive values add space; negative values delete
space.
d
= text justification Accepted Values:
L =
J is used the last line is left-justified.
e
= hanging indent
(in dots) of the
second and
remaining lines
Accepted Values:
^FB Command
This scheme can be used to facilitate special functions:
\& =
carriage return/line feed
\(*) =
soft hyphen (word break with a dash)
\\ =
^CI13 must be selected to print a backslash (\).
Item 2:
If a soft hyphen escape sequence is placed near the end of a line, the hyphen is printed.
If it is not placed near the end of the line, it is ignored.
(*) = any alphanumeric character
• If a word is too long to print on one line by itself (and no soft hyphen is specified), a
hyphen is automatically placed in the word at the right edge of the block. The remainder
of the word is on the next line. The position of the hyphen depends on word length, not a
syllable boundary. Use a soft hyphen within a word to control where the hyphenation
occurs.
• Maximum data-string length is 3K, including control characters, carriage returns, and line
feeds.
• Normal carriage returns, line feeds, and
word spaces at line breaks are discarded.
• When using
^FT (Field Typeset), ^FT uses the baseline origin of the last possible line of
text. Increasing the font size causes the text block to increase in size from bottom to top.
This could cause a label to print past its top margin.
• When using
^FO (Field Origin), increasing the font size causes the text block to increase
in size from top to bottom.
•
^FS terminates an ^FB command. Each block requires its own ^FB command.
Example •
These are examples of how the ^FB command affects field data.
-
-
es reicht übrigens wenn du nur
^XA
...Nutzdaten
^PQ1
^XZ
an den Drucker schickst.
Das Einmessen der Etikettenlänge und so Zeugs macht der selber.
Der braucht nur Infos was er drucken soll.
Die ganzen Parameter, die dir der Zebradesigner in den Header schreibt brauchste nicht.
Der ^LH0,0 Prameter ist noch ganz nett, um auf die schnelle einen Rand zu definieren.
Gruß
Martin
Similar Threads
-
By harkne in forum NEWSboard Programmierung
Antworten: 2
Letzter Beitrag: 19-12-05, 17:46
-
By Peet in forum IBM i Hauptforum
Antworten: 3
Letzter Beitrag: 17-11-05, 19:59
-
By Wanderer_HB in forum IBM i Hauptforum
Antworten: 8
Letzter Beitrag: 28-06-05, 12:36
-
By holly in forum NEWSboard Programmierung
Antworten: 6
Letzter Beitrag: 07-12-04, 13:23
-
By JoergHamacher in forum NEWSboard Programmierung
Antworten: 5
Letzter Beitrag: 24-08-04, 12:21
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks