Why government portals say your PDF file is corrupted or unreadable—and how clean re-saving fixes it

Resolving broken cross-reference tables, renamed image files, WhatsApp stream truncation, and unsupported PDF 2.0 structures.

  • Workspace tool
  • Updated
  • Reading time9 min (2,088 words)
  • Share

Few form-filling moments are more baffling than watching a government recruitment portal reject your certificate with the red banner: "Error: Uploaded PDF file is corrupted, damaged, or invalid"—right after you just double-clicked that exact same PDF on your laptop and read it without a single issue. You try renaming the file to remove spaces, you try uploading from a different browser, and the portal still refuses to accept it.

This happens because modern desktop and mobile PDF viewers (like Google Chrome’s PDFium engine, Apple Preview, or Adobe Acrobat Reader) are built to be maximally forgiving. If a PDF file is missing its closing %%EOF marker, has a broken byte-offset cross-reference table (xref), or is actually a JPEG image that someone saved with a .pdf file extension, your phone or browser silently repairs or guesses the file type in memory and displays it anyway. A government portal’s backend server script—often running an older, strict validation library in Java (iText/PDFBox), PHP (FPDI), or .NET—does not forgive structural quirks. The moment a single byte offset or header signature fails strict specification checks, the server aborts and throws a generic "Corrupted PDF" error.

You can fix almost 100% of these rejections in under a minute once you diagnose whether the file is a disguised non-PDF or a PDF with a dirty internal trailer. This guide explains the five technical reasons valid-looking files trigger portal corruption errors and shows how to rebuild a clean, universally accepted PDF locally in your browser.

Quick answer & key takeaways

When a government recruitment or university portal rejects your upload with "PDF file is corrupted, damaged, or unreadable" even though the file opens normally on your phone or laptop, the culprit is almost always a mismatched file header (a JPG or HTML error page renamed to .pdf), a broken cross-reference (xref) table from incremental edits, or an unsupported PDF 1.7/2.0 object stream. Check the real binary format in the Application file checker (Application file checker), then pass the file through the PDF organiser (PDF organiser) or PDF compressor (PDF compressor) to write a clean, standard PDF structure.

  • A file that opens on your phone can still be rejected by a server validator because browser viewers auto-repair broken PDF cross-reference tables while server scripts immediately throw an error.
  • The #1 cause of "Corrupted PDF" errors is a JPEG, PNG, or timed-out HTML web page that was saved or renamed with a .pdf extension instead of being converted.
  • Every genuine PDF file must begin with the exact 5-byte ASCII magic signature %PDF- (25 50 44 46 2D in hexadecimal) at byte offset 0 and end with a clean %%EOF trailer.
  • Testing your file in the Application file checker (Application file checker) reads the actual binary magic bytes and immediately catches renamed images or broken structures.
  • Passing a problematic PDF through the PDF organiser (PDF organiser) or PDF compressor (PDF compressor) constructs a brand-new, standards-compliant PDF container that legacy portal parsers accept.

The 5 hidden reasons a portal calls your working PDF "corrupted"

When a recruitment portal’s upload script receives your file, it runs a sequence of low-level binary checks before saving it to storage. If any check fails, most portals display the same catch-all message ("File is corrupted / invalid PDF"). Here are the five real causes behind that message:

Diagnosing portal "Corrupted or Invalid PDF" errors
Hidden technical causeFirst 5 bytes of fileWhy it happensExact local fix
1. Image renamed to .pdfFF D8 FF (JPG) or 89 50 4E 47 (PNG)Someone changed cert.jpg to cert.pdf in File Explorer instead of convertingConvert the image properly in Images to PDF (Images to PDF)
2. Portal login timeout HTML saved as .pdf<!DOC or <htmle-District/university download link expired and downloaded an HTML login page named certificate.pdfRe-download the real certificate from the issuing portal
3. Broken xref table / multiple %%EOF trailers%PDF-1.x (with dirty trailer)File was edited or annotated multiple times by mobile apps appending incremental byte trailersOpen and re-export in PDF organiser (PDF organiser)
4. Compressed object streams (PDF 1.6+ / 2.0)%PDF-1.7 or %PDF-2.0Legacy PHP/Java portal parser only understands classic uncompressed PDF 1.4 xref tablesRe-encode in PDF compressor (PDF compressor) Balanced mode
5. Password or Owner Permission encryption%PDF- + /Encrypt dictionarye-Aadhaar, bank statement, or DigiLocker PDF has security permissions enabledUnlock locally and re-save a clean unencrypted PDF

Cause #1 & #2: Catching JPGs and HTML pages disguised with a .pdf extension

Cyber-cafe operators and hurried candidates frequently take a scanned JPEG marksheet (marksheet.jpg) and rename it to marksheet.pdf in Windows Explorer or a phone file manager. Changing the filename extension does not change a single byte inside the file—its binary header still starts with FF D8 FF E0 (the JPEG magic signature). When the government portal checks for %PDF- at byte zero, it sees a JPEG header inside a .pdf upload slot and declares the PDF corrupted.

An equally common surprise happens when downloading certificates from state e-District or university ERP portals. If your login session timed out right as you clicked "Download Certificate PDF", the server sometimes sends back a 15 KB HTML "Session Expired — Please Log In" web page named caste_certificate.pdf. If you do not test the file first, you only discover the problem when the exam portal rejects it.

Cause #3 & #4: Fixing incremental edit trailers and unsupported PDF 1.7/2.0 streams

What if your file truly is a PDF (starting with %PDF-) and opens fine in Chrome, yet the portal still rejects it as damaged? Every PDF file relies on a Cross-Reference Table (`xref`) at the very end of the file, which acts like an index telling the parser the exact byte offset of every page, font, and image inside the file.

When you crop, annotate, or sign a PDF inside certain mobile apps—or forward a PDF through messaging apps or email clients that append metadata—the app often writes an incremental update at the bottom of the file, creating two or three stacked xref tables and multiple %%EOF markers, or compresses the cross-reference table into a PDF 1.5+ /XRef stream. Older government portal parsers (such as free FPDI 1.x or legacy iText builds) cannot parse compressed /XRef streams or slightly misaligned byte offsets, so they throw an "Unable to find xref table / Corrupted PDF" exception.

  • Clean structural rebuild (Lossless) — load the PDF into the PDF organiser and export it, or run it through the PDF compressor in Lossless mode. This parses the pages and writes a brand-new, single-trailer PDF structure from scratch.
  • Full raster-to-PDF normalization (100% compatibility) — if a PDF contains bizarre embedded fonts or corrupted vector streams from a broken ERP generator, run it through the PDF compressor in Balanced mode. This renders each page cleanly onto an HTML5 Canvas and packages it into a rock-solid, universally readable PDF.

When the PDF isn’t corrupted, the filename is: fixing portal WAF rejections

Sometimes the portal’s error banner says "Invalid or Corrupted File" when the real trigger is the filename hitting a strict Web Application Firewall (WAF) rule on the server. Many NIC and state commission portals reject any uploaded file whose name contains:

  • Multiple dots (periods) — for example, B.Tech.Degree.Final.pdf or 10th_Marksheet_v1.2.pdf (the server splits on the first dot and thinks the extension is .Tech, not .pdf).
  • Spaces, brackets, or special characters — for example, WhatsApp Document 2026-10-19 at 14.20 (1).pdf or OBC & NCL Cert.pdf.
  • Extremely long filenames — filenames exceeding 30 or 40 characters.

Always rename your final PDF using only simple letters, digits, and underscores or hyphens, with only one dot before `.pdf`—for example, obc_certificate.pdf or degree_certificate.pdf.

The 60-second local sanitization pipeline for any stubborn PDF

Whenever a portal refuses a PDF, do not waste half an hour retrying the same upload. Run this deterministic three-step check locally in your browser:

  1. Test in [Application file checker](/apply/file-checker) — confirm the file is a genuine PDF (not a renamed JPG) and check its current byte size and page count.
  2. Re-encode in [PDF compressor](/apply/pdf-compressor) (Balanced Mode) — this strips out broken incremental xref tables, weird font encodings, and PDF 2.0 object streams, and outputs a clean, standard PDF within your target KB cap.
  3. Save with a clean alphanumeric filename — name the output certificate.pdf (no spaces, brackets, or extra dots) and upload.

