Jared Ottley

Technology | Fatherhood | Insanity

Alfresco PDF Toolkit

with 26 comments

A few weeks ago I made my first release of what I am calling the Alfresco PDF Toolkit on Google Code.

Alfresco PDF Toolkit, or as I originally named it, pdf-extension, has been around for a while.  It was originally hosted on my SVN server and in then in my Alfresco SVN Repo.  It was developed as a one-off side project at the request of an early Alfresco customer.  The code has been sitting around with very few updates since that time.  An occasional rebuild to make sure it would work with a new release of Alfresco but that was it. (I think it was original built for 2.1 or 2.2)

Why the update? Focused attention.  It is a way to get my hands dirty and adding some new features that have been rattling around in my head for a while now.

What can it do? This initial release has three functions:

  • Split PDF — This option allows you to split a PDF every specified number of pages
  • Split at Page — This option allows you to split a PDF at a specified page
  • Merge PDF — This options allows you to append a PDF to another PDF

All three options generate new PDFs leaving the originals untouched.

Where can I find these actions? The actions are available in the Run Action Wizard.  They use the same names as above.

What does the future hold? The current list of enhancements is as follows (bot not necessarily in this order):

  • PDF Watermarks / Rubber stamping
  • Digital Signatures
  • TIFF to PDF transformation
  • Extract Pages
  • Delete Pages
  • Transform to PDF/A

Can I help? Yes!  I’m more than happy to accept code contributions or add features the list of enhancements.  And of course, merit can make you a contributor.

Where can I find the code or the AMP again? In the Google Code Project: Alfresco PDF Toolkit

Note: This is NOT an officially supported Alfresco Project.

Written by jared

February 25th, 2010 at 8:39 pm

Posted in Alfresco

Tagged with , ,

26 Responses to 'Alfresco PDF Toolkit'

