If you know PDF stuff...
I have a huge pdf that's annoying to search in. I've tried dumping it to pure text, which makes it much faster, but they layout gets super fucked because the original is in columns and inconsistently so.
So, since I just saw your post re. pdfs, I immediately opened it in Draw*, which I didn't know I could before I saw your post. Turning off editing mode so I can select without accidentally shoving the text around, because when I did this without draw before...
When I just dumped to text before, let's Imagine three pages of content in column format. Reading order is 0-1-2-3-4-5-6-7-8-9, where aA, b-B and c are 'unordered' text (e.g. sidebars) and ║ is image content
p1: 0 2 p1: 1 a P1: ║ A p2: 3 5 p2: b-B p2: 4 6 p3: c 8 p3: ║║║ p3: 7 9
When I dump it to text, I:
would prefer(1): 0 1 2 a A 3 4 5 6 b-B 7 8 9 c would prefer(2): a A 0 1 2 b-B 3 4 5 6 c 7 8 9 would prefer(3): 0 1 2 a A 3 b-B 4 5 6 c 7 8 9 actually do get: 0 2 1 a A 3 5 b-B 4 6 c 7 8 9 (1): Column order, sidebar last each page (2): Column order, sidebar first each page (3): Column order, sidebar when-encountered Actual: No consistent ordering to anything
I mean, forget the side bars, I can imagine handling those manually later, but I don't even have a reliable order for normal text on pages without images or side bars.
The as-visually-displayed order is definitely 2 columns on every page, with the only exceptions being the side bars that can be in weird places, and the index (which is also columnar, but more than 2 columns).
But the converted order switches it up. Some pages, it's line-by-line as if there was no column. Some pages, it's columns. Some pages, it's a half-mixture where it's like it does non-column line-by-line, but not per-char but rather per-paragraph? So the first paragraph of left column, then as many paragraphs of right column as it takes to get "just as far down the page", then it's another paragraph from the left column, etc./
Rendered in a document viewer outside Draw:
In the document viewer, I clicked in the right column, on "Method" and dragged to the end of "With" on the next line. It selected, also, the entire left-hand column. That's also how it happens when I dump it to text, "Method" is followed by the first words of the side box:
Duration: Instant Prerequisite Charms: Unswerving Eye Method
SPACE-SAVING CONCESSION DEVELOPER 5, ESSENCE 3 Multiple Charms are considered to have the following
Opening the same place in draw:
Obviously, I don't care about the rendering when I'm just trying to extract the text anyway, but note the selected lines of text.
In Draw, in the navigator, The "method" and "with" words are on lines that are sequential shapes, Shape 46 ends on "Method" and shape 47 begins on "With"
I expected, in Draw, to find that my outside-of-Draw weirdness was caused by inside-draw weirdness, but ... no? In Draw, it is well aware that "Method" is followed directly by "with."
Do you have any conception at all what might be going on?
\---
*took a while, it's a weird file! Around a minute before the first page was drawing, and another 30 seconds before Draw became interactable again. I have 32 gigs of ram on this machine and the file is "only" 50 megs, so I have no idea why it's this heavy but it is. (It's not just a draw thing, I'm doing all this because it was also heavy in the regular document viewer)
my guess is whatever tool you used to do the initial conversion is trying to retain the visual layout structure of a PDF during conversion to raw text. This is one of the options Poppler has when you choose to render a page as text if you don't specify the layout of that page.












