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

Question: How html to pdf works? #3

Closed
guilhermedecampo opened this issue Jul 27, 2014 · 4 comments
Closed

Question: How html to pdf works? #3

guilhermedecampo opened this issue Jul 27, 2014 · 4 comments

Comments

@guilhermedecampo
Copy link

Hi @marcbachmann,

I couldn't understand how you get the data from phantom and transform it in pdf binary. You create something like an image? Because the content is not selectable or links can't be clicked.

Can you explain if you have some time?

Thanks anyways =)

@marcbachmann
Copy link
Owner

I'm using phantomjs to render the DOM and phantomjs is using QT to convert it to a pdf. I'm only using a phantomjs script. So the pdf generation has nothing to do with this library. It completely depends on phantomjs. Therefore it's the phantomjs renderer (or QPrinter) that has a bug.
It converts everything into paths, so it's not selectable (and the filesize is huge ~500kb per page).
It works on linux.
So there's only a problem on mac.
ariya/phantomjs#10373
ariya/phantomjs#11723
https://bugreports.qt-project.org/browse/QTBUG-26054

@guilhermedecampo
Copy link
Author

Cool! Thanks for the time to explain =)

@marcbachmann
Copy link
Owner

You're welcome. Just ask if you have more questions.

@marcbachmann
Copy link
Owner

I've just seen that today phantomjs 2.0 using QT5 landed in master: ariya/phantomjs#12329
So it won't take that long until I can implement it in this module. I hope it will bring a few improvements in table positioning and dpi problems. Also the text problem would be solved with this.

abel-moreau pushed a commit to Placeloop/node-html-pdf that referenced this issue Jan 26, 2021
[FIX] Arbitrary file read using `secure arguments` for `PhantomJS`
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

2 participants