1 Reply Latest reply on Mar 31, 2008 7:35 AM by (Cathy_Reilly)

    XFA is not a shell XFA

      I can not figure out what is causing the error and what does the error message mean.<br /><br />b Error:<br /><br />flex.acrobat.pdf.PDFException: XFA is not a shell XFA<br />     at flex.acrobat.pdf.XDPXFAHelper.open(XDPXFAHelper.java:127)<br />     at com.greatland.ipp.pdf.XDPXFAService.generatePDF(XDPXFAService.java:14)<br />     at com.greatland.ipp.pdf.XDPXFAService$$FastClassByCGLIB$$c35d8ba2.invoke(<generated>)<br /><br />b My XDPXFAService code:<br /><br />public class XDPXFAService<br />{<br />    private static final String emptyXDP = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<?xfa generator=\"AdobeDesigner_V7.1\" APIVersion=\"2.4.5277.0\"?>\n<xdp:xdp xmlns:xdp=\"http://ns.adobe.com/xdp/\" timeStamp=\"2006-12-11T15:41:27Z\" uuid=\"498435c1-4a47-4d72-9c6f-75e966555df6\">\n</xdp:xdp>";<br /><br />    //proxy method for tests<br />    public Object generatePdfTest(){<br />         return generatePDF(null, null, "blank_test.pdf");<br />    }<br /><br />    public Object generatePDF(Document data, String source, String name) {<br />          try {<br />               XDPXFAHelper helper = new XDPXFAHelper();<br /><br />               helper.open(new ByteArrayInputStream(emptyXDP.getBytes()));<br />               byte[] result = helper.saveToByteArray();<br /><br />               File pdf = new File("c:/outputDir" + name);<br />               FileOutputStream fos = new FileOutputStream(pdf);<br />               fos.write(result);<br /><br />               fos.close();<br />               helper.close();<br /><br />          } catch (IOException ioe) {<br />               ioe.printStackTrace();<br />          }<br />          return null;<br />     }<br />}<br /><br />The error occurs when I execute helper.open(...).<br /><br />Thanks.