Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMF format not supported for all printers #5

Open
pushpak opened this issue May 24, 2015 · 5 comments
Open

EMF format not supported for all printers #5

pushpak opened this issue May 24, 2015 · 5 comments

Comments

@pushpak
Copy link
Contributor

pushpak commented May 24, 2015

the getSupportedOutputFormats does not return EMF format in the list. I tried for samsung laser jet printer, hp inkjet printer and epson thermal printer. Nothing returns EMF 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.

@tojocky
Copy link
Owner

tojocky commented May 26, 2015

Yeah... This is an issue. I didn't find a common approach on windows yet.

@Janhouse
Copy link

Janhouse commented Aug 8, 2015

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.

@RobinMalfait
Copy link

@Janhouse can you publish an example on how you did this? thanks

@Janhouse
Copy link

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.

@Janhouse
Copy link

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants