|
HPDFBarcode Unit Reference
Το HotPDF είναι κατάλληλο για δημιουργία reports, τεχνική τεκμηρίωση, imaging workflows και άλλες εφαρμογές που χρειάζονται άμεσο προγραμματιστικό έλεγχο πάνω στην έξοδο PDF
Χρησιμοποιήστε THPDFPage.DrawBarcode για απευθείας έξοδο σε σελίδα PDF, THPDFBarcode όταν αποδίδετε σε VCL TCanvas και τις Simple* functions όταν μια εφαρμογή χρειάζεται τη δημιουργημένη bar sequence πριν από το σχέδιο
THPDFBarcode
Το THPDFBarcode είναι απόγονος TComponent που αποδίδει ένα ρυθμισμένο barcode σε VCL canvas και μπορεί προαιρετικά να σχεδιάσει την αναγνώσιμη από άνθρωπο ετικέτα κειμένου
| Member |
Usage |
Assign | Copies barcode configuration from another persistent object |
DrawBarcode | Draws the bars for the configured barcode on the supplied TCanvas |
DrawText | Draws the optional text label on the supplied TCanvas |
CanvasHeight | Returns the rotated drawing height needed for the configured Width, Height, and Angle |
CanvasWidth | Returns the rotated drawing width needed for the configured Width, Height, and Angle |
Published Properties
Το στοιχείο δημοσιεύει ρυθμίσεις διάταξης, τύπου barcode, checksum, χρώματος, ετικέτας κειμένου και ειδοποίησης αλλαγών
| Property |
Usage |
Height, Width | Set the barcode drawing height and read or assign the calculated barcode width |
Text | Supplies the barcode payload as an AnsiString |
Κορυφή, Left | Set the canvas origin for the barcode output |
Modul | Sets the base module width used when bars are painted |
Ratio | Sets the wide-to-narrow bar ratio used by supported symbologies |
Typ | Selects the barcode type by the ordinal value of THPDFBarcodeType |
Checksum, CheckSumMethod | Enable checksum output and choose csmNone or csmModulo10 |
Angle | Rotates the rendered barcode |
ShowText, ShowTextFont, ShowTextPosition | Control whether the readable text is drawn, which font is used, and where the label is placed |
Color, ColorBar | Set the background colour and bar colour |
OnChange | Receives a TNotifyEvent when a property setter changes barcode state |
Barcode Types and Options
| Type |
Values |
THPDFBarcodeType | bcCode_2_5_interleaved, bcCode_2_5_industrial, bcCode_2_5_matrix, bcCode39, bcCode39Extended, bcCode128A, bcCode128B, bcCode128C, bcCode93, bcCode93Extended, bcCodeMSI, bcCodePostNet, bcCodeCodabar, bcCodeEAN8, bcCodeEAN13, bcCodeUPC_A, bcCodeUPC_E0, bcCodeUPC_E1, bcCodeUPC_Supp2, bcCodeUPC_Supp5, bcCodeEAN128A, bcCodeEAN128B, bcCodeEAN128C |
THPDFBarcodeOption | bcoNone, bcoCode, bcoTyp, bcoBoth |
THPDFShowTextPosition | stpTopLeft, stpTopRight, stpTopCenter, stpBottomLeft, stpBottomRight, stpBottomCenter |
THPDFCheckSumMethod | csmNone, csmModulo10 |
THPDFBarLineType | white, black, black_half |
Simple Bar Records
Οι απλές συναρτήσεις κωδικοποίησης επιστρέφουν τις παραγόμενες μπάρες μέσω του TSimpleBarArray, ενός πίνακα εγγραφών TSimpleBarcodeBar
| Record |
Fields |
TSimpleBarcodeBar | Width contains the module width contribution, and Filled identifies whether the segment is a printed bar |
TSimpleBarArray | Dynamic array of TSimpleBarcodeBar values filled by the Simple* functions |
Simple Encoder Functions
Each function has the signature function Name(const Text: AnsiString; var Bars: TSimpleBarArray): Integer and returns the total generated bar width
| Group |
Functions |
| Code 2/5 | SimpleCode25Interleaved, SimpleCode25Industrial, SimpleCode25Matrix |
| Code 39 and Code 93 | SimpleCode39, SimpleCode39Extended, SimpleCode93, SimpleCode93Extended |
| Code 128 and EAN-128 | SimpleCode128A, SimpleCode128B, SimpleCode128C, SimpleEAN128A, SimpleEAN128B, SimpleEAN128C |
| Retail and postal | SimpleEAN8, SimpleEAN13, SimpleUPC_A, SimpleUPC_E0, SimpleUPC_E1, SimpleUPC_Supp2, SimpleUPC_Supp5, SimplePostNet |
| Other supported symbologies | SimpleMSI, SimpleCodebar |
Example
var
Bars: TSimpleBarArray;
TotalWidth: Integer;
begin
TotalWidth := SimpleCode128B('ABC-123', Bars);
end;
See also
|