Posted by Shelly on 09/19/07 20:41
> "Good Man" <heyho@letsgo.com> wrote in message
>> ... also found a link that suggests PDF files are just gzipped XML, so
>> maybe you could write your own extractor:
>>
>> http://www.thescripts.com/forum/thread631837.html
>
> hmm.
I tried a very simple test with a very small PDF file. The code is:
<?php
$pdfFile = "./images/Postcard.pdf";
echo $pdfFile . "<br>";
$fp = gzopen($pdfFile, "r");
$rawStream = gzread($fp, 5000000);
gzclose($fp);
echo "**" .$rawStream . "**<br>";
$stream = gzuncompress($rawStream);
echo $stream;
?>
It came up with a "data error" in the line with
$stream = gzuncompress($rawStream);
The error was in the gzuncompress.
Navigation:
[Reply to this message]
|