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

Text clipping not working #9234

Closed
luis4a0 opened this issue Dec 4, 2017 · 3 comments
Closed

Text clipping not working #9234

luis4a0 opened this issue Dec 4, 2017 · 3 comments

Comments

@luis4a0
Copy link

luis4a0 commented Dec 4, 2017

Attach (recommended) or Link to PDF file here:
shading.pdf

Configuration:

  • Web browser and its version: Firefox 57.0
  • Operating system and its version: Linux 64-bit
  • PDF.js version: the one bundled with Firefox.
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Open the attached PDF with the online viewer https://mozilla.github.io/pdf.js/web/viewer.html

What is the expected behavior? (add screenshot)
image
The text should clip the shading on the background, since it was declared as a clipping path (i.e., issued the command Tr 7).
Neither PDF.js nor Poppler render this PDF correctly. However, Adobe Reader CS6 and Pdfium render it correctly. (The screenshot was produced with Chromium.)

What went wrong? (add screenshot)
image
Clipping is completely ignored.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Dec 4, 2017

PDF aba6d900fad7202604e29724379a9de4 [1.4 SciSoft PDF exporter / -] (PDF.js: 2.0.183)  viewer.js:1607:7
Warning: fontRes not available   pdf.worker.js:340:5
Warning: Error during font loading: Font F7 is not available   pdf.js:340:5
Warning: fontRes not available   pdf.worker.js:340:5

While there is a font named F7 present in the PDF file (ref: 7 0 obj), that one isn't actually referenced from the Resources dictionary of the Page (ref: 14 0 obj)

@luis4a0
Copy link
Author

luis4a0 commented Dec 4, 2017

Just noting that. Indeed, adding the font to the page resources does not fix the issue. It says Error: Requesting object that isn't resolved yet Helvetica_path_S. See the atatched PDF.

shading2.pdf

Should I add the font resource somewhere else?

@Snuffleupagus
Copy link
Collaborator

It says Error: Requesting object that isn't resolved yet Helvetica_path_S.

That would make this a duplicate of issue #4244, hence I'm closing this one.

Should I add the font resource somewhere else?

If the font file is embedded in the PDF file, then it ought to work.

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

2 participants