You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Timm, Sean" <ST...@mailgo.com> on 2000/06/21 23:08:49 UTC

RE: [PATCH] Output binary comment to make sure PDF is treated as bina ry

:)  Afraid not.  I just output the same thing I found in the PDFs that Adobe
outputs...just in case...

-----Original Message-----
From: COFFMAN Steven [mailto:SCoffman@CBSINC.com]
Sent: Wednesday, June 21, 2000 3:10 PM
To: 'fop-dev@xml.apache.org'
Subject: RE: [PATCH] Output binary comment to make sure PDF is treated
as bina ry


Does your binary comment mean anything? Like a hidden message? :)
-Steve

-----Original Message-----
From: Timm, Sean [mailto:STimm@mailgo.com]
Sent: Wednesday, June 21, 2000 5:03 PM
To: 'fop-dev@xml.apache.org'
Subject: [PATCH] Output binary comment to make sure PDF is treated as
bina ry


Well, per Steve's suggestion, I modified FOP to output a binary comment to
ensure that the file was treated as binary.  Unfortunately, this didn't help
any, and I'm still receiving all blank pages in my fax.  Anyway, here's the
patch:

Index: PDFDocument.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/pdf/PDFDocument.java,v
retrieving revision 1.12
diff -u -r1.12 PDFDocument.java
--- PDFDocument.java	2000/06/21 01:40:56	1.12
+++ PDFDocument.java	2000/06/21 20:59:43
@@ -891,6 +891,11 @@
            the header's length */
         this.position += outputHeader(writer);
 
+        /* Ensure that the PDF is treated as a binary file */
+        String binaryComment = "%\u00E2\u00E3\u00CF\u00D3\r\n";
+        writer.write(binaryComment);
+        this.position += binaryComment.length();
+
         this.resources.setXObjects(xObjects);
 
         /* loop through the object numbers */

RE: [PATCH] Output binary comment to make sure PDF is treated as bina ry

Posted by Tony Graham <tk...@menteith.com>.
At 21 Jun 2000 15:08 -0600, Timm, Sean wrote:
 > :)  Afraid not.  I just output the same thing I found in the PDFs that Adobe
 > outputs...just in case...
 > 
 > -----Original Message-----
 > From: COFFMAN Steven [mailto:SCoffman@CBSINC.com]
 > Sent: Wednesday, June 21, 2000 3:10 PM
 > To: 'fop-dev@xml.apache.org'
 > Subject: RE: [PATCH] Output binary comment to make sure PDF is treated
 > as bina ry
 > 
 > 
 > Does your binary comment mean anything? Like a hidden message? :)
 > -Steve
 > 
 > -----Original Message-----
 > From: Timm, Sean [mailto:STimm@mailgo.com]
 > Sent: Wednesday, June 21, 2000 5:03 PM
 > To: 'fop-dev@xml.apache.org'
 > Subject: [PATCH] Output binary comment to make sure PDF is treated as
 > bina ry
...
 > +        /* Ensure that the PDF is treated as a binary file */
 > +        String binaryComment = "%\u00E2\u00E3\u00CF\u00D3\r\n";


Unicode character names for the characters in the binary comment:

\u00E2 - LATIN SMALL LETTER A WITH CIRCUMFLEX
\u00E3 - LATIN SMALL LETTER A WITH TILDE
\u00CF - LATIN CAPITAL LETTER I WITH DIAERESIS
\u00D3 - LATIN CAPITAL LETTER O WITH ACUTE

Regards,


Tony Graham.