[
https://issues.apache.org/jira/browse/PDFBOX-5502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602503#comment-17602503
]
Tilman Hausherr commented on PDFBOX-5502:
-----------------------------------------
PDF isn't really made for editing. See also "Why was the ReplaceText example
removed?"
https://pdfbox.apache.org/2.0/migration.html#why-was-the-replacetext-example-removed%3F
> character overlap other character in the replace operation
> ----------------------------------------------------------
>
> Key: PDFBOX-5502
> URL: https://issues.apache.org/jira/browse/PDFBOX-5502
> Project: PDFBox
> Issue Type: Bug
> Environment: java
> Reporter: selma
> Priority: Major
> Attachments: overlap.PNG
>
>
> I am trying replace text in exists file, but character overlap other
> character. These characters consist of numbers, Turkish characters and
> special characters. Example 'i' , 'ç', '/', '@'
>
> The Operator name is 'TJ'.
>
> else if (op.getName().equals("TJ")) {
> COSArray previous = (COSArray) tokens.get(j - 1);
> for (int k = 0; k < previous.size(); k++) {
> Object arrElement = previous.getObject(k);
> if (arrElement instanceof COSString) {
> COSString cosString = (COSString) arrElement;
> String string = cosString.getString();
> if (j == prej) {
> pstring += string;
> } else {
> prej = j;
> pstring = string;
> }
> }
> }
> for (Map.Entry<String, String> entry : map.entrySet()) {
> if (entry.getKey().equals(pstring.trim())) {
> COSString cosString2 = (COSString) previous.getObject(0);
> cosString2.setValue(entry.getValue().getBytes("iso-8859-1"));
> int total = previous.size() - 1;
> for (int k = total; k > 0; k--) {
> previous.remove(k);
> }
> }
> }
> }
>
> I saw the following warnings in the debug logs. Could it be related to this?
> logs:
> org.apache.fontbox.ttf.GlyphSubstitutionTable - Type 4 GSUB lookup table is
> not supported and will be ignored
> org.apache.fontbox.ttf.PostScriptTable - No PostScript name information is
> provided for the font Calibri
>
> ---------------------------------
> I am using version org.apache.pdfbox 2.0.22
> Soyad is string, T.C. Kimlik No is numeric, Tarih is date (dd/MM/yyyy) in
> screenshot.
>
> Thank you.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]