pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java?rev=1855645&r1=1855644&r2=1855645&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
(original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java
Sat Mar 16 13:30:58 2019
@@ -82,7 +82,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