0

Background: When rasterizing vector graphic images (such as PDFs), there are two common options for rendering thin lines: (1) treat them like any other elements, so they might become invisible at low resolution; (2) use a minimum thickness of thin lines (such as 1 pixel), so that they are visible at any resolution. For example, Acrobat Reader uses method (1) if the "enhance thin lines" option is off, and method (2) if "enhance thin lines" is on. For art, method (1) us usually best. For technical drawings, method (2) is usually best. Method (2) is more common, with many programs using it by default and not providing an option to use method (1).

For my work, I need option (1).

Question: What are options for rendering PDFs using method (1) (i.e. thin lines are NOT enhanced)? I'm especially interested in command line tools.

Sub-questions: Is there any way of making ghostscript use method (1)? (I've pored over the ghostscript documentation with no luck.) Is there a way to coerce Apple Preview into using method (1)?

Remark: I'm aware of the following work-around: First render the PDF to a high-resolution raster file, then scale down to a lower resolution raster file. I'm interested in a less clunky solution.

  • You do understand that the standard anti aliasing ie method (1) is most likely just super sampling which is exactly the same as your remark. If it is not then you can get conflation artefacts (but most likely it results in what you call enhanced rendering, which is not really enhanced at all). So in fact the desired method is supersampling. It does not have to be done with intermediate files though. – joojaa Aug 18 at 17:25
  • @joojaa -- Yes, I understand that. So for producing a rasterized file the method of my remark is close to what I want. For displaying a PDF on screen, the only option I know of is to use Acrobat Reader with "enhance thin lines" turned off. I would, for various reasons, prefer not to use Acrobat Reader, so I'm looking for alternatives. – Kevin Walker Aug 18 at 18:22
  • well there is Imagemagic – joojaa Aug 18 at 18:37
  • @joojaa -- I believe that ImageMagick uses ghostscript for PDF rendering. In any case, I've tried ImageMagick and it thickens thin lines ("option (2)" above). – Kevin Walker Aug 20 at 14:08
  • Not if you tell it to supersample. If you just tell it to convert with default options then yes. – joojaa Aug 20 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.