/rest/schema
. (#8191)Updated dependencies of the PDFreactor Web Service to the latest versions to include various security updates.
Please refer to the changelogs of the individual dependencies for more information.
function Blob() { }; window.URL = { createObjectURL: function() { return ''; } };
IOException
, SAXException
, TransformerException
.
These are instead available as cause of a PDFreactorException
.-ro-counter-set
which allows resetting counters from within the content, e.g. resetting the page counter at certain headings.last-child
pseudo class.XHTML()
CSS function.white-space
property also works for inline elements.Initial support for CMYK images (TIFF, JPG, PNG)
CMYK tiff images can be used by adding this to your style sheet:
object[type="image/tiff"] { -ro-replacedelement: "com.realobjects.xml.formatters.PDFImageFormatter"; -ro-source: attr(data); }
This is a sample HTML document, showing how to embedd TIFF images:
<html> <head> <style> object[type="image/tiff"] { -ro-replacedelement: "com.realobjects.xml.formatters.PDFImageFormatter"; -ro-source: attr(data); } </style> </head> <body> <object alt="PDFreactor logo CMYK" data="PRlogoCMYK.tif" type="image/tiff" style="height: 3cm; border: 1px dashed red" /> <br /> <object alt="PDFreactor logo CMYK" data="PRlogoCMYK.tif" type="image/tiff" style="border: 1px dashed green" /> </body> </html>
Important: Java API Changes in PDFreactor version 2.0
You have to adjust your integration of PDFreactor, otherwise run-time errors will occur.
The main change of the PDFreactor 2.0 API when compared to the PDFreactor 1.0 API is that the PDFreactorConfiguration class does not exist anymore.
While you had to create a PDFreactorConfiguration object in version 1.0 to set specific PDFreactor settings, this is no longer necessary. All methods that were part of the PDFreactorConfiguration class can now directly be called within the PDFreactor class.
To illustrate this difference, here is a code sample which shows how to set the PDF Author tag in PDFreactor 1.x and version 2.0.
Old (Version 1.x):
PDFreactor pdfReactor = new PDFreactor(); PDFreactorConfiguration pdfReactorConfiguration = new PDFreactorConfiguration(); // In version 1.x, configurations settings are still specified using methods of PDFreactorConfiguration. pdfReactorConfiguration.setAuthor("Peter Sampler"); InputSource is = new InputSource("https://www.realobjects.com/"); FileOutputStream fileOutputStream = new FileOutputStream("realobjects.pdf"); pdfReactor.renderDocument(is,pdfReactorConfiguration,fileOutputStream); fileOutputStream.close();
New (Version 2.0):
PDFreactor pdfReactor = new PDFreactor(); // In version 2.0, configuration settings are specified directly using methods of PDFreactor. pdfReactor.setAuthor("Peter Sampler"); InputSource is = new InputSource("https://www.realobjects.com/"); FileOutputStream fileOutputStream = new FileOutputStream("realobjects.pdf"); pdfReactor.renderDocument(is,fileOutputStream); fileOutputStream.close();
As you can see, upgrading your integration to use the new API of PDFreactor version 2.0 is really simple. Just make sure all calls to PDFreactorConfiguration objects are replaced by calls to PDFreactor objects. Also remove the PDFreactorConfiguration parameter from the renderDocument call.
Additional new API methods have been introduced with PDFreactor 2.0, but this should have no effect on your integration. Also, some API methods are now deprecated and should no longer be used. For details about the API changes, please refer to the PDFreactor API documentation.
The bug fixes include:
The methods
int getRestrictions(void) void setRestrictions(int)
were removed. To set/get the PDF restrictions, please use the individual API methods.
The methods
String getUserStyleSheet(void) void setUserStyleSheet(String) ArrayList getUserStyleSheetUrls(void) void addUserStyleSheetUrl(String) void addUserStyleSheetUrl(ArrayList) void addUserStyleSheetUrl(String[]) void setUserStyleSheetUrl(ArrayList)were removed. They were replaced by
void addUserStyleSheet(org.w3c.css.sac.InputSource) void removeAllUserStyleSheets(void) ArrayList getAllUserStyleSheets(void)
which provide the same functionality, but offer more flexibility.
If you were using the removed API methods, please change your code to use the new methods.
E.g. to add a user style sheet from a URL, the old code was:
myConfig.addUserStyleSheetURL("http://test/mystyle.css");
The new code is:
myConfig.addUserStyleSheet( new org.w3c.css.sac.InputSource( "http://test/mystyle.css" ));