Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Draws a barcode into a PDF page.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Barcode | 3.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
symbology | The symbology to use. | "EANX" | |
Text | The text to encode in the barcode. | "12345" | |
x | The x coordinate. | 100 | |
y | The y coordinate. | 100 | |
width | The desired width of the barcode in points. Zero gives the auto size. | 0 | Optional |
height | The desired height of the barcode in points. Zero gives the auto size. | 0 | Optional |
Encoding | The text encoding for text parameter. Default is UTF-8. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
UTF8 | Optional |
Returns OK or error.
Create PDF with a barcode on it:
If [ MBS("DynaPDF.IsInitialized") ≠ 1 ]
Perform Script [ Specified: From list ; “<unknown>” ; Parameter: ]
End If
#
Set Variable [ $PDF ; Value: MBS("DynaPDF.New") ]
Set Variable [ $r ; Value: MBS( "DynaPDF.AppendPage"; $PDF ) ]
#
Set Variable [ $r ; Value: MBS( "Barcode.DrawBarcode"; $PDF; "QRCODE"; "Hello World"; 10; 20 ; 100; 100; "UTF8" ) ]
Set Field [ Examples::Barcode ; MBS( "DynaPDF.Save"; $PDF ) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.Release"; $PDF ) ]
This function checks for a license.
Created 18th August 2014, last changed 13th January 2021