Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

FDF Toolkit Java. Does it work with acrobat reader 6 ?

New Here ,
Sep 13, 2004 Sep 13, 2004
Hi everybuddy,

I have update teh JAR file (jfdftk.jar) to release 6 at (http://partners.adobe.com/asn/acrobat/forms.jsp) and the servlet I used to generate a PDF file from an XML and a FDF file DOESN'T WORK.

When I run my webapp at a PC with ACROBAR READER (AR) 5 installed everything works fine but when the PC I'm running from my webapp has installed AR release 6, all what I got is a blank page.

Could anybody tell me what I'm doing wrong ?
What is missing or it is a bug that apperas with release AR 6 ?

I'm developing on a W2000 PC with the ORACLE 9iAS.

Thanx in advance
Jose

Pdta.- I paste below my servlet:

public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException{
FDFDoc outFDF = new FDFDoc();

String paramValue, paramName;
ResourceBundle rb = ResourceBundle.getBundle("mmmm");
String sFile = req.getParameter("XML");

String sFilePDF= rb.getString("PDF_Path") + sFile.substring(sFile.indexOf("$")+1,sFile.length()-3) + "pdf";
String sFileXML = rb.getString("PDF_Path") + sFile;
System.out.println("FilePDF:" + sFilePDF + " --> Archivo XML:" + sFileXML);

File fileXML = new File(sFileXML);
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(fileXML);
Node node = doc.getElementsByTagName("DATOS").item(0);
NodeList nodelist = node.getChildNodes();
int childLen = nodelist.getLength();
for (int j = 0; j < childLen; j++) {
Node child = nodelist.item(j);
if (child.getNodeType() == Node.ELEMENT_NODE) {
paramName = child.getNodeName().substring(4);
if (child.getFirstChild()!=null){
paramValue = child.getFirstChild().getNodeValue();
}else{
paramValue = "";
}
outFDF.SetValue(paramName, paramValue);
System.out.println("Parametro:" + paramName + " -->" + paramValue);
}
}

outFDF.SetFile(sFilePDF);
res.setContentType("application/vnd.fdf");
OutputStream out = res.getOutputStream();
outFDF.Save(out);
out.close();

}catch(FDFException e) {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("Caught FDF exception");
out.println(e.toString());
e.printStackTrace(out);
}catch (SAXParseException spe){
System.out.println ("\n** Parsing error" + ", line " + spe.getLineNumber () + ", uri " + spe.getSystemId ());
System.out.println(" " + spe.getMessage() );
Exception x = spe;
if (spe.getException() != null) x = spe.getException();
x.printStackTrace();
} catch (SAXException sxe) {
Exception x = sxe;
if (sxe.getException() != null) x = sxe.getException();
x.printStackTrace();
} catch (ParserConfigurationException pce) {
System.out.println(pce.getMessage());
} catch (IOException ioe) {
System.out.println(ioe.getMessage());
}

}
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 06, 2004 Oct 06, 2004
LATEST
You might have beter luck in the Acrobat SDK forum. This forum is for large installation issues.

~T
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines