[
https://issues.apache.org/jira/browse/PDFBOX-1868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13884427#comment-13884427
]
Jon Wu commented on PDFBOX-1868:
--------------------------------
[~lehmi], I'm using the same version in both places for web server and command
line on my Mac. Since I've had this issue for a while, there have been multiple
versions of Java 6 and I've had the issue on other machines.
When you run on command line with 'java -jar pdfbox-app-1.8.3.jar PDFToImage
-imageType PNG script-font.pdf', you generate a file that looks like the bad
one I attached as script-font-bad-1.8.3.png?
I'm glad you're able to see the issue as I can't seem to make it break for me
with the -app.jar. I've attached an example run on my MacBook Pro.
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
And when I start my server,
Using JRE_HOME:
/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home
On my production servers, I'm running Solaris / Joyent SmartOS Intel x64 with
1.6.0_32-b05 and I have the same problem.
> Garbled / distorted fonts during PDF to image conversion on recent versions
> ---------------------------------------------------------------------------
>
> Key: PDFBOX-1868
> URL: https://issues.apache.org/jira/browse/PDFBOX-1868
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.8.3
> Environment: Java 6
> Reporter: Jon Wu
> Attachments: script-font-bad-1.8.3.png, script-font-good-1.6.0.png,
> script-font.pdf
>
>
> Rasterized fonts have distorted curves and weird breaks in the letter when
> converting PDF to image.
> I'm running PDFBox in a web server environment to rasterize PDFs with text in
> them. However, I've found that in recent versions, I end up getting garbled
> text using the same code, same PDF, and same machine.
> In script-font-bad-1.8.3.png, you can see that this big cursive F has a weird
> break in it in the middle and all the curves aren't smooth which is really
> obvious when you compare this bad image (1.8.3) with the PDF or a good one
> (1.6.0).
> See script-font-good-1.6.0.png or the attached PDF for the correct rendering.
> What's weird is that I don't get the bad image when I use pdfbox-app.jar on
> the PDF - it's only with my code. The PDF has an embedded TrueType (CID) font
> with Identity-H encoding and was written by iText.
> This also happens on other fonts, but I chose this example because it's most
> obvious.
> Good versions:
> 1.6.0 (I'm on this now)
> 1.7.0-SNAPSHOT from approx 10/24/11
> 1.8.0-20130225.201137-98
> Bad versions:
> 1.7.1
> 1.8.0-SNAPSHOT from approx 3/1/13
> 1.8.3
> and many others in between
> I ended up downgrading to 1.6.0 because I had some issues with transparency
> on some of the good snapshots that were working, but I think the transparency
> issues are resolved on 1.8.3.
> Tilman Hausherr mentioned this could be a regression of PDFBOX-1435.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)