Package: collective.documentviewer
collective.documentviewerintegratesDocumentCloudviewer and PDF processing
intoPlone.ExamplesYou can be seen in action the functionality that implements this add-on
at the following sites:Example viewer:https://www.documentcloud.org/documents/3219331-FOIA-Request-17-OIG-015.htmlFeaturesVery nice document viewer.OCR.Searchable on OCR text.Works with many different document types.collective.celeryintegration.Lots of configuration options.PDF Album view for display groups of PDFs.Works withBesides displaying PDFs, it will also display:Word.Excel.Powerpoint.HTML.RTF.TranslationsThis product has been translated intoGerman.Spanish.Basque.French.Italian.Dutch.Simplified Chinese.You can contribute for any message missing or other new languages, join us atPlone Collective TeamintoTransifex.netservice with all world Plone translators community.InstallationInstall requirementsGraphicsMagick.ghostscript (version 9.0 preferred).Popplertesseract (optional)qpdfOpenOffice or LibreOffice (optional, for doc, excel, ppt, etc. types)md5 or md5sum command line tool.Installation on Cent OS/Red hatSpecial instructions for CentOS have been contributed by Eric Tyrer.
You can access them viathe git hub repo file location.Installation on DebianSpecial instructions for Debian have been contributed by Leonardo J. Caballero G.
You can access them via thegit hub repo file location.Issues installationIf on a Linux/Ubuntu/Debian machine you run into an error like:/var/lib/gems/1.9.1/gems/docsplit-0.7.2/lib/docsplit/image_extractor.rb:51:in `exists?': can't convert nil into String (TypeError)
from /var/lib/gems/1.9.1/gems/docsplit-0.7.2/lib/docsplit/image_extractor.rb:51:in `ensure in convert'This is because the ruby docsplit library is having an issue with the temp
folder accesses, and removal of temp files.   Just run the following command:sudo chmod 1777 /tmp && sudo chmod 1777 /var/tmpAnd retry the conversion of your documentDevelopmentNormal flow:git clone git@github.com:collective/collective.documentviewer.git

cd collective.documentviewer

virtualenv .

bin/pip install -r requirements.txt

bin/buildoutAsync IntegrationIt it highly recommended to install and configurecollective.celeryin combination with this package. Doing so will manage all PDF
conversions processes asynchronously so the user isn’t delayed
so much when saving files.SettingsThe product can be configured via a control panel itemDocument Viewer Settings.Some interesting configuration options:Storage TypeIf you want to be able to serve you files via Amazon Cloud,
this will allow you to store the data in flat files that
can be synced to another server.Storage LocationWhere are the server to store the files.OCRUsetesseractto scan the document for text. This process can be
slow so if your PDFs do not need to be OCR’d, you may disable.Auto Select LayoutFor PDF files added to the site, automatically select the
document viewer display.Auto ConvertWhen PDF files are added and modified, automatically convert.Auto layout file typesTypes that should automatically be converted to document viewer.Dexterity supportIf you want to use it with your own Dexterity content type. You need to edit
theFTIinZMI/portal_types/yourtypeto add “documentviewer” in
the available view methods like this:<property name="view_methods" purge="False">
  <element value="documentviewer"/>
</property>Also you need to set the primary field in the schema, for example:<field name="myfile" marshal:primary="true"
       type="plone.namedfile.field.NamedBlobFile">File storage integrationIf you choose to use basic file storage instead of ZODB blob storage,
