Print Page | Close Window

Dedect XFA Formulars and Portfolio Files

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2094
Printed Date: 02 Aug 25 at 3:37PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Dedect XFA Formulars and Portfolio Files
Posted By: MP
Subject: Dedect XFA Formulars and Portfolio Files
Date Posted: 09 Jan 12 at 1:53PM
We have a customer where we print some text on the first page of an PDF. The Problem is the customer has also some Portfolio PDFs and PDFs which looks like they're using XFA Formulars (which are also not supported what I've read) where the PDFs get corrupted after saving.

Is it possible to dedect if a PDF is using features not supported by QuickPdf, so that we can ignore the PDFs?

PS: When I open my Sample Portfolio file and a call GetPageText, it returnes
Zur optimalen Anzeige dieses PDF-Portfolios sollte es in Acrobat oder Adobe Reader ab Version 9 geönet werden.

which is German and means Install Acrobat Reader X for using PDF-Portfolios




Replies:
Posted By: Ingo
Date Posted: 09 Jan 12 at 4:16PM
Hi!
 
There is an XFA-function to count the xfa-formfields.
The other thing: Do it like you've done it...
Textextraction and searching for "Acrobat Reader X"
for example.
 
Open these files with notepad or something similar
searching for special xfa-details. If you've found some
you can check all future pdf-documents with these
specifications reading the pdf-content into a stream or
string right from harddisk.
 
Cheers and welcome here,
Ingo
 


Posted By: AndrewC
Date Posted: 10 Jan 12 at 6:31AM
As Ingo has mentioned - QP.GetXFAFormFieldCount() will tell you if there are any XFA form fields in the file.

Another option is to check the Producer string -  QP.GetInformation(6);  which will return something like "Adobe LiveCycle Designer 9.0".  -  There will be different version numbers for LiveCycle but it might give you another option to detect the XFA forms based PDF's.


Posted By: MP
Date Posted: 10 Jan 12 at 9:13AM
Thanks, GetInformation(6) worked for me (my version has no GetXFAFormFieldCount()).

The solution is a bit of a hack and I'm not shure if it will not result in problems in the future, will there be a method like IsFilePortfolio or IsFileSupported in future versions of quickPdf?


Posted By: Ingo
Date Posted: 10 Jan 12 at 9:53AM
Hi!
 
Please upload a sample and then
i'll check how to detect it in a save way ;-)
 
Cheers, Ingo
 


Posted By: MP
Date Posted: 11 Jan 12 at 11:19AM
Hi,

I have the sample documents now, but is there a way to send them to you directly? These sample documents are customer documents (even with removed Data) and I do not want to upload them visible for a public forum.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk