Hello Aspose Cloud Support,
We are using your service to generate PDF files (warranty cards), and previously, everything worked correctly. Recently, however, the generated PDFs stopped opening in standard PDF viewers.
The main symptoms are:
-
The PDF is successfully generated and saved without any obvious errors on our side.
-
When trying to open the resulting file in common PDF viewers (Adobe Acrobat Reader, browser viewers, etc.), the viewer reports that the file is damaged or cannot be opened.
-
The same generation logic and template worked fine earlier; only recently the issue started to appear without code changes on our side.
Example file:
-
File name: Warranty_card_UA_3948425520.pdf
-
Size: about 43 KB
-
The content (text) inside the PDF looks correct when inspected via text tools, but standard PDF viewers refuse to open it as a valid PDF document.
Could you please help us investigate this issue?
Warranty_card_UA_3948425520.pdf (42.2 KB)
@andrew.podgornov
What we need to check
-
File integrity – Open the generated .pdf in a hex/text editor.
- Does the file end with the
%%EOF marker?
- Is there any extra data (e.g., HTML, JSON, or a BOM) before the
%PDF‑ header or after %%EOF?
If the trailer (startxref / %%EOF) is missing or corrupted the viewer will report “file is damaged”.
-
How the PDF is saved – Verify the exact code that writes the response from Aspose Cloud to disk.
- Are you writing the raw response stream (
byte[] or Stream) directly, without any intermediate string conversion?
- Ensure the stream is flushed/closed after writing.
-
Version / SDK – Confirm the Aspose PDF Cloud SDK version you are using (e.g., 22.x, 23.x).
- If you are on an older NuGet/Maven package, try upgrading to the latest release – several recent updates fixed trailer‑generation bugs.
-
Server‑side changes – Even if your code hasn’t changed, a recent update on the Aspose Cloud service could affect PDF generation.
- Check the Aspose Cloud status page or release notes for any PDF‑related fixes.
-
Minimal reproducible sample – Create a tiny test that only does:
// Example (C#) – adjust for your language
var pdfApi = new PdfApi("clientId", "clientSecret");
var request = new CreateDocumentRequest
{
// simple template or empty document
Name = "test.pdf",
// any required parameters
};
var result = pdfApi.CreateDocument(request);
File.WriteAllBytes(@"C:\temp\test.pdf", result);
- Does
test.pdf open?
- If it does, the problem is in the data you send (template, images, fonts, etc.).
- If it does not, the issue is on the service side or with the SDK version.
Next steps for you
- Attach the problematic
Warranty_card_UA_3948425520.pdf (or a small excerpt) so we can verify the trailer.
- Share the exact code snippet you use to call the Aspose PDF Cloud API and to write the file locally.
- Tell us the SDK/package version and the runtime environment (OS, .NET/Java/Python version, etc.).
With that information we can pinpoint whether the PDF is being truncated, corrupted during saving, or if a service‑side change introduced a trailer‑generation bug.
Hi, @andrew.podgornov
Can you please share your sample document and code to reproduce the issue? We will further proceed to assist you accordingly.
Warranty_card_UA_3948425520.pdf (42.2 KB)
Please find an example