Hi to all
I use the jpdfjet library to create documents (layout with text, shapes, lines, images, etc.).
How can I directly print the pdf created on the default printer without opening any printer selection window etc.?
Thanks
I do this each hour, every day, 365 days per year...
Next Reports generates a (shift) report (pdf) and puts it in a directory.
When completed the generation, I ask it to print a hard copy for the user.
If it did print, then I delete the report to clean up the directory...
Uses ABPDFBox supplied by ABMaterial
B4X:
Dim PDF As ABPDFBox' ABM component - supplied to contributorsIfFile.Exists(pdfFolder,fn&".pdf") Then' fprinter is derived from an ini... It defines the printer to direct output to - could be a network printer - as in my caseIf fprinter <> ""Then
PDF.Print ( pdfFolder, fn&".pdf", fprinter, 1, True)
Sleep(1000)
' call DeletePdf(fn) to remove the file (clean up)Else' Log(" _____----______ No Printer defined - stored for viewing later...") EndIfElseLog(" File PDF not found: "&fn&".pdf")
EndIf
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.