there are a few things you’ll want to keep in mind.UseNginxto then serve the file system files. This might require
you install a local Nginx just for serving file storage on the
Plone server. You can get creative with how your file storage
is used though.Since in Plone’s delete operation, it can be interrupted and the deletion
of a file on the OS system system can not be done within a transaction,
no files are ever deleted. However, there is an action you can
put in acrontask to clean up your file storage directory. Just call the
urlhttp://zeoinstace/plone/@@dvcleanup-filestorage.Upgrading from page turnerIf you currently have page turner installed, this project will supercede
it. Your page turner views will work but no future files added to the site
will be converted to page turner.To convert existing view, on every page turner enabled file, there will
be a buttonDocument Viewer Convertthat you can click to manually
convert page turner to document viewer.To convert all existing views, go toportal_setupin the ZMI, upgrades,
selectcollective.documentviewer, click to show old upgrades and there
should be anupgrade-allstep to run.Tests statusThis add-on is tested using Travis CI. The current status of the add-on is:ContributeHave an idea? Found a bug? Let us know byopening a ticket.Issue Tracker:https://github.com/collective/collective.documentviewer/issuesSource Code:https://github.com/collective/collective.documentviewerDocumentation:https://www.documentcloud.org/AuthorsThis product was developed by Wildcard Corp. team.LicenseThe project is licensed under the GPLv2.Changelog6.0.3 (2023-05-17)Allow usage of extra parameters with qpdf usingDOCUMENTVIEWER_QPDF_PARAMETERSenvironment variable
[mpeeters]6.0.2 (2023-04-27)escape querystring search value [kleier]6.0.1 (2021-02-03)Improved uninstall.  [pbauer]6.0.0 (2020-05-12)Added Transifex.net service integration to manage the translation process.
[macagua]Updated Spanish translation.
[macagua]Updated the i18n support.
[macagua]Fix the download link for the document. #78
[b4oshany]Replaceddocsplit.  Instead call the various packages directly.
Seepull request #79.
[alphaomega325]Python 3, Plone 5.2 compatible
[vangheem]5.0.4 (2019-01-09)useplone.api.portal.getinstead ofgetToolByName[vangheem]5.0.3 (2018-12-11)Handle possible error with no celery installed
[vangheem]5.0.2 (2018-12-11)Fix to work with latest collective.celery
[vangheem]Fix issue breaking zoom on the 1st page of PDFs
[obct537]Add function and browser view (convert_all_unconverted) to convert all files, which haven’t been converted yet.
[thet]Do not break if no global request is set. Fixes #71
[ale-rt]Fix redundant condition
[ale-rt]Handle plone.app.contenttypes file indexing.
[thet]Add a custom migrator for plone.app.contenttypes and avoid converting while migrating to plone.app.contettypes.
[thet]Added support for libreoffice under Nixos, which uses a different folder name
for its conversion directories
[pysailor]5.0.1 (2017-07-16)Fix issue breaking zoom on the 1st page of PDFs
[obct537]5.0.0 (2016-09-02)log exception when pulling OCR text instead of completely erroring
[vangheem]5.0.0a1 (2016-08-05)plone 5/dexterity only now
[vangheem]4.1.0 (2017-05-15)Persist converted pdf and publish it as pdf/dump.pdf and @@pdf.
[jaroel]4.0.14 (2016-08-01)Added italian translation
[keul]Fixed JavaScript issue on Chrome: expected global variablesidebarwas not global
[keul]handle conflict errors in async processes better
[vangheem]4.0.13 (2016-07-22)hide doc viewer from screen readers since they won’t be able to make
sense of <img> tags for pdf pages.
[vangheem]4.0.12 (2016-07-22)Handle errors when searching
[vangheem]4.0.11 (2016-07-12)handle no blob found on content
[vangheem]4.0.10 (2016-06-30)fix release4.0.9 (2016-06-30)Handle file deleted to clean up files
[vangheem]fix not being able to hide sidebar
[vangheem]4.0.8 (2016-06-21)use checkboxes for auto layout
[vangheem]4.0.7 (2016-06-20)do not convert Image types
[vangheem]be able to completely hide contributor
[vangheem]4.0.6 (2016-01-27)make it so viewer can be responsive
[vangheem]4.0.5 (2016-01-25)reindex object after lead image is set so icon can be retrieved
[vangheem]4.0.4 (2016-01-25)fix celery conversation showing that it is still
converting
[vangheem]4.0.3 (2015-09-30)fix import of namedfile, restores older plone compatibility
[vangheem]4.0.2 (2015-09-30)fix support for archetypes
[vangheem]4.0.1 (2015-09-28)add lead image support
[vangheem]be able to use collective.celery for queuing tasks
[vangheem]fix async monitor registration
[pilz]4.0.0 (2015-09-09)fix Plone 5 compatibility
[vangheem]upgrade jquery.imgareaselect to latest
[vangheem]upgrade document viewer to latest
[vangheem]do not support upgrading from wildcard.pdfpal and wc.pageturner anymore. Use 3.x series
[vangheem]3.0.3 (2015-07-29)set response header on javascript variable file. Prevents js errors on chrome.
[vangheem]3.0.2 (2014-05-31)fix bug where it wouldn’t work with collective.geo.*
[vangheem]3.0.1 (2014-05-08)add german translation
[jhb]3.0a1 (2013-09-03)Add Dexterity compatibility. To enable it on your content type, you have
to define a primary field and add documentviewer in the available view
methods, see documentation.
[vincentfretin]Fix: users that can modify can now view info messages
and ‘annotations’/’sections’ feature.
[thomasdesvenain]Show contributor fullname if possible.
Contributor and organization are in a span.
[thomasdesvenain]Avoid replacing non-ascii characters by (?) during OCR process
for non english languages.
[thomasdesvenain]Plain text indexation is fixed for non converted contents.
[thomasdesvenain]When a new release of the document is currently generated,
user is notified by a status message.
[thomasdesvenain]2.2.2b3 (2013-05-31)i18n fixes + french translations
[thomasdesvenain]support to pass a document language to tesseract/docsplit based on a
configurable adapter implementing IOCRLanguage
[ajung]2.2.2b2 (2013-05-31)fix bug when using blob storage and text indexing is disabled
[gbastien]2.2.2b1 (2013-05-31)only use defaultFactory when supported. For older versions of zope.schema
[vangheem]2.2.2a1 (2013-05-31)added french translations
[gbastien]added enable_indexation parameter in global and local settings
Fixes :https://github.com/collective/collective.documentviewer/issues/21[gbastien]make local settings coherent regarding global settings
Fixes :https://github.com/collective/collective.documentviewer/issues/22[gbastien]2.2.1 (2013-03-12)fix use with latest libreoffice and docsplit.
Fixes:https://github.com/collective/collective.documentviewer/issues/11do not require docsplit to be installed on the
plone instance in order to display the viewer.
In case the document was converted on another
client.
[vangheem]2.2 (2013-02-06)fix z-index on viewer
[damilgra]2.2b2 (2013-01-10)fix getSite imports for plone 4.32.2b1 (2013-01-06)switch to using OFS.interfaces.IFolder for folder view
[vangheem]while pdf is converting, show existing if available.
[vangheem]move convert button to actions
[vangheem]2.2a2 (2012-10-01)another subsite fix
[vangheem]2.2a1 (2012-xx-xx)test for Plone 4.2 compatibility.
[hvelarde]work with subsites2.1b2 (2012-06-22)better handling of moving folders around2.1b1 (2012-06-22)be able to obfuscate file paths for file storage2.0.4 (2012-06-21)fix cleaning file locationfix potential tranversal error for file resources2.0.3 (2012-06-13)check for quota set before finding existing jobs.2.0.2 (2012-06-12)include contentmenu zcml dependencyupgrade conversion will now try and fix error’d conversions2.0.1 (2012-05-15)fixing batching on group view2.0.1b1 (2012-05-14)add support for new formats: star office, ps, photoshop, visio, palm2.0b1 (2012-05-11)add ability to add annotations and sections1.5.1 (2012-04-30)fix security on file resources1.5.0 (2012-04-29)no changes1.5.0b1 (2012-04-27)be able to move jobs to front of queueuse portal_catalog instead of uid_catalog so security
checks apply to resource urls.1.4.2 (2012-04-24)no changes, first final release1.4.1b3 (2012-04-23)create local catalog and index before syncing db to prevent
conflict errors.add redirect timeout to conversion info page1.4.1b2 (2012-04-23)make sure to close open file descriptorsChange “Original Document (PDF)” to “Original Document”emit event after conversiononly show queue link if managerconvert button should work for files that do not have
layout selected yetuse communicate instead of wait with popen in case
output is large. Prevents deadlocks.1.4.1b1 (2012-04-23)do not assume pdfpal is used along with pageturner
on data conversion.better command runnertrack errors better and display them in interface if something
happened during conversionnew file storage structure to prevent too many files from
being in one directory1.4b1 (2012-04-21)fix full screen button when text or pages selected.be able to customize batch size1.4a2 (2012-04-20)make sure to not use files with spaces1.4a1 (2012-04-20)be able to detect if pdf already has text in it
and do not OCR it if it does.1.3b2 (2012-04-20)use jQuery instead of $()1.3b1 (2012-04-20)default OCR to being off since it’s pretty slowbetter logging when looking for binary filesbe able to override width of viewer1.3a3 (2012-04-20)fix uninstall
[vangheem]1.3a2 (2012-04-19)fix async bug if it wasn’t installed
[vangheem]1.3a1 (2012-04-19)make sure to initialize catalog after db sync
for large PDFs.
[vangheem]better integrate with pdfpal and pageturner so
it’s easy to upgrade from those products.
[vangheem]1.2a2 (2012-04-19)fix setting custom quota for async queue
[vangheem]fix group view clear button
[vangheem]add support for alternative md5sum binary
[vangheem]1.2a1 (2012-04-19)fix full screen page bug
[vangheem]better async integration with quota setting
[vangheem]View async queue for conversions
[vangheem]index ocr data in portal catalog
[vangheem]better pdf group view with search
[vangheem]handle large files better
[vangheem]check if file has already been converted by storing
hash of the file to check against.
[vangheem]be able to remove document viewer conversion tasks
[vangheem]add ability to cleanup file storage files for deleted
plone File objects.
[vangheem]1.1a1 (2012-04-18)add pdf folder album view
[vangheem]fix async integration
[vangheem]1.0a2 (2012-04-17)add control panel icon
[vangheem]fix uninstall procedure
[vangheem]changing image type does not cause existing ones to fail.
[vangheem]1.0a1 (2012-04-17)Initial release