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

[GmailUtils.gs] Line Of Text Bisected Horizontally In Generated PDF #2

Open
PaulWGraham opened this issue Feb 17, 2015 · 2 comments
Open

Comments

@PaulWGraham
Copy link

Sometime when creating PDFs using messageToPdf(messages,{embedAvatar:false}) the PDF generated contains lines of text that are bisected horizontally (see attached screenshot) and split between two pages in the PDF.

Note:

Removing the body{padding:0 10px;min-width:' + opts.width + 'px;-webkit-print-color-adjust: exact;} CSS declarations seems to prevent this issue (but obviously at a cost).

screen shot 2015-02-17 at 5 46 23 pm

@mikegreiling
Copy link
Member

I'm not sure the line you removed would have anything to do with the bisection you are talking about, though altering the default width and padding may solve the problem by accident.

You may be able to solve the problem through careful injection of

element {
  page-break-inside: avoid;
}

...but I'd need to play around these values to find the best practice. Simply applying this style to * may break some designs.

@aziz-boudi4
Copy link
Contributor

I have the same issue, some of my generated PDFs get bisected horizontally.

screen shot 2016-03-31 at 4 02 38 pm

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

No branches or pull requests

3 participants