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

preview/pdfjs renders blank pdf documents #419

Open
lurodrig opened this issue Apr 29, 2022 · 0 comments
Open

preview/pdfjs renders blank pdf documents #419

lurodrig opened this issue Apr 29, 2022 · 0 comments

Comments

@lurodrig
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant