I’m facing an issue while trying to open a PDF preview inside Nuxeo. The viewer shows the following error from PDF.js:
PDF.js v2.12.313 (build: a2ae56f39)
Message: Unexpected server response (500) while retrieving PDF
http://localhost:8080/nuxeo/api/v1/repo/default/id/ce4202f5-f247-4add-a43d-19e87d295c79/@rendition/pdf?clientReason=view.
Environment
Nuxeo Version: LTS 2021
@Manish7320
The 500 response comes from the Nuxeo server when it tries to generate the @rendition/pdf. PDF.js only reports the HTTP error; the root cause is in the server‑side processing (Aspose.PDF rendition).
Next steps to isolate the problem
-
Check Nuxeo server logs (nuxeo.log or log4j2.xml output) for the request
GET /nuxeo/api/v1/repo/default/id/<doc-id>/@rendition/pdf?clientReason=view.
Look for a stack trace that mentions Aspose.PDF (e.g., com.aspose.pdf.*).
-
Verify Aspose.PDF license – an invalid or missing license can throw a server‑side exception when rendering PDFs.
-
Confirm the Aspose.PDF version used in your Nuxeo installation. Nuxeo LTS 2021 is compatible with Aspose.PDF 20.x‑21.x; older versions may fail on certain PDFs.
-
Test the PDF directly with Aspose.PDF (outside Nuxeo) to ensure the file itself is not corrupted:
Document pdf = new Document("path/to/file.pdf");
pdf.save("out.pdf");
If this throws an exception, the PDF content is the issue.
-
Rendition configuration – ensure the PDF rendition is enabled in nuxeo.conf (e.g., nuxeo.rendition.pdf.enabled=true) and that no custom automation chain overrides the default behavior.
What to provide if the issue persists
- Nuxeo version (you already have LTS 2021) and exact Aspose.PDF jar version.
- Full stack trace from the server log for the failing request.
- A minimal sample PDF that reproduces the error (if possible).
With that information we can pinpoint whether it’s a licensing problem, an incompatibility, or a PDF‑specific error and suggest the appropriate fix.
-
In server log i got like this error
com.aspose.words.FileCorruptedException
The document appears to be corrupted and cannot be loaded
-
Aspose license looks valid
some of the documents fail the same way after recent migration from GCP to AWS, and all of them used to preview correctly before migration.
while i open the file its showing like this document is corrupted, how can i solve this issue, do u have any solution
@Manish7320
The error description looks related to Aspose.Words. Therefore, we are moving this thread to respective category where you will be assisted accordingly.
could you please check ASAP?
@Manish7320 Could you please attach the problematic input document and simple code that will allow us to reproduce the problem? We will check the issue and provide you more information.