-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
PDF not printable #69
Comments
This sounds like an issue with the PDF viewer and your printer setup. If the PDF displays fine on screen but doesn't print properly, I think the PDF is probably OK but whatever software you're using to print the PDF probably has a bug. |
well, i used OSX's Preview and Chrome. Both with the same result. |
So it happens with all PDFs generated by PDFKit? And other PDFs print OK? Did you try a different printer? Just trying to get to the bottom of this. |
yes. it happend with different PDFs that i created with PDFKit as well as with the example PDF i got from http://pdfkit.org/example.pdf. I tried an HP Color Laserjet 5550dn which freezes when i try, so i have to turn it off and on again. Tested on OS X 10.7.3 and 10.6.7 Edit: |
Update: Just found out that the error only occurs when I change the font. |
Interesting. Thanks for looking into this more. |
Sorry, wrong information: There are fonts that are working. Just tested a lot of fonts and found one that's okay. Can't say what the difference is, yet. |
and: you're welcome. as i said, this is an awesome library. thanks for sharing. i'm glad if i can help. |
I'm having a similar problem. When I send the .pdf to a PostScript printer it fails and the error that gets printed is ERROR: invalidfont OTOH, I can send it to a non-postcript printer and it prints fine, and I can open it in preview at it looks all right. The difference is who renders the .pdf, when done by the (postscript) printer it fails, when done by the Mac it works. HTH. |
Hmm, not sure. Must be something specific to the printer because I can't reproduce it. Can both of you send examples of PDFs generated by PDFKit that produce this error? If you can send source code as well that would be best. Thanks! |
Sorry, i overread your last comment. You can find the files here: http://dl.dropbox.com/u/480539/Issue69.zip |
I'm getting this problem when I use an embedded TTF. If I register the font but then only use Times-Roman it prints fine. |
Here is the test script that is producing a problem:
The standard.pdf prints fine, the embeded.pdf crashes the printer and it needs to be unplugged from the mains and plugged back in to print anything else. |
Finally managed to get an error out of the printer, but with OpenSans-Regular.ttf instead of OpenSans-Light.ttf:
|
The official printer driver is a PS driver. |
I'ver been trying out lots of fonts from fontsquirrel and other places and a lot of them crash the printer. Some of them work with "Hello world" but then crash when I use them in a document, so I assume one of the font glyphs contains something that the printers don't like. If I create a document with the problem fonts with open office and the print from there it prints fine on the same printer. |
I've compiled and installed fontforge from http://fontforge.org and:
|
Hi HughePaul I did what you suggested with fontforge and it worked as you found so that is good and thanks for the suggestion. Unfortunately it had the side effect that it seems to mess up the doc.widthOfString function so now I have problems with underlining and justification. I was wondering - did you run in to the same problem and if so how did you get around it ? Thanks Chris |
I had all the problems described here, too. Some fonts worked, some didn't and killed the printer. I found that converting a non-working font to .otf and then back to .ttf with http://www.freefontconverter.com turned this font into a working font with a bit larger file size. Simply "converting" it .ttf in one step resulted in bigger file size as well but didn't remove the error. |
There hasn't been any activity on this for a while, so I'm closing it. If anyone still has issues with this, let me know! |
I had that issue a while now and didn't really knew where it came from (especially because it just causes some laser printers from HP to fail here), but the tip from @HughePaul helped for now ^^ |
The font engine has changed significantly in v0.8.0. Please try again with that version and report back how it goes. |
Using a http://www.freefontconverter.com/ since there was a problem rendering on OSX plattform. More info: foliojs/pdfkit#69 (comment)
First of all: Great Library. Thank you for that.
It was really easy to generate some decent PDFs.
Unfortunately some strange errors are happening when i try to print them.
One Printer in my office freezes as soon as i try to print a generated pdf,
another one acts like he is printing but does not produce anything. (Not even put a paper through)
Both Printers are working fine when i print anything else.
The problem occurs when i open an pdf I generated with doc.write()
same as when i use doc.output() to write the code straight to to an http response.
I tried to compare the data of another pdf which is printing with no problems, but couldn't find anything suspicious.
Anyone with same experiences or even a solution?
Thanks!
The text was updated successfully, but these errors were encountered: