aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-common/src/test/java/at/gv/egiz
diff options
context:
space:
mode:
authorThomas <>2024-03-15 19:46:16 +0100
committerThomas <>2024-03-15 19:46:16 +0100
commit033c128fd1a499d6a34d4db2ab532f1169ce553e (patch)
tree7b61f01a1d7a6b20fdac2f163423727bcc2578f1 /pdf-as-common/src/test/java/at/gv/egiz
parent9f3ca0327be376ac6e4db8aef18274f5317e554e (diff)
downloadpdf-as-4-033c128fd1a499d6a34d4db2ab532f1169ce553e.tar.gz
pdf-as-4-033c128fd1a499d6a34d4db2ab532f1169ce553e.tar.bz2
pdf-as-4-033c128fd1a499d6a34d4db2ab532f1169ce553e.zip
fix(pdfbox): remove character \u0009 (tabluator) before operate on font
Reason: will not be supported by fonts and must be replaced with blank before rendering
Diffstat (limited to 'pdf-as-common/src/test/java/at/gv/egiz')
-rw-r--r--pdf-as-common/src/test/java/at/gv/egiz/pdfas/common/test/utils/StringUtilsTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/pdf-as-common/src/test/java/at/gv/egiz/pdfas/common/test/utils/StringUtilsTest.java b/pdf-as-common/src/test/java/at/gv/egiz/pdfas/common/test/utils/StringUtilsTest.java
new file mode 100644
index 00000000..6c6ee654
--- /dev/null
+++ b/pdf-as-common/src/test/java/at/gv/egiz/pdfas/common/test/utils/StringUtilsTest.java
@@ -0,0 +1,22 @@
+package at.gv.egiz.pdfas.common.test.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.UnsupportedEncodingException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
+
+import at.gv.egiz.pdfas.common.utils.StringUtils;
+
+@RunWith(BlockJUnit4ClassRunner.class)
+public class StringUtilsTest {
+
+ @Test
+ public void checkTabulatorReplacing() throws UnsupportedEncodingException {
+ assertEquals("asdfsaf asdfsafsafwer", StringUtils.convertStringToPDFFormat("asdfsaf\u0009asdfsafsafwer"));
+
+ }
+
+}