I generated a PDF with AP12. If I click the file locally, it loads into reader fine. But no matter what I do in perl, it stops loading data at around 4K of a 212K file. (Reading the data sent to page in a text editor, it seems to stop at %%EOF)
I have tried the usual "While(<xx>)" and "@file=<ZZ>", and even tried the "local $/" to set to undefined size ... but still it stops reading at 4K / %%EOF
<< /Info 4 0 R /Root 1 0 R /Size 815 >> startxref 207080 %%EOF
So I can't even 'grab' it to send it to a zip file, (everything is code based from generating file to delivery) 'cos I can't read the entire file ... My ultimate aim is to get the file to the browser, or to a save prompt - but can't do either.
Annoying thing is, I've got it to work before using the "Content-disposition" "content-type: application/pdf" ... but I suspect those files are less than the buffer size (??)
I even tried it with another file (8MB) Whilst I got the correct number of pages after 20 seconds - and having to switch to an older reader ... there was no text on any page!!
I can't even email it to people ... cos I can't read the entire file to memory.
Final try:
open (QR, "<QR_labels.pdf"); binmode(QR); print "Content-type: application/pdf\n\n"; print 'Content-Disposition', "attachment; filename=Booth_guide.pdf\n\n +"; while(read(QR,$buffer,10000)){ print $buffer; } close(QR);
Same thing. Only 4K delivered to browser from 212K, and breaking as shown above. This has me beaten! I don't know what to try next
In reply to HELP: Problem with PDF by cristofayre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |