Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

preview/pdfjs renders blank pdf documents  #419

Description

@lurodrig

Hello there,

FROM alfresco/alfresco-governance-share-community:7.1.0

How to reproduce it:

  1. Take this pdf from pdf completely rendered blank mozilla/pdf.js#9285
  2. Uploading to any of your sites, e.g. /myfiles
  3. Check the uploaded document: share/page/document-details?nodeRef=workspace://SpacesStore/XXXXX
  4. Document renders blank

Problem: the pdfjs used by /share is rendering blank pdf documents:
pdfjs-blank

Workaround:

  1. Upgrade version of pdfjs
  2. We included the above dockerfile as a builder in our custom one for share like this FROM pdfjs-build:1.0.0 as pdfjs-builder
  3. Apply this patch to the PdfJs.js in share all kudos to Axel, thanks!
FROM alfresco/alfresco-governance-share-community:7.1.0
.../...
# Update pdfsjs (see docker-pdfjs-builder/Dockerfile)
# This last pdfjs version requires some hacks in the alfresco's pdfjs script
RUN rm $TOMCAT_DIR/webapps/share/components/preview/PdfJs-min.js
COPY preview/PdfJs.js $TOMCAT_DIR/webapps/share/components/preview/PdfJs.js
# Remove the alfresco built-in one
RUN rm -fr $TOMCAT_DIR/webapps/share/components/preview/pdfjs
# Copy the pdfjs "artifact" created in the builder container
COPY --from=pdfjs-builder /tmp/pdfjs $TOMCAT_DIR/webapps/share/components/preview/pdfjs

It would be very cool if you guys could include a patch in a future release :)

Thanks in advance,

Luis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions