Alfresco
  1. Alfresco
  2. ALF-5322

Option to use browser PDF plugin instead of WebPreview.swf in document details

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 3.3 Community, 3.3g Community, 3.3 Enterprise, 3.4.a Community
    • Fix Version/s: None
    • Security Level: external (External user)
    • Labels:
      None

      Description

      pdf2swf doesn't always work for user-uploaded PDFs:

      • Many CJK font rendering issues
      • Barfs when a PDF is set "Do not Copy" or "Do not Print"

      It would make my users very happy if they could see the PDF in-browser using a popular PDF plugin.

      Summary:

      1. On document details page: If the file type is PDF and the client browser has a PDF plug-in installed (Acrobat, Foxit, Safari/mac):
      2. Then display the PDF as an <object type="application/xpdf> instead of the Flash object

      My company is currently dealing with hundreds of PDFs that don't display properly in Alfresco for above reasons. PDFs are supplied by vendors, so fixing them is going to be difficult.

        Activity

        Hide
        Irving Popovetsky added a comment -

        To add some more fuel to this fire:
        1. See this thread: http://lists.nongnu.org/archive/html/swftools-common/2010-10/msg00051.html

        swftools on Linux can't seem to handle embedded PDF fonts where the font name itself is non-latin. This applies to most PDFs produced in Chinese. The fonts (TrueType CIDType2) are unreadable.

        2. and this thread: http://lists.nongnu.org/archive/html/swftools-common/2010-10/msg00055.html

        pdf2swf is still statically linked to xpdf, making it vulnerable to the latest raft of xpdf vulnerabilities. At this point the fix is only available in swftool's git repository. Until swftools starts dynamically linking against an OS vendor-maintained libpoppler, it should be considered a security liability.

        Show
        Irving Popovetsky added a comment - To add some more fuel to this fire: 1. See this thread: http://lists.nongnu.org/archive/html/swftools-common/2010-10/msg00051.html swftools on Linux can't seem to handle embedded PDF fonts where the font name itself is non-latin. This applies to most PDFs produced in Chinese. The fonts (TrueType CIDType2) are unreadable. 2. and this thread: http://lists.nongnu.org/archive/html/swftools-common/2010-10/msg00055.html pdf2swf is still statically linked to xpdf, making it vulnerable to the latest raft of xpdf vulnerabilities. At this point the fix is only available in swftool's git repository. Until swftools starts dynamically linking against an OS vendor-maintained libpoppler, it should be considered a security liability.
        Hide
        Irving Popovetsky added a comment -

        pdf2swf has gotten much better in the past year, however many users still complain about the CPU usage of Flash making their fans run when viewing complex documents transformed by Alfresco.

        http://pdfobject.com/ seems like an elegant way to handle this, since Alfresco must transform everything to PDF anyway before converting to swf.

        Looking to the future, we may not need a PDF or Flash plugin at all: https://github.com/andreasgal/pdf.js

        Alfresco already has the best document previewing of any DMS. This is a great way to stay ahead of the competition.

        Show
        Irving Popovetsky added a comment - pdf2swf has gotten much better in the past year, however many users still complain about the CPU usage of Flash making their fans run when viewing complex documents transformed by Alfresco. http://pdfobject.com/ seems like an elegant way to handle this, since Alfresco must transform everything to PDF anyway before converting to swf. Looking to the future, we may not need a PDF or Flash plugin at all: https://github.com/andreasgal/pdf.js Alfresco already has the best document previewing of any DMS. This is a great way to stay ahead of the competition.
        Hide
        Peter Löfgren added a comment -

        FYI There is a working implementation of a pdf.js based viewer in Share Extras http://code.google.com/p/share-extras/source/browse/#svn%2Ftrunk%2FSandbox%2FViewer%20Extension. The plan is to merge this viewer into existing Media Viewer extension in Share Extras, so if you hit the link above and doesn't find it the merge has been done. Just look around to find it.

        Features are view documents using pdf.js or use build in pdf viewers, all configurable. The viewer tries to detect if built in viewers are present, if not fallback to old flash viewer. Non pdf documents are transformed to pdf before viewing (if possible).

        Show
        Peter Löfgren added a comment - FYI There is a working implementation of a pdf.js based viewer in Share Extras http://code.google.com/p/share-extras/source/browse/#svn%2Ftrunk%2FSandbox%2FViewer%20Extension . The plan is to merge this viewer into existing Media Viewer extension in Share Extras, so if you hit the link above and doesn't find it the merge has been done. Just look around to find it. Features are view documents using pdf.js or use build in pdf viewers, all configurable. The viewer tries to detect if built in viewers are present, if not fallback to old flash viewer. Non pdf documents are transformed to pdf before viewing (if possible).
        Hide
        Douglas Cassiano Rodrigues Paes added a comment -

        We have a lot of problem during pdf convertion to swf, most of them because of the JBIG2 image compression.
        Or decision was to disable the webpreview because we could not deliver the system with this kind of problem. It's strange and hard to explain to our customers that some documents are correctly converted, and another one not.

        Show
        Douglas Cassiano Rodrigues Paes added a comment - We have a lot of problem during pdf convertion to swf, most of them because of the JBIG2 image compression. Or decision was to disable the webpreview because we could not deliver the system with this kind of problem. It's strange and hard to explain to our customers that some documents are correctly converted, and another one not.
        Hide
        sharif added a comment -

        Alfresco should just get rid of flash and look towards html5

        Show
        sharif added a comment - Alfresco should just get rid of flash and look towards html5

          People

          • Assignee:
            Mike Farman
            Reporter:
            Irving Popovetsky
          • Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Date of First Response: