Open pushpak opened 9 years ago
Yeah... This is an issue. I didn't find a common approach on windows yet.
You should look into Postscript format because probably all printers understand postscript. Right now you can convert to postscript using pdf2ps (comes with Ghostscript).
I tried converting pdf file to postscript and then print it with node-printer as "RAW" format on Windows and it worked nicely.
@Janhouse can you publish an example on how you did this? thanks
I didn't stick to it but I converted from pdf to ps (using pdftops that comes with Poppler) and then printed it with printer.printDirect with type set to RAW. It didn't print quickly (ps file is a lot bigger than pdf) but it worked.
Actually, I tried using pdfium and it did not work that well (generated EMF didn't look good (in windows viewer) and wasn't being printed).
So I ended up using exec to execute Poppler's pdftops and it generated postscript file that worked on Windows 7 in RAW mode and was printed pretty quickly.
@tojocky, maybe you could look into integrating poppler in your node module. Using exec works but it would be much cooler if it would using those libs directly. :)
the
getSupportedOutputFormats
does not returnEMF
format in the list. I tried for samsung laser jet printer, hp inkjet printer and epson thermal printer. Nothing returnsEMF
in the list.All of them return
RAW
,TEXT
,NT EMF 1.006
,NT EMF 1.007
,NT EMF 1.008
and none of them works.