Migration issue from Aspose PDF 2.2.1.0 to 2.5.0 with FOP content

Hello

We upgraded recently our Aspose licence for PDF to version 2.5.0 and we run into big trouble.

In the previous version of Aspose, we feed the Aspose engine with a content generated by org.apache.fop.apps.Fop and it worked perfectly.

Now with the new version 2.5.0, the generated PDF can no longer be opened, there is an error.

We looked into the generated PDF and there is what we found:

<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root …>

// LONG PIECE OF FOP CONTENT HERE
</fo:root>%PDF-1.4
%ª«¬­
4 0 obj
<<
/Producer (Apache FOP Version 0.94)
/CreationDate (D:20100525182109+02’00’)
>>
endobj
5 0 obj
<< /N 3
/Length 10 0 R
/Filter /FlateDecode
>>
stream
xœ–wTSهϽ7½P’Š”ÐkhRH
½H‘.*1 JÀ …

// LOTS OF BINARY DATA HERE, PROBABLY RELATED TO PDF FORMAT


It seems that instead of transforming the FOP content into PDF, the engine only append the binary PDF content to the original FOP content without transforming it.

Does any one has a clue about this issue ? We were looking around for nearly 2 days now.

Another details:

ORIGINAL 2.2.1.0 code:

Pdf pdf = Pdf.bindXML(new ByteArrayInputStream(outputStream.toByteArray()));
ByteArrayOutputStream baos = new ByteArrayOutputStream()
pdf.save(baos)

NEW 2.5.0 code:

BasicStream basicStream = new BasicStream(new ByteArrayInputStream(outputStream.toByteArray()));
pdf.save(basicStream);


the outputStream variable contains the FOP content.

Regards




Hi,

Can you please share some sample FOP content so that we can test the scenario at our end.

We apologize for your inconvenience.

For confidentiality reasons we can not disclose the content of the FOP.

However, please notice that in new 2.5.0 code, we no longer use the bindXML method because the signature has changed a lot. Can it be the cause of the issue ?

By the way, what does bindXML do exactly ? We do not find useful info from the online API. There are 3 news bindXML requiring each 2 arguments: an XML and an XSL.

Aspose.Total for Java|Documentation

We can set null to the XSL but we had some trouble to adapt the code to the first XML parameter.

The API states that it can be an XMLDocument, a String or a TextFileStream.

The old bindXML requires a ByteArrayInputStream (or probably a plain InputStream) and we can not map our existing byteArrayInputStream into a TextInputStream. Looking at the constructor of this one, it only accepts java.io.File or String

Aspose.Total for Java|Documentation


Hi,

I have observed that you are trying to transform the XSL-FO contents into PDF format using Aspose.Pdf for Java. I am sorry to inform you that BindFO (..) method is not available in current release version. We have already logged this requirement as PDFJAVA-14506 in our issue tracking system. Our development team is looking into the details of this requirement and once we have some updates regarding its resolution, we would be pleased to update you with the status of correction.

BindXML (..) method is used to transform the contents of XML document into PDF format.

In order to convert the ByteArrayInputStream into XMLDocument please try using the following code snippet.

[Java]

ByteArrayOutputStream out = new ByteArrayOutputStream();
XMLDocument xmlDoc = new XMLDocument();
xmlDoc.load(new MemStream(out.toByteArray()));

In case you have any further query, please feel free to contact.

We apologize for your inconvenience.

Hello codewarrior

We reverse back finally to the previous version of Apose PDF (2.2.1.0) but when we try to use it with the new licence you provided us (new licence for Aspose PDF 2.5.0) there was a Java Exception:


java.lang.Exception: The license is invalid. The signature is invalid.
at com.aspose.pdf.License.a(Unknown Source)
at com.aspose.pdf.License.setLicense(Unknown Source)…




The situation is quite critical now because we need to go to production and all PDF exports are not working.

Do you have any work-around for this ? Or maybe can you provide a special version to make our Aspose PDF 2.2.1.0 work again ?

Thank you in advance

Hi,

Our license schema has been changed and the latest products do not support the old licensing schema. Similarly the older product versions do not support the new license schema. Since you have reverted back to the older version of the product, then I would suggest you to please try using the older version of the license file. In case you still face any issue or you have any further query, please feel free to contact

We apologize for your inconvenience.

Hi,

I’m afraid, we need to investigate this issue in detail and you’ll be updated accordingly; if we need any further information regarding this issue, we’ll let you know. However, at the moment, can you please try to use the older license with the version 2.2.1 - which you were already using with it?

We’re sorry for the inconvenience and appreciate your patience.
Regards,

Hello

The old licence expired at the end of 2009. That’s why we are using the new licence but it seems that Aspose-PDF jar version 2.2.1.0 is NOT compatible with new licence …

Why isn’t there backward compatibility in your licencing scheme ?

Can you extend the old licence (compatible with 2.2.1.0) for us ?

Regards

Hi,

I have not been able to locate any orders against 'ZTE' or your username 'itdotcom' so, would you please be very kind to share the order id or some more related information about your subscription with us. We will proceed once we have the required details.

We apologize for the inconvenience and appreciate your patience in this matter.