Suppose you've got 2 "scanned" pdf files.
- Large, but without text layer.
- Smaller (with lower quality images), but with correct text layer.
Both files contain equal images, different only by their compression.
The goal is to embed the same text layer to 1st pdf.
"Just OCR 1st file" is not a solution. I know Acrobat (and some other tools) are able to OCR without altering image layer, but I'm not happy with their OCR quality.
So, I see two possible ways:
- Export-import text layer somehow
- Replace images in image layer somehow.
PS: Use example:
I've just found another example where such operation is useful in a systematic manner.
If you've got scanned pdf-1 (without text layer) with, say , "jpg" image compression, Abbyy finereader gives you OCR'd pdf, pdf-2. It would be either quite large, if you choose lossless image compression, or it would have image quality significantly lower than pdf-1. In many cases, best choice is to keep source image compression as-is, and do not recompress the image.