2. Text is not showing up in Chrome or FF
3. Made using tool called Adobe live cycle designer and Java (XPAA.jar)
What could be the problem?
Code: Select all
FileInputStream src= new FileInputStream(new File(path));// PDF Form
PDFDocument pdf= PDFFactory.openDocument(src);
String data="<root><name>company</name><tel>000000</tel></root>";
byte[] byteData = data.getBytes("UTF8");
InputStream formInputStream= new ByteArrayInputStream(byteData);
pdf.importFormData(formInputStream); // Data Binding
outWriteStream(inSrcPdf.save(), ServiceContext.getOutputStream());
//----------------
private void outWriteStream(InputStream in, OutputStream out) throws IOException{
byte[] buffer = new byte[10240];
int len = 0;
while (true) {
len = in.read(buffer);
if (len == -1) break;
out.write(buffer, 0, len);
}
out.close();
}
IE or Reader display http://i.stack.imgur.com/D89AY.png
Chrome or FF display http://i.stack.imgur.com/SRlLz.png
PDF Link http://blogattach.naver.net/7aef66d6c79b9e426c8beed8e4017806a0f30ae88c/20150716_126_blogfile/thtlsgkrtod_1437008371191_s4bahM_pdf/test.pdf?type=attachment
FF Version : 39.0, Win 7