cancel
Showing results for 
Search instead for 
Did you mean: 

PDF/A Format

fdesrosiers
Champ in-the-making
Champ in-the-making
Customer would like to know about the PDF/A format.  See http://www.pdfa.org
for the format.

It is the new archiving format that has some rules.

Does Alfresco support this format if not when?

Fred
4 REPLIES 4

cneto
Champ in-the-making
Champ in-the-making
Hello,

I have the same requirement…

When will Alfresco transform documents in to pdf-a?

jottley
Confirmed Champ
Confirmed Champ
We don't support this OTB, but the basics are in place to support this.  OpenOffice (which is one of the document transformation services we support) has had support for PDF/A since its 2.4 release.

What needs to happen in order to support this is 1) there needs to be a way to specify the target format from the UI (in the Rules Engine). 2) The OpenOfficeContentTransformer class (found in projects/repository/source/java/org/alfresco/repo/content/transform) needs to be extended in order to pass the needed export options.

1) I'll leave how you want to approach this up to you, but start by looking here: http://wiki.alfresco.com/wiki/Content_Transformations

2) Most of the work is done for this part.  What needs to be added are the export options.  We need to specify the export filter: SelectPdfVersion and the version type: PDF 1.4 (the default value) or PDF/A-1 (ISO 19005-1:2005) – our desired target.  Each is specified as an int value of 0 or 1 respectively.  Within the OpenOfficeContentTransformer class the targetFormat variable which if of object type DocumentFormat.

Basically, what needs to be added is:
Map<String,Object> pdfExportOptions = new HashMap<String,Object>();
pdfExportOptions.put("SelectPdfVersion", 1);
targetFormat.setExportOption(DocumentFamily.TEXT, "FilterData", pdfExportOptions);

This should get you moving in the right direction.  Check out the following for further references:
  • OpenOffice supported export filter options - http://svn.services.openoffice.org/ooo/branches/OOO310/officecfg/registry/schema/org/openoffice/Offi...
  • JDOConverter API - http://jodconverter.sourceforge.net/api/
  • OpenOfficeContentTransformer API - http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/content/transform/OpenOffice...
  • debaser
    Champ in-the-making
    Champ in-the-making
    I'm trying to do this in Alfresco 3.2 Labs. I modified the file OpenOfficeContentTransformerWorker (a renamed version of OpenOfficeContentTransformer i guess?). But I can't use the code above. The following is possible to use:
    Map<String,Object> pdfExportOptions = new HashMap<String,Object>();
    pdfExportOptions.put("SelectPdfVersion", 1);
    targetFormat.setExportOption("FilterData", pdfExportOptions);

    But when I execute the transformation action I get the following error:
    Please correct the errors below then click Finish.

        * Failed to run Actions due to error: 06070003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2009/7/7/10/6/f65fde9b-f372-4aa3-9ae8-f13b02a802a5.bin, mimetype=application/vnd.oasis.opendocument.spreadsheet, size=48190, encoding=utf-8, locale=en_US] writer: ContentAccessor[ contentUrl=store://2009/7/7/10/38/66c5e190-a6bf-46ee-bcb1-03c7ea54fffc.bin, mimetype=application/pdf, size=0, encoding=utf-8, locale=en_US] options: org.alfresco.service.cmr.repository.TransformationOptions@19957d3

    Is it possible that I might use the code at the wrong place? I've put it on line 225 at the moment.

    And why doesn't the code jottley wrote work? targetFormat.setExportOption just accepts two arguments.

    shazada
    Star Contributor
    Star Contributor
    I've researched and found a way to give all export parameters in just alfresco\WEB-INF\classes\alfresco\mimetype\openoffice-document-formats.xml.

    With this, 'all' the documents will be exported in format PDF/A-1.

    Original:
    <document-format><name>Portable Document Format</name>
        <mime-type>application/pdf</mime-type>
        <file-extension>pdf</file-extension>
        <export-filters>
    <entry><family>Presentation</family><string>impress_pdf_Export</string></entry>
          <entry><family>Spreadsheet</family><string>calc_pdf_Export</string></entry>
          <entry><family>Text</family><string>writer_pdf_Export</string></entry>
        </export-filters>
    </document-format>

    modified:
      <document-format><name>Portable Document Format</name>
        <mime-type>application/pdf</mime-type>
        <file-extension>pdf</file-extension>
        <export-filters>
    <entry><family>Presentation</family><string>impress_pdf_Export</string></entry>
          <entry><family>Spreadsheet</family><string>calc_pdf_Export</string></entry>
          <entry><family>Text</family><string>writer_pdf_Export</string></entry>
        </export-filters>
    <!–Give all the export options you need –>
        <export-options>
          <entry><string>SelectPdfVersion</string><int>1</int></entry>
        </export-options>
      </document-format>

    De options are written on the Wiki of OpenOffice: http://wiki.services.openoffice.org/wiki/API/Tutorials/PDF_export

    Atleas this was sufficient for me  Smiley Happy .
    Getting started

    Tags


    Find what you came for

    We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.