pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1855644 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
Date Sat, 16 Mar 2019 13:30:06 GMT
Author: tilman
Date: Sat Mar 16 13:30:06 2019
New Revision: 1855644

URL: http://svn.apache.org/viewvc?rev=1855644&view=rev
Log:
PDFBOX-4485: improve example for backwards, cross-platform and cross-language compatibility

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java?rev=1855644&r1=1855643&r2=1855644&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
Sat Mar 16 13:30:06 2019
@@ -80,7 +80,11 @@ public class EmbeddedFiles
 
             //first create the file specification, which holds the embedded file
             PDComplexFileSpecification fs = new PDComplexFileSpecification();
+
+            // use both methods for backwards, cross-platform and cross-language compatibility.
             fs.setFile( "Test.txt" );
+            fs.setFileUnicode("Test.txt");
+
             //create a dummy file stream, this would probably normally be a FileInputStream
             byte[] data = "This is the contents of the embedded file".getBytes("ISO-8859-1");
             ByteArrayInputStream fakeFile =



Mime
View raw message