Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

PDF XFA -> Static/Standard PDF Conversion in Java

$
0
0
Hello,

We are having a problem where XFA PDFs are confusing some of our customers, and they cannot be opened on iOS, etc. So we are wanting to convert these XFA documents into Standard/Static PDFs on the fly, since we don't need them to be dynamic anymore after we generate them, but we just want them to look exactly like the XFA documents do.

It looks like Aspose.PDF for Java can do this, so I downloaded the Trial version to test it out and entered the following code:

import com.aspose.pdf.*; 
public class Main 
public static void main( String[] args ) { //open source PDF documentcom.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("data/StandardTemplate3.pdf");pdfDocument.getForm().setType(FormType.Static);
 pdfDocument.save("data/output.pdf");
System.out.println("Test"); 
 } 
}

But, then I get "Exception in thread "main" class com.aspose.pdf.internal.p235.z9: At most 4 text fragments can be added in evaluation mode."

So, my question is: Will this do what I want it to when not in evaluation mode? Or am I just off-base on thinking of what this is supposed to be doing?

-Thanks!

Viewing all articles
Browse latest Browse all 3131

Trending Articles