Created
December 4, 2020 18:27
-
-
Save ozgurozkok/9a2b43f2d0533de6ad614c31e82ce37b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*U+000A ('controlLF') is not available in this font encoding: WinAnsiEncoding. | |
*Java, Apache PDFBox | |
* www.ozgurozkok.com | |
*/ | |
public class FixEncoding extends WinAnsiEncoding { | |
public String remove(String bufstr) { | |
StringBuilder b = new StringBuilder(); | |
for (int i = 0; i < bufstr.length(); i++) { | |
if (WinAnsiEncoding.INSTANCE.contains(bufstr.charAt(i))) { | |
b.append(bufstr.charAt(i)); | |
} | |
} | |
return b.toString(); | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment