Discussion:
[gs-bugs] [Bug 698772] - Ghostscript - 2D drawing having arc edges are not sharp when converted to PDF.
b***@artifex.com
2017-11-22 05:51:16 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

Bug ID: 698772
Summary: 2D drawing having arc edges are not sharp when
converted to PDF.
Product: Ghostscript
Version: 9.22
Hardware: PC
OS: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: PDF Writer
Assignee: ***@artifex.com
Reporter: ***@gmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---

Created attachment 14480
--> http://bugs.ghostscript.com/attachment.cgi?id=14480&action=edit
.PS File

If we convert .ps file to .pdf then arcs are too coarse & we want them finer.
However, if we increase the DPI to 1200 then it looks finer but the expectation
is with 600 DPI, is should look finer.

I used some online .ps to .pdf converters which are giving the finer results as
compared to GhostScript version 9.22.

I am attaching all the relevant files for reference.

Regards,
Sumant.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 05:52:17 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #1 from D Sumant <***@gmail.com> ---
Created attachment 14481
--> http://bugs.ghostscript.com/attachment.cgi?id=14481&action=edit
PDF Converted using GhostScript
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 05:54:03 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #2 from D Sumant <***@gmail.com> ---
Created attachment 14482
--> http://bugs.ghostscript.com/attachment.cgi?id=14482&action=edit
PDF Converted using GhostScript
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 05:54:32 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #3 from D Sumant <***@gmail.com> ---
Created attachment 14483
--> http://bugs.ghostscript.com/attachment.cgi?id=14483&action=edit
PDF Converted using Online PS Converter
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 05:55:15 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #4 from D Sumant <***@gmail.com> ---
Created attachment 14484
--> http://bugs.ghostscript.com/attachment.cgi?id=14484&action=edit
PDF Converted using Online Converter
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 08:48:51 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

Ken Sharp <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Ken Sharp <***@artifex.com> ---
(In reply to D Sumant from comment #0)
Post by b***@artifex.com
If we convert .ps file to .pdf then arcs are too coarse & we want them
finer. However, if we increase the DPI to 1200 then it looks finer but the
expectation is with 600 DPI, is should look finer.
Your expectation is in error. The Ghostscript pdfwrite device does not render
the PostScript to a bitmap, where increasing the resolution would result in
smoother output.

Instead the original PostScript vector description is preserved as a PDF vector
description. Therefore the resolution has absolutely no effect whatever.

The result is also not 'coarser' in the way that would occur if rendering was
taking place. Instead the curves are flatter.

When drawing a curve the rendering engine must be approximate a curve by a
series of straight lines. In the limiting case you can consider every pixel on
the output to be a straight line.
Post by b***@artifex.com
I used some online .ps to .pdf converters which are giving the finer results
as compared to GhostScript version 9.22.
I am attaching all the relevant files for reference.
I can see no significant difference between the output. The PNG files have been
rendered at different resolutions, and the anti-aliasing makes it difficult to
see, but I believe the same flatness occurs on both PNG files. You appear to
have used two different viewers to produce the PNG files, one of them is
anti-aliased, the other is not. Nevertheless the same flattening can be seen in
both if you bother to look, most obviously in the capital D of AED.

When viewed at the same size in Adobe Acrobat the two PDF files appear
identical

This isn't entirely surprising, if you look at the properties of the PDF files
you will see that the 'online PS converter' is also using Ghostscript, albeit
an *ancient* version of Ghostscript (8.64, now 8 years old).

In addition, looking at the PostScript file I see that there are *NO* curves in
the original PostScript. The 'curves' in the figure have *already* been
flattened to straight lines. So its hardly surprising that two versions of
Ghostscript produce identical appearing PDF files.

I imagine the flattening was performed by either the application or more likely
by the Windows printing system, which has produced PostScript suitable for 600
dpi output.

Perhaps if you change the resolution being used by Windows, rather than
Ghostscript, you will get a smoother result......
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 09:27:39 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #6 from D Sumant <***@gmail.com> ---
Created attachment 14485
--> http://bugs.ghostscript.com/attachment.cgi?id=14485&action=edit
Yellow mark highlighted
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 09:29:50 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #7 from D Sumant <***@gmail.com> ---
I am talking about the curves which I have highlighted in yellow mark in
attached image and not about any letter.
If you see the curves, they are finer in earlier ghostscript versions as
compared newer version.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 09:36:23 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #8 from Ken Sharp <***@artifex.com> ---
(In reply to D Sumant from comment #7)
Post by b***@artifex.com
I am talking about the curves which I have highlighted in yellow mark in
attached image and not about any letter.
If you see the curves, they are finer in earlier ghostscript versions as
compared newer version.
No, they are not, you are mistaken.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-22 09:41:10 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698772

--- Comment #9 from Ken Sharp <***@artifex.com> ---
Created attachment 14486
--> http://bugs.ghostscript.com/attachment.cgi?id=14486&action=edit
Comparison of the two PDF files

The attached PNG shows the two supplied PDF files opened side by side in Adobe
Acrobat at the same zoom factor (2400%). This clearly shows that the 'curves'
in both files are in fact identical.

Not only that but, as I stated clearly in my previous comment, THERE ARE NO
CURVES IN THE POSTSCRIPT INPUT. Therefore there are no curves in the PDF and
there is no difference in the smoothness of the curves.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Loading...