PDF Barcode

Um Barcodes in bestehende PDF-Dokumente einzufügen, ist mit der Aloaha PDF SDK nur eine API nötig.

Folgende Barcode-Arten werden unterstützt:

- Code39 (or Code 3 of 9)
- EAN-13
- Code128
- PostNet
- Interleaved 2 of 5

Nachfolgend finden Sie einige Beispielskripte:


PDF Barcode API

Dim pdf
Dim infile
Dim outfile 
Dim Barcode

'PDF coordinates in points
dim d_Left
dim d_Top
dim d_Width
dim d_Height

'Barcode Type
Dim b_type
'Code39= 1
'EAN-13 = 2
'Code128 = 3
'PostNet = 4
'Interleaved 2 of 5 = 5
b_type = 1

'Barcode Options
'B_options
if b_type=1 or b_type=3 or b_type=5 then
    B_options=0
else
    'value betwee 0-3
    B_options=0
end if

'Barcode Direction
Dim B_Direction
'possible values are 0, 1, 2, 3
B_Direction = 0

Dim P_Page  'PDF Page to be used
P_Page = 1

'Background Image
Dim B_Image
This variable holds the path to an image to be used as background. Empty value will make Bardcode transparent.
B_Image = "c:\whitepixel.bmp"

Barcode="47110815"
infile = "c:\input.pdf"
outfile = "c:\output.pdf"

Set pdf = CreateObject("aloahapdf.edit") 

d_Left = 0
d_Top  = 400
d_Width = 400
d_Height = 100

If pdf.load_pdf_to_mem(CStr(infile)) = true Then 

   If pdf.place_barcode(CDbl(d_Left), CDbl(d_Top), CDbl(d_Width), CDbl(d_Height), CStr(Barcode), CLng(b_type
), CLng(B_options), CLng(B_Direction), CLng(P_Page), CStr(B_Image)) = true Then
    Call pdf.save_pdf_to_file(CStr(outfile))
   End If 

End If

Set pdf = nothing

Download von Barcode Beispielen

 bar.txt (1,23 KB)

 bar.vbs (1,23 KB)
Aloaha Secure StickAloaha Smart LoginAloaha Smartcard ConnectorAloaha PDF SuiteE-Mail-TextePDF ScriptingAloaha PDF Saver/SignatorAloaha Multisignator FAQAloaha PDF SDKPDF Signatur APIAutomatische SeitennummerierungPDF AnhängePDF2ImageImage 2 PDFPDF Formular APIPDF Formular OCXVerbinden von XML und PDFXML Daten exportierenSenden Button einfügenSicherer PDF ViewerPDF OptimiererPDF Crypter APIC# Crypto Beispiel40/128 Bit PDF Verschlüsselungs APIBriefköpfe anfügenPDF BriefpapierPDF WasserzeichenPDF Druck APIPDF LesezeichenPDF BarcodeNormalisierung von PDF SeitenZertifikateingenschaftenAloaha Time StampingNativ unterstützte SmartCards Sichere PIN EingabeSichere PIN Speicherung