A PDF can store any number of pages with different rotation flags and sizes. This is not a bug; it is a feature. When you open a document and some pages are upright while others appear sideways, you are seeing the real layout data preserved from the source file. The most common causes are straightforward.
You can handle this directly in your browser with our free rotate pdf tool — nothing gets uploaded.
PowerPoint decks are a classic source. Slides are widescreen by design, so every page exported from PPT is landscape. If you later append portrait text pages, like a cover, table of contents, or appendix, the final PDF is a mix. Excel behaves the same way. Wide spreadsheets export as landscape, while a summary sheet or a vertical chart may export as portrait. When users merge these PDFs, they inherit the mixed orientations without realizing it.
Flatbed scanners usually capture paper in one orientation, but production scanners with automatic document feeders can rotate each sheet independently. If a stack of paper was fed with some pages upside-down relative to the others, the scanner detects each sheet orientation and stores it correctly in the PDF. The result is a valid mixed file. The scanner did not make a mistake; it faithfully recorded what the paper physically looked like.
If you merge a portrait invoice with a landscape blueprint, the merged PDF simply contains both orientations. Tools like Adobe Acrobat, PDF24, and browser PDF viewers all preserve page geometry, so merging is the fastest way to end up with a mixed file.
Some software rotates a page visually by changing the /Rotate key instead of redrawing the content. If a page is rotated 90 or 270 degrees but not flattened, the file looks sideways to some viewers and upright to others. This is a storage detail, but it creates the same user experience: the page orientation feels inconsistent.
A PDF page has two orientation concepts. The first is the physical MediaBox, which defines the page rectangle. A landscape page simply has a wider MediaBox than a tall one. The second is the /Rotate entry, which tells the viewer to rotate the content 90, 180, or 270 degrees. Most mixed-orientation files use MediaBox differences, not /Rotate. A page that is 8.5 by 11 inches is portrait; a page that is 11 by 8.5 inches is landscape. The content streams are not flipped; the page coordinate system is just transposed.
This matters for printing. A viewer that respects page orientation will print a landscape page sideways on portrait paper unless it is told otherwise. That is where most user frustration starts: the file looks fine on screen, but the print preview shows some pages rotated 90 degrees.
If you only need to print one file and cannot edit it, page-by-page printing is the reliable fallback.
Chrome, Edge, and Safari all render PDFs with their stored orientation. Use Ctrl+P or Cmd+P, choose Fit page width instead of Default, and inspect the preview. Browsers do not let you rotate individual pages easily, so if many pages are sideways, exporting a preview is faster: save the PDF to an image format first, then print the images. This avoids per-page manual work but sacrifices vector quality.
Batch fixing means changing every page to a single orientation, usually portrait, or rotating only the sideways pages so the whole file is consistent. The exact steps depend on your tool, but the logic is the same: detect the orientation, rotate the wrong pages, and save.
This works for files under 10 MB and is the fastest option when you do not need to keep the file offline. The downside is that the original vector quality may be compressed, and large decks with many pages may hit the file-size cap.
For very large files, process one section at a time to avoid memory pressure. Acrobat is the most reliable option for complex documents with annotations, forms, and links, because it preserves those features while rotating.
PDF24, Stirling PDF, and qpdf are solid offline alternatives. Stirling PDF has a Rotate PDF tool that accepts a target orientation and a page range. For command-line users, qpdf can set the /Rotate flag on every page with a simple rotate argument. This rotates every page 90 degrees. To rotate only landscape pages, a script that reads the MediaBox dimensions first is more precise, but for most users the full-file rotation is simpler.
If the mixed file came from a scanner, fixing the source is the best long-term solution. Most scanners with an automatic document feeder have a setting called Automatic Page Rotation, Auto-Detect Orientation, or Page Feed Direction. The options are usually:
Before a large scan job, run a test batch of five pages and check the output PDF. If some pages are sideways, switch from As fed to Auto-rotate or Portrait only, rescan the stack, and verify again. This takes two minutes and saves hours of manual rotation later.
PPT and Excel are the most common invisible sources of mixed orientations. A PowerPoint deck exports every slide as landscape because slides are wide by default. If you insert a portrait image or a portrait slide layout, that page is portrait inside the deck. When the whole deck is exported to PDF, you get a file with mostly landscape pages and a few portrait ones. Excel is similar. A wide sheet exports landscape, a narrow column-range exports portrait, and a multi-sheet workbook can easily mix both.
If you only have the PDF and not the PPT file, use the batch-rotation steps above. Rotate the portrait pages 90 degrees so every page matches the dominant landscape orientation. For Excel, the same logic applies: open the workbook, set the print orientation for every sheet to the same value, and export to PDF.
---
A PDF file is a structured container. It starts with a header, contains a series of objects for text, images, fonts, and forms, and ends with a cross-reference table and an EOF marker. When a file is corrupted, one of three things usually happened.
First, the download was interrupted. The file stopped receiving data before the EOF marker was written. The tail of the file is missing, and the cross-reference table is incomplete or absent. Most viewers can still open the file, but they will stop at the last complete page and report an error like “the file is damaged” or “a resource could not be found.”
Second, the file was truncated by a disk error or bad save. This is rarer but happens when a USB drive is pulled out mid-save, or when a hard drive has a failing sector. The symptom is the same as an interrupted download: the tail is missing.
Third, the file was encoded with a broken or unsupported feature. Some PDFs use object streams, encrypted metadata, or very large cross-reference tables that older viewers cannot parse. The file is technically complete, but the viewer chokes on the structure. This is a false-positive corruption: the data is there, but the tool cannot read it.
Understanding which case you have determines the repair strategy. If the tail is missing, you need to re-download or recover the missing bytes. If the structure is unsupported, you need a different viewer or a repair tool that rewrites the cross-reference table.
The fastest diagnostic is to open the file in a plain-text editor or use a hex viewer. A complete PDF always ends with an EOF marker, written as percent-percent E O F. If the file ends abruptly, with no EOF marker, it is incomplete. You may also see the file size reported by the download manager as in progress or paused, and the file on disk will be smaller than the size listed on the server. In a text editor, the last few lines will look like a cut-off stream of characters, often ending mid-token.
On Windows, right-click the file, open it with Notepad, scroll to the bottom, and look for the EOF marker. On macOS, open it in TextEdit in plain-text mode. On Linux, use the tail command to print the last two hundred bytes of the file. If you see the EOF marker, the file is structurally complete and the problem is likely a viewer issue, not a download issue. If you do not see it, the file is truncated, and the repair steps below apply.
In most cases, the file is not actually damaged; it is just incomplete. The best repair is to download it again. Before you do, check three things.
After re-downloading, verify the file size matches the server’s listed size, open the file, and confirm the last page renders. If the file is still broken after a clean re-download, the problem is not the download; it is the file itself, and you need a repair tool or a different viewer.
Browsers and dedicated download managers handle interruptions differently. This difference matters when a download fails.
Modern browsers such as Chrome, Edge, Firefox, and Safari store partial downloads in a temporary folder, not the final destination. If the download is interrupted, the file you see in your Downloads folder is a zero-byte or incomplete placeholder. The actual partial data is in the browser’s temp directory. To recover it, open the browser’s download history. If the download is still in progress or paused, resume it directly. If the download failed, clear the browser cache and retry. The temp file is usually deleted on failure.
Tools like JDownloader, Free Download Manager, or Internet Download Manager save the partial file to the final location and append data as it arrives. If the connection drops, the file is on disk with all the bytes received so far. These managers can resume the download, and in some cases, they can patch the partial file by appending the missing bytes from a new connection. This is the most reliable recovery path for large PDFs over slow or unreliable networks.
A PDF inside a ZIP archive is a different failure mode. The PDF itself may be complete, but the ZIP container is corrupted. This happens when an email attachment is truncated by a mail server, or when the ZIP was partially downloaded. The PDF cannot be extracted because the ZIP’s central directory, which is the file table at the end of the archive, is damaged.
A less obvious corruption symptom is a file that opens normally on the first few pages but shows blank thumbnails or missing images on later pages. This is not a truncated file; it is a cross-reference mismatch. The viewer is reading the cross-reference table, which points to the wrong byte offsets for some objects. The data is there, but the map is wrong.
A tempting shortcut is to open the PDF in Microsoft Word and save it as a new document. Word does have a PDF import filter, but it is not a repair tool. For large files, especially scanned PDFs over fifty pages or documents with many embedded fonts, Word will consume several gigabytes of RAM, hang for minutes, and often crash or produce a half-rendered file. The conversion process re-lays out every page, which strips vector quality, breaks form fields, and can drop images. If the PDF is only partially downloaded, Word will import only the pages it can read and silently discard the rest. The result is a Word file that looks like a PDF but is missing content. Use Word only for small text-heavy PDFs that you intend to edit. For repair, use a dedicated PDF tool.