PDFreactor configuration parser
Project description
This package provides a parsing facility for the PDFreactor client API, as provided by the pdfreactor-api package.
To effectively make use of it, you’ll need
a license key (from RealObjects; see https://www.pdfreactor.com/buy/)
a running PDFreactor server
some PDFreactor integration for your framework (or have a look at the example scripts to do it yourself); when using Plone, you may use the pdfreactor.plone package.
Features
A parse_configuration function
In a Plone context, a pdfreactor-config browser view to make basic use of it, i.e. producing a config dictionary from:
a site-global textual conversion configuration which is stored in the Plone registry.
Examples
The textual configuration could for example look like:
# line comments are possible outputFormat = { width: 640, # and so are eon-of-line comments type: OutputType.PNG_TRANSPARENT, }
The symbols defined by the PDFreactor API class are recognized, so this would be converted to the following config dictionary:
{'outputFormat': { 'width': 640, 'type': 'PNG_TRANSPARENT', } }
This doesn’t look very magic, but it saves you from finding a way to save settings for each possible key; you just need one configuration string.
On the values side, we’ll accept valid configuration symbols only (case sensitively, so OutputType.png_transparent would cause an error) or valid Python string or number tokens; for conveniense, several common names for true, false and nothing are accepted (case-insensitively).
Documentation
Installation
Simply install the configuration parser by using pip:
pip install pdfreactor.parsecfg
or, for projects using buildout, add to your buildout.cfg script:
[buildout] ... eggs = pdfreactor.parsecfg
and then run bin/buildout.
Plone integration
After restarting your Zope instance with pdfreactor.parsecfg (and, likely, pdfreactor.plone) added to your eggs, simply use the Plone Add-Ons view or the Quick-Installer to activate it.
Then you may use the configuration registry and use the IPdfReactorConversionSettings prefix to adjust your conversion preferences.
Possible values
For the values which will be recognized by the PDFreactor backend, please refer to the documentation by RealObjects GmbH:
If, for example, the documentation for the debugSettings model tells you about the boolean properties appendLogs, attachConfiguration, attachDocuments, attachResources, forceResult and all, this means that you may configure e.g.:
debugSettings.all = on
or:
debugSettings = { appendLogs: yes, forceResult: true, }
Support
If you are having issues concerning this configuration parser, please let us know; please use the issue tracker mentioned above.
For issues regarding the PDFreactor itself, please refer to RealObjects GmbH:
Contribute
(To this configuration parser package:)
Issue Tracker: https://github.com/visaplan/pdfreactor.plone/issues
Source Code: https://github.com/visaplan/pdfreactor.plone
License
The project is licensed under the MIT License.
Changelog
1.0.0 (unreleased)
Initial release. [tobiasherp]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pdfreactor.parsecfg-1.0.0.dev4.tar.gz
.
File metadata
- Download URL: pdfreactor.parsecfg-1.0.0.dev4.tar.gz
- Upload date:
- Size: 39.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd366df40af025e1f3b63e2f8c4d5548c23bca12be320c982df6b5d1ac1e1c01 |
|
MD5 | c0664a56d1ee5abc723b4cdc7ce953fb |
|
BLAKE2b-256 | 1915288c09328ccb24951e382b86c1609d3521bfa60df2d764d2c1e089588379 |