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

Rendering PDF which include PNG with transparent background (SVG renderer) #11811

Closed
bobsingor opened this issue Apr 15, 2020 · 4 comments
Closed

Comments

@bobsingor
Copy link

First off all, Great job on the SVG renderer. Can't wait to use it in production. We are testing the PDF's in our system and in the latest version most PDF are rendered correctly as SVG. There are a couple of bugs that I want to address and post as issues here.

Attach (recommended) or Link to PDF file here:
I attached the svg as txt because of the github upload restrictions.
[page.txt] (https://github.com/mozilla/pdf.js/files/4481179/page.txt)
[ton_page8.pdf] (https://github.com/mozilla/pdf.js/files/4481193/ton_page8.pdf)

Configuration:

  • Web browser and its version: Latest Chrome (80.0.3987.149)
  • PDF.js version: pdfjs-dist (2.4.456)

Steps to reproduce the problem:
Use the PDF above in the SVG renderer and you will see that the top image are being rendered with a black background. In the original it has transparent background.

@Snuffleupagus
Copy link
Collaborator

Can't wait to use it in production.

That's probably not likely to happen any time soon (or even at all), considering that the SVG back-end is inherently slower (given the huge amount of DOM elements it creates) and also that it requires more memory than the default canvas back-end; please note https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#backends

@timvandermeij
Copy link
Contributor

Yes, for now the SVG back-end is an experimental alternative, but not ready for production use yet. Nevertheless, thank you for reporting issues since it will help to improve it!

@amelie2923
Copy link

amelie2923 commented Jul 1, 2020

Same problem here, images or texts with transparent background are displayed with a black background.
Is there a solution planned for that?

Capture d’écran 2020-07-01 à 16 36 28

@davistran86
Copy link

I'm also looking for a solution for this

@mozilla mozilla deleted a comment from dewinovitasari Sep 28, 2020
@Snuffleupagus Snuffleupagus closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2022
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

5 participants