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

[Issue] PDF Reverse Words #2206

Closed
vinkla opened this issue Mar 16, 2018 · 13 comments
Closed

[Issue] PDF Reverse Words #2206

vinkla opened this issue Mar 16, 2018 · 13 comments

Comments

@vinkla
Copy link

vinkla commented Mar 16, 2018

Tell us about your environment:

  • Puppeteer version: v1.1.1
  • Platform / OS version: macOS 10.13.3 (17D102)
  • Node.js version: v9.8.0

I'm using Bootstrap 4.0.0 to create printable PDF templates in the browser. I'm using Puppeteer to generate the PDFs. It is working and looking great when I in the browser but when I copy text from the generated PDF file and paste it into my text editor all words are reversed.

screen shot 2018-03-15 at 4 52 25 pm

I previously though this was an issue with Bootstrap. Though, after som testing with in other browsers I narrowed it down to Google Chrome. It works fine in both Firefox and Safari.

Is this something that has come up before? Is this the expected behaviour?

@aslushnikov
Copy link
Contributor

@vinkla no, I haven't seen this before. I'd recommend filing this upstream to the chromium repository: https://crbug.com/new

@vinkla
Copy link
Author

vinkla commented Apr 11, 2018

@aslushnikov thanks for getting back. I'll check it out.

@daguej
Copy link

daguej commented Apr 10, 2019

@vinkla Did you end up filing a Chrome issue? I can't find one.

Also, having the same problem -- did you end up finding a fix or workaround?

@vinkla
Copy link
Author

vinkla commented Apr 10, 2019

I didn't end up creating an issue. Didn't find a fix for it. It seems to still be an issue in the latest version of Puppeteer and Chrome.

@VitaliyR
Copy link

VitaliyR commented May 16, 2019

It's indeed an issue still, words are reversed and text selection box is below the actual text :(

Update:

It seems happens to me when using custom font.

@vinkla
Copy link
Author

vinkla commented May 16, 2019

It seems happens to me when using custom font.

Does with work with default system fonts?

@VitaliyR
Copy link

@vinkla Yes, and it also reproduces when printing to PDF via Chrome itself

@VitaliyR
Copy link

Ok, so it was an issue with my font. It looks fine when in the web, but, suddenly, somehow breaks when it's embed in the PDF. Should I provide it so it might help to fix the bug?

@justjake
Copy link

justjake commented Jul 1, 2019

@VitaliyR I'm having the same issue and am interested in a test-case we can submit upstream to Chromium.

@VitaliyR
Copy link

VitaliyR commented Jul 2, 2019

@justjake I can search & provide these fonts here, which breaks pdf render, if you want.

@hichamnaimi
Copy link

I still have reversed words in generated PDF too

@d3skdev
Copy link

d3skdev commented Sep 24, 2020

Same issue while using fonts with woff format.
using ttf font type, fixed the issue.

@cyounkins
Copy link

I encountered this while backing up a Wordpress site.

My workaround was this: await page.addStyleTag({content: '* { font-family: sans-serif !important }'})

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

8 participants