pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1857163 - /pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
Date Tue, 09 Apr 2019 10:39:41 GMT
Author: tilman
Date: Tue Apr  9 10:39:41 2019
New Revision: 1857163

URL: http://svn.apache.org/viewvc?rev=1857163&view=rev
Log:
PDFBOX-4509, PDFBOX-45: add test that font doesn't appear twice in font resources

Modified:
    pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java

Modified: pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java?rev=1857163&r1=1857162&r2=1857163&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
(original)
+++ pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestCreateSignature.java
Tue Apr  9 10:39:41 2019
@@ -433,6 +433,12 @@ public class TestCreateSignature
         field = doc.getDocumentCatalog().getAcroForm().getField("SampleField");
         field.setValue("New Value 1");
 
+        // Test of PDFBOX-4509: only "Helv" font should be there
+        Collection<COSName> fonts = (Collection<COSName>) field.getWidgets().get(0).getAppearance().
+                getNormalAppearance().getAppearanceStream().getResources().getFontNames();
+        Assert.assertTrue(fonts.contains(COSName.HELV));
+        Assert.assertEquals(1, fonts.size());
+
         expectedImage1 = new PDFRenderer(doc).renderImage(0);
 
         // compare images, image must has changed



Mime
View raw message