[dev] PDF-creation
Joaquim Homrighausen
joho at webbplatsen.se
Wed May 19 01:59:44 PDT 2004
* Quoting Marko Djukic <mdjukic at horde.org>:
Hmm.. no change, I'm afraid.
MSIE/Firefox still does not attempt to display the PDF (xxx.pdf); and
if I go to
the absolut URL of the foo.pdf-output file, the Acrobat Reader says "unknown
object name" (I'm using the Swedish-language version of the reader, so I don't
know what the exact output is in English).
-Joaquim
> try with these changes:
>
> $x = &wpPDF :: factory ('P', 'mm', 'A4');
>
> $x->setinfo ('title', 'FOOOODOOOO');
> $x->setinfo ('subject', 'The Subject field :-)');
> $x->setinfo ('creator', 'Not mine');
>
> $x->open ();
> $x->setMargins (50, 50);
> $x->addPage ('P');
> $x->setFont('arial', '', 15);
> $x->write (10, "This is some text\n");
> $x->write (10, "And this is some more text\n***\n");
>
> $x->text (10,20,'Hello');
> $x->close ();
> $x->save ('foo.pdf');
> $x->output ('xxx.pdf', 'true');
>
> some notes:
> - your margins 150,150 were huge - 15+15cm? that's more than the width of an
> a4...
> - if you want \n to go through correctly enclose them in ""
> - setFont at the moment seems to have an effect only after addPage() and
> setFont() is required for a pdf to render properly
More information about the dev
mailing list