How to repair a "corrupted or unreadable" PDF for government portals

  1. Check the true file format in the Application File Checker

    Open the Application file checker (Application file checker) and drop in your rejected .pdf file to verify whether its internal magic bytes are genuinely %PDF- or a disguised JPEG/PNG image.

  2. Convert disguised images properly in Images to PDF

    If the file checker reveals that your .pdf is actually a renamed JPG or PNG image, open Images to PDF (Images to PDF) and export it as a real A4 PDF document.

  3. Rebuild broken PDF structures in the PDF organiser or compressor

    If the file is a real PDF that fails portal parsing, load it into the PDF organiser (PDF organiser) or run it through the PDF compressor (PDF compressor) in Balanced mode to write a clean cross-reference table.

  4. Confirm the file is within the portal’s min and max KB range

    Set your portal’s target KiB in the PDF compressor so the rebuilt PDF sits comfortably between the minimum and maximum kilobyte limits.

  5. Rename with a clean single-dot filename and upload

    Save the repaired file using a short, simple name with no spaces, brackets, or extra periods (for example, caste_cert.pdf) and upload it to the portal.

Common mistakes to avoid

What goes wrong: Renaming marksheet.jpg to marksheet.pdf in Windows File Explorer or a phone file manager.

Better approach: Changing the file extension does not convert the file format. Always convert images into a real PDF using Images to PDF (Images to PDF).

What goes wrong: Uploading a file named B.Tech_Certificate_(Final)_1.pdf with multiple dots and parentheses.

Better approach: Rename the file to btech_certificate.pdf with only alphanumeric characters and a single dot before pdf.

What goes wrong: Uploading an encrypted e-Aadhaar or password-protected bank statement directly to a portal.

Better approach: Server validators cannot enter your password and will report the file as corrupted or unreadable. Unlock the PDF locally and save an unencrypted copy first.

What goes wrong: Re-uploading the exact same rejected file five times hoping the portal server will accept it.

Better approach: Re-encode the PDF once in the PDF compressor (PDF compressor) to sanitize its internal header and xref structure before retrying.

Frequently asked questions

Why does my PDF open perfectly in Google Chrome and Adobe Reader, yet the SSC/UPSC/State PSC portal says it is corrupted?

Web browsers and Adobe Reader contain automatic recovery routines that silently rebuild missing %%EOF markers, fix shifted byte offsets, or display renamed JPG images. Government portal servers use strict backend libraries that immediately reject any file whose header or cross-reference table deviates from standard PDF syntax.

How can I tell if a cyber-cafe operator just renamed my JPG scan to .pdf?

Drop the file into the Application file checker (Application file checker). It reads the binary header inside the file rather than looking at the .pdf name, so it will immediately flag if the file is really a JPEG or PNG.

Why does a PDF downloaded from WhatsApp or an email attachment sometimes fail portal validation?

Downloading a file over an unstable mobile connection or saving a cloud preview before it finishes streaming can truncate the final few kilobytes of the PDF where the xref index and %%EOF marker live. Re-saving the file through the PDF organiser (PDF organiser) or PDF compressor (PDF compressor) writes a complete, valid trailer.

Does using multiple dots in a filename like `M.Sc.Marksheet.pdf` really cause a "Corrupted PDF" error?

Yes, on many older government portals. Naive upload scripts check the file extension by splitting the filename at the first dot (.) instead of the last dot, seeing .Sc instead of .pdf and rejecting the file as invalid.

Is it safe to repair my official certificates in the PDF organiser and PDF compressor?

Yes. Both tools run 100% locally in your browser memory with zero network uploads, so your certificates never leave your device while being rebuilt.

Summary

When a government portal labels your readable PDF as "corrupted or damaged," it is reacting to a binary header mismatch, a complex PDF object stream, a password lock, or a multi-dot filename. By checking the true file header in the Application file checker, re-encoding the document into a clean PDF container via the local PDF organiser or PDF compressor, and giving it a simple single-dot filename, you can clear stubborn portal upload errors in less than a minute.

Related guides

Browse all guides →