Writing PDF files from RunRev

jbv jbv.silences at Club-Internet.fr
Thu Dec 4 11:49:45 CST 2003


Hi again,

Really I don't see why you're wasting so much time & energy
on this piece of code that looks like a piece of crap : at first glance
I can see 2 big mistakes in it :

1) the 1st line of a PDF file must start with %PDF and contains
the version used to build it. It can be 1.0 or 1.1 or...
obviously the 1st line doesn't feature any valid version number...

2) the trailer of a PDF file must end with 2 lines :
            <the total # of bytes in the file>
            %%EOF
I don't see any of those in the example you submitted...

Again, you'd better start by studying the Adobe reference tutorial,
ans used PDF files that are 100% guaranteed to work, like
Illustrator files saved as PDF.

Good luck,
JB



> At 2:18 am -0800 4/12/03, Alejandro Tejada wrote:
> >Hi Alex,
> >
> >Have you visited this link about PDF writing?
> >
> ><http://www.mactech.com/articles/mactech/Vol.16/16.03/DynamicPDF/>
> >
> >that shows this code to write a PDF file:
> >
> >%PDF-1.
> >1 0 obj<</Pages 2 0 R>>
> >2 0 obj<</Kids[<</Parent 2 0
> >R/Resources<</Font<</R
> ><</Subtype/Type1/BaseFont/Arial>>
> >>>>>/Contents<<>>stream
> >BT/R 14
> >1 0 0 1 72 720 Tm
> >Tf(Hello World!)Tj
> >endstream
> >>>]>>
> >trailer<</Root 1 0 R>>
> >
> >I have saved this code from Rev as a binfile but
> >everytime that I've tried to open this file
> >as a PDF file, Acrobat Reader tells me that the file
> >has errors that could not be repaired and skips the
> >file...
> >
> >If you could visit the link, please read the
> >article and try it by yourself.
>
> The same code saved from Text Wrangler (lite version of BBEdit)
> produces the same error in Acrobat Reader 5 and 6, and also in
> Preview on OS X.
>
> Cheers
> Dave
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list