[GH-ISSUE #2451] [BUG]:corrupt PDFs from agent #1594

Closed
opened 2026-02-22 18:25:35 -05:00 by yindo · 3 comments
Owner

Originally created by @DrABolton on GitHub (Oct 9, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2451

How are you running AnythingLLM?

All versions

What happened?

If I request that the agent create a PDF (locally or hosted) the PDF when downloaded will not open ... Adobe reader reports it as damaged or corrupt. Tried on multiple systems. I don't get any errors.

Are there known steps to reproduce?

Happens with every creation and export

Originally created by @DrABolton on GitHub (Oct 9, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2451 ### How are you running AnythingLLM? All versions ### What happened? If I request that the agent create a PDF (locally or hosted) the PDF when downloaded will not open ... Adobe reader reports it as damaged or corrupt. Tried on multiple systems. I don't get any errors. ### Are there known steps to reproduce? Happens with every creation and export
yindo added the possible bug label 2026-02-22 18:25:35 -05:00
yindo closed this issue 2026-02-22 18:25:35 -05:00
Author
Owner

@DrABolton commented on GitHub (Oct 9, 2024):

Further info...What appears to be happening is that the chat text is exported as a PDF file but it is just a plain text file. Export as txt instruction works as it sends the same data but gives it a .txt filename vs. pdf. I used the syntax from the DOCs to ensure I was instructing it correctly @agent can save this information as a PDF on my desktop folder?

@DrABolton commented on GitHub (Oct 9, 2024): Further info...What appears to be happening is that the chat text is exported as a PDF file but it is just a plain text file. Export as txt instruction works as it sends the same data but gives it a .txt filename vs. pdf. I used the syntax from the DOCs to ensure I was instructing it correctly @agent can save this information as a PDF on my desktop folder?
Author
Owner

@timothycarambat commented on GitHub (Oct 9, 2024):

If I request that the agent create a PDF (locally or hosted) the PDF when downloaded will not open ... Adobe reader reports it as damaged or corrupt. Tried on multiple systems. I don't get any errors.

This is not a skill that we even offer. The only agent skill built-in we offer is text files. You cannot just change the extensions of a text file into .pdf and have that work - they are two totally different file types.

If you specifically require PDF generation you will need to make a skill for that with custom agent skills. The LLM will simply hallucinate the PDF generation using the text doc skill and tell you it works - which is what is occurring here.
https://docs.anythingllm.com/agent/custom/introduction

@timothycarambat commented on GitHub (Oct 9, 2024): > If I request that the agent create a PDF (locally or hosted) the PDF when downloaded will not open ... Adobe reader reports it as damaged or corrupt. Tried on multiple systems. I don't get any errors. This is not a skill that we even offer. The only agent skill built-in we offer is `text` files. You cannot just change the extensions of a text file into `.pdf` and have that work - they are two totally different file types. If you specifically require PDF generation you will need to make a skill for that with custom agent skills. The LLM will simply hallucinate the PDF generation using the text doc skill and tell you it works - which is what is occurring here. https://docs.anythingllm.com/agent/custom/introduction
Author
Owner

@DrABolton commented on GitHub (Oct 9, 2024):

If thats the case you might want to update your documentation as in your Usage Documentation you use PDF as your example.... I only tried is because you provide it as the example in your documentation. If you just offer txt use that as the example....

https://docs.anythingllm.com/agent/usage#what-is-save-files-and-how-to-use-it
Screenshot 2024-10-09 182031

@DrABolton commented on GitHub (Oct 9, 2024): If thats the case you might want to update your documentation as in your Usage Documentation you use PDF as your example.... I only tried is because you provide it as the example in your documentation. If you just offer txt use that as the example.... https://docs.anythingllm.com/agent/usage#what-is-save-files-and-how-to-use-it <img width="401" alt="Screenshot 2024-10-09 182031" src="https://github.com/user-attachments/assets/7d877a32-8f9c-4290-a292-e92fb5d89a77">
yindo changed title from [BUG]:corrupt PDFs from agent to [GH-ISSUE #2451] [BUG]:corrupt PDFs from agent 2026-06-05 14:41:37 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1594