Aloaha PDF Printing API
The Aloaha PDF Printing API is included in all Aloaha PDF Products. This API can be used to print any PDF Document without having the Reader Software installed. One of the great advantages of the Aloaha PDF Printing API is that it is able to print even PDF Documents which do not allow printing (APDFPR).
Please note that the API/Enterprise License is required for this API to work properly.
'Sample code for the Aloaha PDF Printing API
'Copyright 2006 by Wrocklage Intermedia GmbH
'Coded by Stefan Engelbert
dim api
dim printername
dim printfile
dim StartPage
dim EndPage
dim PageScaling
dim AutoRotate
dim SpoolerTitle
printfile = "c:\test.pdf"
StartPage = 1
EndPage = -1 'print all pages
PageScaling = 1 '0=none, 1=Fit, 2=Shrink
AutoRotate = True
SpoolerTitle = "Printed by Aloaha PDF SDK"
set api = createobject("aloahapdf.edit")
printername=api.get_default_printer
if printername="" then
printername=trim(cstr(split(api.get_printer_list_CSV,",")(0) ))
end if
'Please use function
SetupPrinter here to set the printer options.
'PrinterName=api.
SetupPrinter(PrinterName,clng(..)..)
call api.print_pdf(CStr(printfile), CStr(printername), CLng(StartPage), CLng(EndPage), CLng(PageScaling), CBool(AutoRotate), CStr(SpoolerTitle))
set api = nothing
printing_pdf_sample.vbs (0,76 KB)
pdfprinter.zip (124,71 KB)
Aloaha Software / Knowledge Base / PDF SDK / PDF Printing API