Package: pdfreactor.plone
This Add-On package integrates thePDFreactorclient API byRealObjects,
as provided by thepdfreactor-apipackage, into Plone.To effectively make use of it, you’ll needa runningPDFreactorserverthe keys needed to access it;
depending on the server configuration:the license key (fromRealObjects; seehttps://www.pdfreactor.com/buy/)
(unless installed on the server)andan API key, if required by the server.FeaturesA simple@@as.pdfbrowser view for contentish objects
(providing a synchronous PDF export with standard options)A custom form@@pdfreactor-connection-settingsto edit theconnectionsettings (which are stored in the Plone registry)A simple@@pdfreactor-configview to provide basicconversionsettings
(i.e., the Zope cookies which are needed to create PDF exports from
restricted contents)For a package providing customizable conversion settings in the registry as
well, see below.A simple CSS stylesheet which is used by the default configuration to
suppress uninteresting page partsInstallationPlone environments are typically built usingzc.buildout;
so add to yourbuildout.cfgscript:[buildout]
...
eggs =
    pdfreactor.ploneand then runbin/buildout.This will get you thepdfreactor-apipackage as well.After restarting your Zope instance, you’ll find the package in
the Quick-Installer or
the Plone Add-Ons view.After installing (oractivating) the package there,
visit the@@pdfreactor-connection-settingsview of your Plone instanceto customize your PDFreactor connection settings
(URL and license and / or API key).For installation instructions regarding the PDFreactor service itself, please
refer toPDFreactor Support.CustomizationZope / PloneYou have several options:You may subclass our .base.Exporter BrowserView class
(which provides the@@as.pdfview)
and override some of it’s methods,
e.g.converted_urlconversionSettingsYou may connect our BrowserView class or subclasses of it
to more specific interfaces than IContentish.
(You might need a layer interface to avoid configuration conflicts).You may override the@@pdfreactor-configview to modify the conversion
options (generally, or by interface).One add-on package to get a global “TTW” customizable configuration ispdfreactor.parsecfg.Please refer to the Zope / Plone documentation for instructions how to do this.PDFreactorFor the details about the supported methods and configuration options of thePDFreactoritself,
please refer to the documentation byRealObjects GmbH:PDFreactor Web service documentationSupportIf you are having issuesconcerning this Plone integration,
please let us know;
please use theissue trackermentioned above.For issues regarding thePDFreactoritself, please refer toRealObjects GmbH:PDFreactor Support CenterContribute(To this Plone integration package:)Issue Tracker:https://github.com/visaplan/pdfreactor.plone/issuesSource Code:https://github.com/visaplan/pdfreactor.ploneLicenseThe project is licensed under the MIT License.AuthorTobias Herp,tobias.herp@visaplan.comChangelog1.0.4 (2023-12-08)Miscellaneous:Add__noduplicateto the list of cookies.This is important if you use theno_duplicate_loginPAS plugin
(Products.NoDuplicateLogin);
otherwise, creation of PDF documents or screenshots might fail.
Or the PDFreactor might kick you out.[tobiasherp]1.0.3 (2023-04-05)New Features:The .base.Exporter class now provides an own.convertmethod
which acceptsbinary,asyncandstreamarguments
and calls the appropriate conversion method internally.Currently, it will returnNone, if astreamwas given,binary data, ifbinarywas given (and notstream), andthe document_id, ifasyncwas given, andadictwith all meta information contained otherwise.Improvements:The .base.Exporter class now provides (and uses) aconversionSourcemethod which in turn uses the existingconverted_urlmethod.Note:if providing text instead of a URL as thedocumentconfig key,
you likely need to specify abaseUrlas well; otherwise the reactor
might fail to load stylesheets or images during conversion.Development hints:When developing and testing yourPDFreactorconversions,
be sure you have more than one Zope worker thread ready;
otherwise you might wonder about HTTP errors
when the reactor sends requests to your instance!We provide the original API (from thePDFreactordistribution) as.raw_apimodule (for development and testing;
helps to check whether a certain problem
is related to our pythonization measures).Just in case.[tobiasherp]1.0.2 (2023-01-20)New Features:ForMathMLsupport:added a@@pdfreactor-mathjax-vars.jsview (for configuration),
anda++resource++pdfreactor.plone/mathjax2-run.jsscript to easeMathJaxintegration.This is not configurable yet, but will likely be, soon.Note:PDFreactor v11.6.3(2023-03-07) contains a fix
to a bug which causedMathMLexports as “continuous media” to fail.The @@as.pdf method supports amethodoption; e.g., call.../my/page/@@as.pdf?method=@@from-screenshotto create a PDF file from.../my/page/@@from-screenshot.[tobiasherp]1.0.1 (2022-09-20)Miscellaneous:TheconnectionSettingsmethod doesn’t return any cookies anymore
because the Zope cookies are consideredconfiginformation.The .base.Exporter provides agetZopeCookiesmethod now
for use in derived view classes which override theconversionSettingsmethod to not use @@pdfreactor-config.[tobiasherp]1.0.0 (2022-07-12)Initial release.
[tobiasherp]