I've used PDFlib a reasonable amount on *nix platforms, but it works just
fine in IE. Try saving the file to disk and opening it with a text editor
to see if there are any PHP errors corrupting the PDF output. I had this
happen a few times with uninitialized variables, or undefined functions or
what not. PDF readers don't like that stuff...

-Dash

Go placidly amid the noise and waste, and remember what value there may
be in owning a piece thereof.
                -- National Lampoon, "Deteriorata"

On Thu, 23 Jan 2003, [iso-8859-1] Leonardo Javier Belén wrote:

> Hi all!
>     I am facing a problem with PHP (binaries from php.net) over APACHE
> 1.3.x on Windows 95 and IE5&6 as a client (in both WinNT40 and Win95).
> The problem is as follows:
>     I need to use the pdf libraries (both cpdf and pdflib) and I cannto
> make work any sample. If i use the "hello world" from the documentation
> pack, which is with cpdf:
>
> <?php
> $cpdf = cpdf_open(0);
> cpdf_page_init($cpdf, 1, 0, 595, 842, 1.0);
> cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
> cpdf_begin_text($cpdf);
> cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding");
> cpdf_set_text_rendering($cpdf, 1);
> cpdf_text($cpdf, "Times Roman outlined", 50, 750);
> cpdf_end_text($cpdf);
> cpdf_moveto($cpdf, 50, 740);
> cpdf_lineto($cpdf, 330, 740);
> cpdf_stroke($cpdf);
> cpdf_finalize($cpdf);
> header("Content-type: application/pdf");
> header("Content-Disposition: filename=test.pdf");
> Header("Expires: 0");
> cpdf_output_buffer($cpdf);
> ?>
>
> the answer is always the same:  1. a dialog box asking me to discard the
> file based on the information on the control (which I suspect is a
> problem with the settings on IE but at least shows me it recognises the
> right control). 2. start to load the control and then a dialog box
> (during initialization of the control) tells me that the file is no
> available.
>
> Please help! I dont know what the problem is.
> Thanks in advance.
> Leonardo J. Belén. AFIP-AR.
>


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to