[
https://issues.apache.org/jira/browse/PDFBOX-4709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17001740#comment-17001740
]
Tilman Hausherr edited comment on PDFBOX-4709 at 12/21/19 4:50 PM:
-------------------------------------------------------------------
I am always reluctant to install new software, so I tried something else first:
I printed into a PDF. The one with the graphics strategy looked nice, the other
didn't. The one with the graphics strategy has fonts in the PDF itself. So I
suspect that the printer will render the fonts itself. The one from PDFBox
looks terrible (see [^PrintedWithPDFBox.pdf]) and has vector graphics. And one
thing is really suspicious: the coordinates never have more than two digits
after the "." (look at the content stream with PDFDebugger). Surprisingly, this
also happens in PDFBox 1.8, which uses font operations (or so I thought)
instead of vector graphics.
Same effect when printing into XPS.
I also traced the shapes that are being passed, these have more digits. The one
below is probably "T":
{code:java}
graphics transform: AffineTransform[[8.333333333333334, 0.0, 600.0], [0.0,
-8.333333333333334, 7200.000000000001]]
moveto (852.6204427083334, 1044.596354166667)
lineto (852.8645833333334, 1049.772135416667)
lineto (852.24609375, 1049.772135416667)
quad (852.0670572916667, 1048.404947916667) (851.7578125, 1047.819010416667)
quad (851.2532552083334, 1046.875000000001) (850.4231770833334,
1046.435546875001)
quad (849.5768229166667, 1045.979817708334) (848.2096354166667,
1045.979817708334)
lineto (845.1009114583334, 1045.979817708334)
lineto (845.1009114583334, 1062.841796875001)
quad (845.1009114583334, 1064.876302083334) (845.5403645833334,
1065.380859375001)
quad (846.1588541666667, 1066.064453125001) (847.4446614583334,
1066.064453125001)
lineto (848.2096354166667, 1066.064453125001)
lineto (848.2096354166667, 1066.666666666667)
lineto (838.8509114583334, 1066.666666666667)
lineto (838.8509114583334, 1066.064453125001)
lineto (839.6321614583334, 1066.064453125001)
quad (841.0319010416667, 1066.064453125001) (841.6178385416667,
1065.218098958334)
quad (841.9759114583334, 1064.697265625001) (841.9759114583334,
1062.841796875001)
lineto (841.9759114583334, 1045.979817708334)
lineto (839.3229166666667, 1045.979817708334)
quad (837.7766927083334, 1045.979817708334) (837.1256510416667,
1046.207682291667)
quad (836.279296875, 1046.516927083334) (835.6770833333334, 1047.395833333334)
quad (835.0748697916667, 1048.274739583334) (834.9609375, 1049.772135416667)
lineto (834.3424479166667, 1049.772135416667)
lineto (834.6028645833334, 1044.596354166667)
lineto (852.6204427083334, 1044.596354166667)
close {code}
And this is from the PDF that is created from "printing" into it:
{code}
1.0 0.0 0.0 1.0 136.48 167.2 cm
0.0 0.0 0.0 rg
0.0 0.0 m
0.0 0.8 l
-0.16 0.8 l
-0.16 0.64 -0.16 0.48 -0.16 0.48 c
-0.16 0.32 -0.32 0.32 -0.48 0.16 c
-0.48 0.16 -0.64 0.16 -0.8 0.16 c
-1.28 0.16 l
-1.28 2.88 l
-1.28 3.04 -1.28 3.2 -1.12 3.2 c
-1.12 3.36 -0.96 3.36 -0.96 3.36 c
-0.8 3.36 l
-0.8 3.52 l
-2.24 3.52 l
-2.24 3.36 l
-2.08 3.36 l
-1.92 3.36 -1.92 3.36 -1.76 3.2 c
-1.76 3.2 -1.76 3.04 -1.76 2.88 c
-1.76 0.16 l
-2.24 0.16 l
-2.4 0.16 -2.4 0.16 -2.56 0.16 c
-2.56 0.16 -2.72 0.32 -2.72 0.32 c
-2.88 0.48 -2.88 0.64 -2.88 0.8 c
-3.04 0.8 l
-2.88 0.0 l
0.0 0.0 l
h
f
{code}
was (Author: tilman):
I am always reluctant to install new software, so I tried something else first:
I printed into a PDF. The one with the graphics strategy looked nice, the other
didn't. The one with the graphics strategy has fonts in the PDF itself. So I
suspect that the printer will render the fonts itself. The one from PDFBox
looks terrible (see [^PrintedWithPDFBox.pdf]) and has vector graphics. And one
thing is really suspicious: the coordinates never have more than two digits
after the "." (look at the content stream with PDFDebugger). Surprisingly, this
also happens in PDFBox 1.8, which uses font operations (or so I thought)
instead of vector graphics.
Same effect when printing into XPS.
I also traced the shapes that are being passed, these have more digits. The one
below is probably "T":
{code:java}
graphics transform: AffineTransform[[8.333333333333334, 0.0, 600.0], [0.0,
-8.333333333333334, 7200.000000000001]]
moveto (852.6204427083334, 1044.596354166667)
lineto (852.8645833333334, 1049.772135416667)
lineto (852.24609375, 1049.772135416667)
quad (852.0670572916667, 1048.404947916667) (851.7578125, 1047.819010416667)
quad (851.2532552083334, 1046.875000000001) (850.4231770833334,
1046.435546875001)
quad (849.5768229166667, 1045.979817708334) (848.2096354166667,
1045.979817708334)
lineto (845.1009114583334, 1045.979817708334)
lineto (845.1009114583334, 1062.841796875001)
quad (845.1009114583334, 1064.876302083334) (845.5403645833334,
1065.380859375001)
quad (846.1588541666667, 1066.064453125001) (847.4446614583334,
1066.064453125001)
lineto (848.2096354166667, 1066.064453125001)
lineto (848.2096354166667, 1066.666666666667)
lineto (838.8509114583334, 1066.666666666667)
lineto (838.8509114583334, 1066.064453125001)
lineto (839.6321614583334, 1066.064453125001)
quad (841.0319010416667, 1066.064453125001) (841.6178385416667,
1065.218098958334)
quad (841.9759114583334, 1064.697265625001) (841.9759114583334,
1062.841796875001)
lineto (841.9759114583334, 1045.979817708334)
lineto (839.3229166666667, 1045.979817708334)
quad (837.7766927083334, 1045.979817708334) (837.1256510416667,
1046.207682291667)
quad (836.279296875, 1046.516927083334) (835.6770833333334, 1047.395833333334)
quad (835.0748697916667, 1048.274739583334) (834.9609375, 1049.772135416667)
lineto (834.3424479166667, 1049.772135416667)
lineto (834.6028645833334, 1044.596354166667)
lineto (852.6204427083334, 1044.596354166667)
close {code}
> PDFBox prints text poorly in comparison to Adobe, Chrome, other apps
> --------------------------------------------------------------------
>
> Key: PDFBOX-4709
> URL: https://issues.apache.org/jira/browse/PDFBOX-4709
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.14
> Environment: Windows 10
> AdoptOpenJDK 11
> PDFBox 2.0.14
> Reporter: Lite M Finocchiaro
> Priority: Major
> Labels: Zebra
> Attachments: Adoberesult.jpg, Drug-print.pdf, Drug-print.pdf,
> IMG_20191219_130048_2.jpg, PDFBoxVSgraphicsobj.jpg, PDFBoxresult.jpg,
> PrintedWithPDFBox.pdf
>
>
> When printing a PDF from PDFBox to a Zebra GK420d thermal label printer, the
> text from the PDF is blurry and appears to have the top and bottom cut off
> compared to printing the same file through Adobe Acrobat.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]