FastBankConvertFastBankConvert home

Rotated PDF to Excel: Fix Sideways Pages First

By FastBankConvertPublished December 5, 2024Updated December 5, 2024

Before a rotated PDF goes to Excel, turn every sideways page upright and save the file so the turn is stored in it. A converter builds rows from left to right across the page. On a page lying on its side, each "row" it finds is really a column, so dates, payees and amounts land in the wrong cells.

Why do rotated PDF pages give jumbled Excel columns?

A rotated PDF page gives jumbled columns because a converter groups words into rows by height and into columns by distance from the left edge. When the page lies sideways, the printed columns run top to bottom. The converter then reads one statement column as a row, and every cell it fills holds a mix of unrelated values.

Picture a statement page turned a quarter turn. The date column now runs across the top of the page as a line of dates. The amounts run along the bottom as a line of numbers. A converter that trusts the page as it is will make one Excel row of twenty dates and another of twenty amounts. Nothing is misread. Every character is correct, but the grid around them is wrong, and no amount of cleanup in Excel puts it back cheaply.

Scanned pages make it worse. OCR, the step that reads characters from a page image, expects upright letters. Sideways text either fails to read or reads as noise. Some OCR tools detect orientation and correct it, but you cannot count on that for every page in a mixed file.

Rotated PDF pages that are only turned on screen

A page can look upright in your reader while the file still stores it sideways. Many readers have a "rotate view" button that only changes how the page is shown on your screen, for this session. Close the file, open it elsewhere, or upload it, and the page arrives sideways again because nothing was written back.

There is a second, subtler case. A PDF page can carry a rotation setting, a small instruction that tells viewers to turn the page by 90, 180 or 270 degrees when they display it. The page contents underneath may still be drawn sideways. Most viewers and converters respect that setting, but a few read the raw contents and ignore it. That is why a page can look fine in every viewer you try and still convert as if it were lying on its side.

Symptom (example) Likely cause Fix
The page reads sideways in every viewer The page was scanned or saved sideways Rotate the page and save the file
The page looks upright but converts sideways Rotation was only applied to the view, or is stored as a setting the tool ignores Rotate in a tool that rewrites the page, then save under a new name
One page in a long file is upside down That sheet went through the scanner the wrong way Rotate that page only by 180 degrees
A wide page shows as portrait with tiny sideways text A landscape page was saved in portrait Rotate it to landscape and keep it wide

Saving a rotated PDF so the turn sticks

To make a rotation stick, use a command that rotates pages, not the view, and then save the file. In most desktop PDF editors it sits with the page tools, often under a heading like Organize pages. On a Mac, Preview rotates selected thumbnails and keeps the change when you save.

A free command-line option is qpdf. Its qpdf command-line documentation describes a rotate option that turns a chosen page range by a multiple of 90 degrees, with a plus sign for clockwise. For example, qpdf in.pdf out.pdf --rotate=+90:3,5 turns pages 3 and 5 a quarter turn clockwise and leaves the rest alone. The same page describes a flatten-rotation option that writes the turn into the page contents instead of leaving it as a setting, which helps with the rare tool that ignores the setting.

After saving, close the file and open the new copy. If a page still lies sideways, the save did not take. Then check one page by selecting a line of text: on a digital page the highlight should run along the line, not across it.

Scanned pages deserve one more look. Rotation fixes quarter turns, but a scan that is also slightly crooked needs straightening as well. An online image to Excel converter usually straightens photos and scans as part of its own pipeline, and the same idea applies to scanned PDF pages.

Which way should a sideways statement page turn?

Turn a sideways page so that the first letters of each printed line sit at the left edge with their tops facing up. If the text reads from bottom to top, the page needs a quarter turn clockwise. If it reads from top to bottom, it needs a quarter turn counterclockwise. Upside-down text needs a half turn.

A quick test helps when the text is small. Find a date or a page number such as "Page 2 of 4". The digits are easy to read at any angle, and the direction they run tells you which way to turn. Do this for each page in a scanned file, because a stack fed into a scanner can come out with pages facing different ways.

Turn the whole file in one action only when every page is wrong in the same way. Otherwise rotate page by page. A file where pages 1 to 3 are upright and page 4 is upside down needs page 4 turned and nothing else.

Rotated PDF pages you should leave alone

Some turned pages are meant to be that way. A statement summary or fee table may be printed in landscape on purpose, because it is wider than it is tall. Turning it to portrait would cause the very jumble you are trying to avoid.

Keep wide pages wide, and read converting a landscape PDF to Excel for how to keep all of their columns.

Leave alone any page where only a small part of the text runs sideways. Some statements print a reference code or a mailing barcode up the margin. That text is supposed to be vertical, and the rest of the page is already upright. Rotating the page to suit the margin note would knock every transaction sideways.

Pages with two columns of text side by side are a different problem that rotation does not touch. When a page reads correctly but lines from the left and right halves get mixed together, see keeping the halves of a two column PDF apart.

FastBankConvert is built to read a statement's layout into date, description, amount and balance columns, and it does that best when every page is upright. It is getting ready to open, so you can sign up on the Get started page to hear when trial conversions begin.

All posts in Difficult and locked PDFs