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

messageToPdf - pdf generated file #9

Open
TheBonaGitHub opened this issue Apr 8, 2019 · 2 comments
Open

messageToPdf - pdf generated file #9

TheBonaGitHub opened this issue Apr 8, 2019 · 2 comments

Comments

@TheBonaGitHub
Copy link

Dear, thanks for your code !

Unfortunately I have a problem.
The pdf generated file is blank.
Every time is generated a 1.6KB pdf file .

Do you have an help, please ?
Thanks you very much.

Best regards
Andrea

@webstermath
Copy link

I am having the same issue. I was very excited when I found this library since I have similar functionality in production code but am not able to save pictures. As there seems to be issues with using this library with V8, I reverted my app back to the old engine. Now it generates a pdf file from the gmail message but the pdf is completely blank except for a email header at the top. Any suggestions for what I might be doing wrong?

@emmanueljarri
Copy link

emmanueljarri commented Dec 10, 2020

I am having the same issue. I was very excited when I found this library since I have similar functionality in production code but am not able to save pictures. As there seems to be issues with using this library with V8, I reverted my app back to the old engine. Now it generates a pdf file from the gmail message but the pdf is completely blank except for a email header at the top. Any suggestions for what I might be doing wrong?

I had this issue as well (Just the email header was present, the rest of the pdf was blank). For me I solved it by changing the regex in function processStyleTags(html) :
return html.replace(/(<style[^>]*>)(.*?)(<\/style>)/gi, function(m, tag, style, end) {
instead of
return html.replace(/(<style[^>]*>)(.*?)(?:<\/style>)/gi, function(m, tag, style, end) {

I created an issue for it, here : #18

Hope it helps solve your issue

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

3 participants