2

I have created a PDF using PHP's pdflib.

The PDF contains images and some text. The pdf is generated successfully. I am using a Ubuntu 11.10 server and my development machine also runs the same. The generated PDF opens successfully on my dev machine or in any other Ubuntu machine. It also opens on Windows 8 using its default reader. But it does not open in Window seven or lesser with Adobe Reader.

What could be the issue?

bksi
  • 1,606
  • 1
  • 23
  • 45
unni
  • 2,891
  • 4
  • 19
  • 22
  • There could be several issues... Try to update the acrobat reader on W7 or older to the last actual version. What then? If the problem persists, try to create PDF on W7 (using the same code) and open it in Ubuntu. There could be some OS-dependant bit or bits that fail to read on W7 or older OS... – shadyyx Jun 26 '12 at 08:49
  • @shadyyx I will try this and let you know – unni Jun 26 '12 at 09:04
  • Are the readers same version? – bksi Jun 29 '12 at 18:32
  • i would suggest using TCPDF i have been using for quite a while, never had problems of the sort, its only disadvantage is that it is a bit limited – Dany Khalife Jul 01 '12 at 23:48
  • The PDF format exists in several versions, so one possible issue is that you've created a PDF which uses a newer version of the format than what your reader can handle. As shadyyx suggested, try upgrading the reader to the latest version. PDF generators in general should generate a PDF with the lowest format version necessary to render the content. Another debug option therefore is to strip down the PDF to it's bare minimum, e.g. only add one line of text and see if that opens or not. If it opens, then add more content step by step until it fails. – Jens Wegar Jul 04 '12 at 06:08

1 Answers1

0

Although this post is old, maybe my answer can help.

I also had a problem that looks similar. My PDF was generated correctly but I was unable to see it in my web browser.

Instead of displaying your pdf directly in your web browser, try to save it as a pdf on your desktop and to open it as a normal file from Windows.