XOD conversion, bug on linux?

We are using the following code in Java to convert a PDF document to an XOD

final ByteArrayOutputStream baos = new ByteArrayOutputStream();

byte[] buffer = new byte[4096];

PDFDoc doc = new PDFDoc(baos.toByteArray());

Filter filter = Convert.toXod(doc);
FilterReader reader = new FilterReader(filter);


while ((bytesRead = reader.read(buffer)) != 0) {
   baos.write(buffer, 0, (int) bytesRead);


While running fine on our development system (Mac OSX), it crashes on some PDFs when running on the
Linux Ubuntu Server. PDFNet SDK is 6.2.1.

Crash in line reader.read(buffer).


   Message: GetName() can't be invoked on Obj of this type.
   Conditional expression: false
   Filename : Obj.cpp
   Function : IllegalFunctionException
   Linenumber : 228
   Error code : 0

  at pdftron.Filters.FilterReader.Read(Native Method)
  at pdftron.Filters.FilterReader.read(FilterReader.java:105)
  at org.fbs.ability.Resource.FileResource.getXOD(FileResource.java:294)

Any suggestions?

Based on the error it looks like you may have a corrupt PDF. If you would like us to take a look please send the file to support at pdftron.

Alternatively you may be trying to convert a password protected file and may need to supply a password (see https://groups.google.com/d/msg/pdfnet-sdk/zw25HVbv3FQ/FBPNrXcx_zAJ).