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 SDK Light/Enterprise Light License is required for this API to work. You can request an evaluation key from info@aloaha.com

‘Sample code for the Aloaha PDF Printing API
‘Copyright 2015 by Aloaha Limited
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

Please have also a look at our Autoprint Folder