I'd guess that you're not reading the entire file in yoru code, so it's an incomplete PDF and that's why it complains about not being able to find the XREF section. Try using code like this to read the file:
ByteArrayOutputStream bos = new ByteArrayOutputStream();
int num = 0;
int i = 0;
while (true) {
byte[] temp = new byte[1024];
num = bis.read(temp);
if (num == -1) {
break;
}
bos.write(temp, 0, num);
}
bos.flush();
data = bos.toByteArray();
where bis would be your FileInputStream.
Or alternatively take a look at the com.adobe.idp.Document constructors that take a File object or InputStream instead of a byte array.
> PDFtoXDP=true
I don't think you need this option, that should be for converting an Acrobat PDF to an XDP.
Chris
Adobe Enterprise Developer Support