240 likes | 249 Views
Alfresco PDF Toolkit provides advanced features for handling and manipulating PDF documents within Alfresco. Developed by a dedicated project team, this toolkit includes actions, aspects, transformers, constraints, and UI enhancements for seamless PDF management. With over 4000 downloads, it offers tools like split, merge, insert, encryption, watermarking, and digital signatures. The project integrates with Alfresco Repository and Share Extensions, enhancing document management capabilities. Whether you need to split PDFs, apply digital signatures, or search for signed documents, the Alfresco PDF Toolkit offers a comprehensive solution. Formal releases and extension components like Actions and Advanced Search provide flexibility and customization options for efficient PDF management workflows.
E N D
Alfresco PDF Toolkit v1.0 • Nathan McMinn, Technical Consultant with Alfresco • Twitter: @ntmcminn • http://nathanmcminn.com
Alfresco PDF Toolkit – What and Why? • The Alfresco PDF Toolkit is a set of extensions for Alfresco that provides additional functionality around PDF documents
Alfresco PDF Toolkit – What and Why? • The Alfresco PDF Toolkit is a set of extensions for Alfresco that provides additional functionality around PDF documents. • The Alfresco PDF Toolkit project aims to create the most complete set of tools for PDF handling and manipulation available for Alfresco.
Alfresco PDF Toolkit – What and Why? • The Alfresco PDF Toolkit is a set of extensions for Alfresco that provides additional functionality around PDF documents. • The Alfresco PDF Toolkit project aims to create the most complete set of tools for PDF handling and manipulation available for Alfresco. • Over 4000 downloads since launch
Alfresco PDF Toolkit – Project Team • Jared Ottley – Project founder and maintainer • Created initial project including split, merge and append actions • Nathan McMinn – Committer • Contributed encryption, watermarking, digital signature and delete page actions, share extensions, Tiff -> PDF Transformer • Diego Liberalquino – Committer • Contributed fixes to digital signature action and UI • Nick Burch • Contributed iText plain text to PDF transformer
Extension Delivery • Alfresco Repository Extensions • Delivered as a standard repository AMP file • Alfresco Share Extensions • Currently delivered as an AMP, next release will likely be a JAR file instead Formal releases are available from the project’s download page, or build from head (using Maven) if you are feeling brave :-)
Extension Components • Actions • Aspects • Advanced Search • Transformers • Constraints • Share UI enhancements
Extension Components - Actions • PDF Actions • Split – splits a document every ‘n’ pages • Split at page – splits a document at a defined page • Insert – inserts the content of one PDF into another • Merge – Merges the contents of two PDF documents • Digital Signature – Apply a PDF digital signature • Encryption – Apply PDF encryption, set passwords and permissions • Watermarking – Apply a PDF Watermark in the form of an image or text with multiple formatting options
Extension Components - Aspects • pdft:signed • Applied when a document is signed using the toolkit • Records user, signature date, reason and location • Used in advanced search to find specific signed docs • pdft:encrypted • Applied when a document is encrypted using the toolkit • Records user and encryption date • Used in advanced search to find specific encrypted docs
Extension Components – Advanced Search • Signed PDFs • Search for signed documents by signer, date range, reason or location • All standard search options also remain available • Encrypted PDFs • Search for encrypted documents by person that encrypted the doc or encryption date range • All standard search options remain available
Extension Components - Transformers • Text to PDF • An iText based text to PDF transformer, supporting some basic text MIME types • Recognizes and transforms text/plain, text/csv and text/xml • TIFF to PDF • Transforms a TIFF image to a PDF document • Basic transformation only at this point, scaling options and multi-image TIFF support coming soon
Extension Components - Constraints • MapConstraint • Used by the toolkit to configure action constraints using a Map defined in Spring configuration • Examples include constraints for watermark visibility, encryption levels, etc • See module-context.xml for complete list of configured constraints
Extension Components – Share Extensions • Rules configuration • Action configuration form in content rules requires client-side customizations (document / folder pickers) • Content indicators • Used to show at a glance when a PDF has been encrypted or signed • Document Library Actions • All PDF Toolkit actions are available in both content rules and the document library (form service rocks!)
A Little About Share DocLib Actions • It is almost silly how easy it is to take a custom action and make it available as a Share Document Library Action
Share DocLib Action Configuration • <action id="pdf-encryption”type="javascript" • label="actions.pdftoolkit.encryptPDF"> • <param name="function">onActionFormDialog</param> • <param name="itemKind">action</param> • <param name="itemId">pdf-encryption</param> • <param name="mode">create</param> • <param name="destination">{node.nodeRef}</param> • <param name="successMessage">message.pdf-encryption.success</param> • <param name="failureMessage">message.pdf-encryption.failure</param> • <evaluator>evaluator.pdftoolkit.doclib.action.pdfToolkitMimetype</evaluator> • </action>
Share DocLib Action Configuration • <action id="pdf-encryption”type="javascript" • label="actions.pdftoolkit.encryptPDF"> • <param name="function">onActionFormDialog</param> • <param name="itemKind">action</param> • <param name="itemId">pdf-encryption</param> • <param name="mode">create</param> • <param name="destination">{node.nodeRef}</param> • <param name="successMessage">message.pdf-encryption.success</param> • <param name="failureMessage">message.pdf-encryption.failure</param> • <evaluator>evaluator.pdftoolkit.doclib.action.pdfToolkitMimetype</evaluator> • </action>
Using the Actions from the JavaScript API • Use the existing “actions” JavaScript object • Example: //get the pdf to watermark and the destination folder var pdf_to_watermark = <a scriptnode> var dest_folder = <a scriptnode> //create an action instance var watermark_action = actions.create("pdf-watermark"); //set the required parameters watermark_action.parameters["destination-folder"] = dest_folder; watermark_action.parameters["watermark-text"] = "Test111"; watermark_action.parameters["watermark-type"] = "text"; watermark_action.parameters["watermark-pages"] = "all"; watermark_action.parameters["watermark-depth"] = "under"; watermark_action.parameters["watermark-font"] = "Courier"; watermark_action.parameters["watermark-size"] = "34"; watermark_action.parameters[“position”] = “center” //execute the configured action watermark_action.execute(pdf_to_watermark);
Alfresco PDF Toolkit - Feature requests? What would
Alfresco PDF Toolkit:htthttp://code.google.com/p/alfresco-pdf-toolkit/Want to know when we release? Follow the project team on Twitter!@jottley@ntmcminn