XOD conversion, bug on linux?

91 views
Skip to first unread message

Thomas Hübner

unread,
Apr 24, 2014, 12:06:31 PM4/24/14
to pdfne...@googlegroups.com
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());
doc.initSecurityHandler();

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

baos.reset();

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

doc.close();

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).

Error:

Exception:
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?

Support

unread,
Apr 24, 2014, 12:35:57 PM4/24/14
to pdfne...@googlegroups.com
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).
Reply all
Reply to author
Forward
0 new messages