[ 
https://issues.apache.org/jira/browse/PDFBOX-4302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16598230#comment-16598230
 ] 

ASF subversion and git services commented on PDFBOX-4302:
---------------------------------------------------------

Commit 1839725 from [email protected] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1839725 ]

PDFBOX-4302: test must have MAX_ENTRIES_PER_OPERATOR unique characters

> ToUnicode CMap is not written correctly when the entry count is just 100.
> -------------------------------------------------------------------------
>
>                 Key: PDFBOX-4302
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4302
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.11
>         Environment: Windows10
>            Reporter: Atsushi Doita
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 2.0.12, 3.0.0 PDFBox
>
>         Attachments: PDFSample.java, pdf_sample.pdf
>
>
> The following warning log is output when I execute attached PDFSample.java.
> org.apache.pdfbox.pdmodel.font.PDFont <init>
> WARN: Invalid ToUnicode CMap in font AAKCFF+IPAMincho
> org.apache.pdfbox.pdmodel.font.PDType0Font toUnicode
> WARN: No Unicode mapping for CID+598 (598) in font AAKCFF+IPAMincho
>  :
> This program creates a simple japanese pdf and read the image.
> This program reads a font file. You can download the file from the following 
> URL.
> https://ipafont.ipa.go.jp/old/ipafont/download.html#en
> I investigated the problem and found a bug in ToUnicodeWriter class.
> In writeTo method, a loop count in a operator is calculated by the following 
> line. But the count will be 0 if the srcFrom size is just 100.
>             int count = batch == batchCount - 1 ? srcFrom.size() % 100 : 100;
> I changed this line to below and I confirmed that the problem was resolved.
>             int count = batch == batchCount - 1 ? srcFrom.size() - 100 * 
> batch : 100;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to