Closed jochenonline closed 7 years ago
I will create a example in the next weekend.
Did you try archive this using https://github.com/tojocky/node-printer?
If this doesn't work, I can implement the print method inside page for you.
As I understood pdfbox and node-printer both to pdf rendering into some printer compatible format. pdfbox does it by itself and node-printer uses imagemagic. I want to use pdfbox, so using node-printer seems to me to be the wrong way. Or did I get something wrong?
Yes, you are right. I will create the print method for you. :)
@jochenonline
I wrote some exemples to print a pdf using pdfbox library.
https://github.com/pedro-lucas/node-pdfbox/tree/master/examples/print
I tested these examples in Windows, Linux and OSx. I had trouble with headless in OSx, please, make a new test in OSx, maibe it's a miss configuration in my OSx.
Erro in OSx java.awt.print.PrinterException: No print service found. at sun.lwawt.macosx.CPrinterJob.print(CPrinterJob.java:239) at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1331) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
@jochenonline
Sorry for the delay in the answer.
Written sample code
How can printing be achieved like in these
examples
?