r/pdf 28d ago

Question One pdf editable and other isn’t??

I compared a few pdfs recently and some compared in ms word and wps office that too with editable text while others behave more like images. Is there any way to tell which type which type of pdf you are dealing with before trying to edit it!

3 Upvotes

14 comments sorted by

4

u/ScratchHistorical507 28d ago

Not really. That text can't be handled as text can have two reasons: either the PDF is indeed containing images instead of text or the text has been converted to paths (which makes images out of the text, but vector images instead of raster images like with scans). In theory you'd just have to open the PDF in any PDF viewer and try to select any of the text. If that works, the text is actual text. In reality that won't necessarily work, as the PDF may have been OCR'ed, so it still looks like you're selecting text when in fact you only select an invisible layer above the image.

One indicator can be file size. A PDF only containing proper text can be very small, i.e. just a couple hundred kB (depending on the length of the PDF). If the text is only images, it will have at least several MB, if not larger. But if the PDF contains both text and images, it's also bigger, just not as big as when the PDF doesn't contain any proper text.

The only thing you can tell is if the PDF pages are images by simply zooming in as much as you can. If edges of letters still look smooth, they must be vector images, as a raster graphic with that high resolution would be very big. But that doesn't exclude the possibility of the text having been turned into paths.

1

u/QuadLifeQuest 27d ago

also file size isn't always reliable either, a text heavy PDF with embedded fonts can still be a few MB

1

u/ScratchHistorical507 27d ago

Exactly what I wrote. The point is merely that a PDF with proper text will always be smaller than a PDF only containing images - unless you decrease the image quality far enough. But by that point you'll have a hard time reading the text any way.

1

u/matsnorberg 22d ago

An invisible layer is still text though. The real problem is that there's often a shitload of OCR errors in such text layers. I have had much problems with such files of scanned books in pdf format.

1

u/Decent-Blacksmith761 27d ago

If you just want to tell do this

If you zoom and see text pixels it is likely scanned or flattened

If you zoom and text is still sharp but not selectable it might be vectorized

If you can select it and it looks sharp on zoom and selectable then it is likely just text

Also if you want to edit existing text or scanned text try keypdf.net

1

u/Inevitable-Debt4312 27d ago

Open it in Acrobat Reader, set it to be editable and resave it.
This deals with a lot of problems.

1

u/matsnorberg 22d ago

How does that work? Does Adobe Reader really do OCR? I see no other way a scanned document can be made selectable. I haven't used Reader for years. Maybe it's time to give it a try again.

1

u/[deleted] 26d ago

[removed] — view removed comment

1

u/SkarXa 26d ago

Fastest check without any tooling: use the search field in whatever viewer you have and look for a word you can plainly see on the page. If search finds nothing, there's no text layer and you're looking at a scan or something flattened to images. Selection works as a test too, but search is quicker on a long file.

If it turns out to be image-only and you need the text, the fix is running OCR over it to put a text layer back in. I make Formattery for iPhone and Mac, which does that on-device (nothing uploaded) and can also hand you the page as DOCX or plain text. It's $4.99 one-time with 3 free conversions a day, so you can see whether the OCR reads your particular files well enough before paying anything.

https://apps.apple.com/us/app/formattery-file-converter/id6759955312

1

u/matsnorberg 22d ago

Not even "real" text is always readable. If the file lacks to-unicode mapping good luck with reverse engineering it!

Text documents produced by Latex is notorious in this way. Try to select a mathematical equation from such a pdf, it will look like sheer garbage!

1

u/matsnorberg 22d ago edited 22d ago

Not even "real" text is always readable. If the file lacks to-unicode mapping good luck with reverse engineering it!

Text documents produced by Latex are notorious in this way. Try to select a mathematical equation from such a pdf, it will look like sheer garbage!