views:

4

answers:

0

When creating a PDF file through PDFlib+PDI, and then write the file with fwrite, all desktop systems can view the contents of the file just fine, but Droid devises can't.... (they only show a blank document in PDF viewer). I'm thinking that, when performing the fwrite, since OS is responsible for determining the file type (based solely on the extension) I may need to specify some header information dictating what type of file it is (%PDF-) during the fwrite, or maybe during the fopen, w.

I've viewed the template file that the PDI starts with on the Droid with no problem, so it doesn't appear to be a PDF version issue or a corrupt file... it's only when a new document is created from the template, through the PDFlib+PDI, and saved, that it's blank on Droid.

I haven't tested these files on iPhone, or other "simple" handheld devises. But, I suspect a similar issue.

Is there anything known about this problem? Or a way to help these devises work with dynamically created PDFs? Or a way to write header information to a PDF file as it's being written?