Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Washed/Antialiasing problems on PDF output #10372

Closed
ariya opened this issue Feb 3, 2012 · 6 comments
Closed

Washed/Antialiasing problems on PDF output #10372

ariya opened this issue Feb 3, 2012 · 6 comments
Labels

Comments

@ariya
Copy link
Owner

ariya commented Feb 3, 2012

emilta...@gmail.com commented:

Which version of PhantomJS are you using? Tip: run 'phantomjs --version'.

1.4.1

What steps will reproduce the problem?

  1. Convert a webpage with embedded SVG to PDF using rasterize.js and "A4" as print size (anything else yields the same results)
  2. Open the resulting PDF

What is the expected output? What do you see instead?

  • The strokes on the path shapes are washed out (antialiased/blurred), see screenshot

Which operating system are you using?

  • OSX, Windows

Did you use binary PhantomJS or did you compile it from source?

  • Binary

Please provide any additional information below.

Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #372.
🌟   3 people had starred this issue at the time of migration.

@aportale
Copy link
Contributor

aportale commented Feb 3, 2012

alessandro.portale@gmail.com commented:

Could you attach the PDF?

@ariya
Copy link
Owner Author

ariya commented Feb 3, 2012

emilta...@gmail.com commented:

Yup, here we go...

@aportale
Copy link
Contributor

aportale commented Feb 5, 2012

alessandro.portale@gmail.com commented:

Thanks. The PDF seems to contain the vector graphics from the original SVG. When printing it out with 300+ dpi should give crisp and clear borders.

But here I agree with you: Viewing the PDF on a screen at low resolution causes the PDF viewer to use anti aliasing (for several obvious reasons).

Question: Does your original SVG only have elements with integer pixel coordinates in a way that if viewed in a browser at 100% zoom, all borders are crisp? And do you want the PDF to accurately carriying over these coordinates? Is the PDF supposed to be viewed on-screen?

Just for reference, I attached a small SVG sample that has some crisp and some blurry borders (when viewed in a browser with 100% zoom).

@ariya
Copy link
Owner Author

ariya commented Feb 6, 2012

emilta...@gmail.com commented:

Take a look at the attached HTML containing the embedded SVG. This is the origianal of the exported PDF.

Yes, the PDF is intended to be perfectly visible on screen as well but I'm not sure how to do that, hence this logged issue. I think all of the objects have integer coordinates but I might be wrong. Look at the for example...they're all x=0 y=0 and yet still blurry when exported.

Any ideas appreciated!

@TheunisKotze
Copy link

Has this been fixed? I am using phantomjs to convert svgs to pngs, and at low resolution the images are often blurry and whitewashed.. sounds similar to this issue with pdfs.

@ghost ghost removed old.Priority-Medium labels Dec 19, 2017
@stale stale bot added the stale label Dec 26, 2019
@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants