Writing PDF files from RunRev
jbv.silences at Club-Internet.fr
Thu Dec 4 12:49:45 EST 2003
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>
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.
> At 2:18 am -0800 4/12/03, Alejandro Tejada wrote:
> >Hi Alex,
> >Have you visited this link about PDF writing?
> >that shows this code to write a PDF file:
> >1 0 obj<</Pages 2 0 R>>
> >2 0 obj<</Kids[<</Parent 2 0
> >BT/R 14
> >1 0 0 1 72 720 Tm
> >Tf(Hello World!)Tj
> >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
> >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.
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode