You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2016/05/26 11:48:12 UTC
[jira] [Commented] (PDFBOX-3267) Using threads results in different
images
[ https://issues.apache.org/jira/browse/PDFBOX-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301966#comment-15301966 ]
Andreas Lehmkühler commented on PDFBOX-3267:
--------------------------------------------
charStringCache is a ConcurrentHashMap which eliminates some of the possible issues when using more than one thread. But all members of the map have to be implemented thread safe as well and Type1CharString isn't thread safe. I've synchronized the render part in getBounds, getWidth and getPath and everything works as expected.
> Using threads results in different images
> -----------------------------------------
>
> Key: PDFBOX-3267
> URL: https://issues.apache.org/jira/browse/PDFBOX-3267
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.0
> Reporter: simon steiner
> Attachments: ComparePDF.java, bmpwithdpi.pdf, bmpwithdpi2.pdf, syncicc.patch, t1.png, t2.png
>
>
> If i dont use threads images are the same
> java -cp pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar:. ComparePDF
> Exception in thread "main" java.io.IOException: Not equals
> at ComparePDF.main(ComparePDF.java:21)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org