Why does a rendered PDF show 'upgrade to the latest version Acrobat Reader' and what to do about it

Q:

I use PDFNet to render PDF in my mobile apps. On some documents the rendered page displays:

"To view the full contents of this document, you need a later version of the PDF viewer. You can update to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html

For further support, go to www.adobe.com/support/products/acrreader.html

or

"Please wait…

If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document…"

Can you shed some light on this?

A:

PDFNet actually renders the page correctly. The file that generated the placeholder page is Adobe LiveCycle. The problem is that the file contains proprietary LiveCycle specific extensions that are processed only in recent versions of Acrobat reader on desktop. These extensions are not supported by third party viewers and are not supported even in mobile versions of Acrobat.

For more info please see:

https://groups.google.com/d/topic/pdfnet-sdk/ghFsTeAxDuI/discussion

https://groups.google.com/d/topic/pdfnet-sdk/MivJgR8Oa8A/discussion

https://groups.google.com/d/topic/pdfnet-sdk/zgoiXfCf_bU/discussion

In case you want to detect this type of files programmatically (e.g. to show your own message instead of the LiveCycle one) use the following code snippet (it’s in Java, but you can easily port it to other languages):

PDFDoc doc = new PDFDoc(“doc.pdf”);

Obj objNeedsRendering = doc.getRoot().findObj(“NeedsRendering”);

if (objNeedsRendering != null && objNeedsRendering.isBool() && objNeedsRendering.getBool()) {

// The document has XFA forms and is not supported

} else {

// The document is supported

}