Subscribe to comments with RSS or TrackBack to 'Alfresco PDF Toolkit'.

  1. I noticed the PDF Toolkit when browsing the Alfresco tag on Google Code the other day. I may find it useful and I may contribute in the future. I’m particularly interested in PDF/A.

    Ken Geis

    25 Feb 10 at 10:03 pm

  2. Thomas Broyer

    26 Feb 10 at 2:14 am

  3. How to use this module?? can any1 place eye??

    Atish

    1 Apr 10 at 5:07 am

  4. Not sure I understand the question….

    jared

    11 May 10 at 12:50 pm

  5. One can take any tiff document and convert to pdf by using an ocr utility.
    How can a scanned pdf be converted in a similiar manner ?
    By using the example on alfresco to convert dwg2pdf a tiff document can be converted by giving the following

    image/tiff

    application/pdf

    If I give source as application/pdf and target as application/pdf would it work ?

    Edward Lobo

    7 Jul 10 at 11:14 am

  6. You need to make sure you mime-types are correct. PDF to PDF would not be that useful. Tiff to PDF might work OTB. The little research that I’ve done it so far seems to indicate that ImageMagick might need a specific set of parameters (especially when handling multi page tiffs).

    So it might work with just the addition of a new mimetype….some simple testing would let you know for sure.

    jared

    3 Aug 10 at 11:10 pm

  7. I imported alfresco-pdf-toolkit-0.9.amp into the “Company Home” directory but nothing happened. Am I doing something wrong? I really want to play with this tool, it sounds like it’s going to be cool. Please advise what to do.
    Thanks!

    Lucille

    17 Aug 10 at 8:58 am

  8. @lucille: amp files are applied from the commandline against the Alfresco code base. Review http://wiki.alfresco.com/wiki/Module_Management_Tool for instructions on installing amp files

    jared

    24 Aug 10 at 12:38 pm

  9. i like to contribute if i can, like i have worked in something like this converting tiff to pdfs,merge pdfs using the itext library

    Sunil B

    4 Nov 10 at 12:23 am

  10. Hi, I’d like to contribute on pdf-toolkit. I’m implementing an extension of this amp for action call’s only on pdf files.

    Ricardo Custodio

    23 Nov 10 at 1:43 pm

  11. Great! Let us know when you are ready…and we’ll get you setup.

    jared

    23 Nov 10 at 1:57 pm

  12. Will a newer version supporting Alfresco 3.4 be released soon?

    Adrian Mitev

    10 Mar 11 at 2:01 am

  13. No timeline yet…but we are working towards it.

    jared

    14 Mar 11 at 9:30 pm

  14. Is it not supported on 3.4 ?

    pleone

    16 Mar 11 at 8:33 am

  15. Hi Jared,

    I met you at Alfresco DevCon, London, and you pointed me to alfresco-pdf-toolkit. I just installed the version 0.97 on Alfresco community 4.0b, on Linux. I tested the “append-pdf” action an it’s working just fine. Thanks.

    Now, after applying the amp, it claimed to have installed version 0.96, just a typo I guess.

    I also posted on the forums of Alfresco an example of running the action from webscripts

    https://forums.alfresco.com/en/viewtopic.php?f=36&t=41848

    cheers

    Boriss Mejias

    17 Nov 11 at 9:37 am

  16. Hi Jared. Please, tell us the system requirements (and write them on the google code page too).
    Is alfresco 4.0 compatible ? We risk to damage a working system if it wasn’t.

    Regards

    Borgo

    28 Dec 11 at 9:18 am

  17. Hi, would you be interested in developing a tool to extract info from Microsoft files stored in Alfresco?

    Conrad

    10 Apr 12 at 8:40 pm

  18. @Conrad Because I am an Alfresco employee I can’t directly engage in outside contracting around Alfresco. I can definitely point you at some internal…or possibly outside resources.

    jared

    11 Apr 12 at 4:05 pm

  19. Hi I’m trying to execute pdf-append from webscript but no file is created, my code below:

    var nodes = search.luceneSearch(“PATH:\”/app:company_home/st:sites/cm:proacta/cm:documentLibrary/cm:skany/cm:Faktury/cm:Split/cm:co2strony//*\” AND TYPE:\”{http://www.alfresco.org/model/content/1.0}content\” AND NOT ASPECT:\”sys:hidden\”");
    for each(var node in nodes) {

    var doc = searchForOneFile(“/app:company_home/st:sites/cm:proacta/cm:documentLibrary/cm:skany/cm:Faktury/cm:Split/cm:co2strony//*\”",node.name);
    if (doc)
    {
    combineFiles(doc,node)
    };
    }

    function combineFiles(doc1,doc2)
    {
    var dest_folder=doc1.parent;

    var pdfmerge= actions.create(“pdf-append”);
    pdfmerge.parameters["destination-folder"]=dest_folder;
    pdfmerge.parameters["target-node"]=doc1.nodeRef;
    pdfmerge.parameters["destination-name"]=”aaaaa”;
    pdfmerge.execute(doc2.nodeRef);

    }

    Pablo

    20 Apr 12 at 5:30 am

  20. hello
    How is added this file

    mohamamd

    11 May 12 at 11:56 am

  21. Hi Pablo, There is an update to the toolkit that will help to fix the issue.

    jared

    13 Jul 12 at 12:08 pm

  22. You’ll need to use the apply amps scripts or directly use alfresco-mmt to install the amp file into the war file of Alfresco.

    jared

    13 Jul 12 at 12:09 pm

  23. Hello,

    I’ve installed alfresco-pdf-toolkit in Alfresco Community v4.0.0 (4003) schema 5025.

    First I’ve imported amp files:

    # java -jar /web/alfresco/bin/alfresco-mmt.jar install /root/amp/ /web/alfresco/tomcat/webapps/share.war -verbose -directory

    And checked it:

    # java -jar /web/alfresco/bin/alfresco-mmt.jar list /web/alfresco/tomcat/webapps/share.warModule ‘alfresco-share-pdf-toolkit’ installed in ‘/web/alfresco/tomcat/webapps/share.war’
    – Title: Alfresco PDF Toolkit Share Extensions
    – Version: 1.0.0.57
    – Install Date: Mon Oct 08 11:03:27 VET 2012
    – Description: Alfresco PDF Toolkit Share Extensions
    Module ‘org.alfresco.module.RecordsManagement’ installed in ‘/web/alfresco/tomcat/webapps/share.war’
    – Title: Records Management
    – Version: 1.3
    – Install Date: Wed Apr 25 05:13:32 VET 2012
    – Description: Alfresco Record Management Extension
    Module ‘org.alfresco.extension.pdftoolkit’ installed in ‘/web/alfresco/tomcat/webapps/share.war’
    – Title: Alfresco PDF Toolkit
    – Version: 0.98.28
    – Install Date: Mon Oct 08 11:03:11 VET 2012
    – Description: Alfresco PDF Toolkit adds additional functionality to Alfresco allow you to work with PDF files.

    After that, I can see the PDF Toolkit features in share frontend but If I click on any of it I get this error in catalina.out and only title of the form is presented in website:

    2012-10-08 11:08:25,883 ERROR [scripts.forms.FormUIGet] [http-8080-61] org.alfresco.repo.forms.FormNotFoundException: 09080008 A form could not be found for item: [action]pdf-split
    2012-10-08 11:11:48,949 ERROR [scripts.forms.FormUIGet] [http-8080-61] org.alfresco.repo.forms.FormNotFoundException: 09080016 A form could not be found for item: [action]pdf-encryption
    2012-10-08 11:11:51,553 ERROR [scripts.forms.FormUIGet] [http-8080-61] org.alfresco.repo.forms.FormNotFoundException: 09080017 A form could not be found for item: [action]pdf-watermark

    I’ve tried installing the previous versions but the same error happens. If I try to add the PDFToolkit Signed and PDFToolkit Encripted y also get an error “Could not update aspects”.

    Thanks in advance.
    Best regards.

    Alex

    8 Oct 12 at 9:51 am

  24. Issue solved,

    The key is to install the amps through the script /web/alfresco/bin/apply_amps.sh instead of manually.

    best regards

    Alex

    11 Oct 12 at 10:16 am

  25. Hi,

    e-sing feature avail for alfresco 4 + versions? If yes,
    Please let me know how to enable it and where can I find the packages?

    Rinu

    27 Nov 12 at 3:39 am

  26. jared

    30 Nov 12 at 6:26 am

Leave a Reply