selma created PDFBOX-5502:
-----------------------------
Summary: 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
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]