Skip to main content
Participant
January 11, 2021
Answered

Flatten vs refry pdf and maintaining searchability

  • January 11, 2021
  • 3 replies
  • 3218 views

A coworker marked up a drawing as a PDF file in Adobe Pro and would like to "print" to create a new revision of the PDF file. In the past, they've used some form of print to PDF for this, but sometimes searchability is lost, which is an important function downstream. 

 

I've read that this is called "refrying" a PDF, and is not a recommended practice.

 

Would it be better to "flatten" the PDF? I'm not entirely clear on what this does... is it just merging layers? Would searchability be maintained? Is a script the easiest way, like this.flattenPages()?

 

Thank you

This topic has been closed for replies.
Correct answer Dov Isaacs

Someone use my name in vain?  🙂

 

What you are trying to do is to incorporate any markup (including text, highlighting, etc.) into the base PDF file if I understand you correctly.

 

The simplest way of accomplishing this is by using the single JavaScript command:                   

this.flattenPages();

 

Alternatively, you can use the Acrobat Pro Preflight profile Flatten annotations and form fields in the Essentials preflight profile group which does the same thing.

 

“Refrying a PDF file” should never be used for this purpose. Any process that goes from PDF to PostScript and back has the potential of seriously degrading the quality of the original PDF file. Don't even think about this as a solution.

 

3 replies

Dov Isaacs
Dov IsaacsCorrect answer
Legend
January 12, 2021

Someone use my name in vain?  🙂

 

What you are trying to do is to incorporate any markup (including text, highlighting, etc.) into the base PDF file if I understand you correctly.

 

The simplest way of accomplishing this is by using the single JavaScript command:                   

this.flattenPages();

 

Alternatively, you can use the Acrobat Pro Preflight profile Flatten annotations and form fields in the Essentials preflight profile group which does the same thing.

 

“Refrying a PDF file” should never be used for this purpose. Any process that goes from PDF to PostScript and back has the potential of seriously degrading the quality of the original PDF file. Don't even think about this as a solution.

 

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)
Participant
January 12, 2021

Great, this answers my question. Thank you! 

Legend
January 12, 2021

A little insight. Why would "refrying" a PDF break searchability?

Well, searchability means an app has to be able to extract the text accurately. To do that, one of two things is needed:

- simple fonts, used in a regular simple way, so the character codes are known

- any sort of font with a "ToUnicode" map, an Adobe invention to allow any PDF to be made searchable. 

 

When you print to PDF, only the visual appearance is preserved. Most simple fonts make it through. ToUnicode maps cannot make it through, because they aren't visual, there's nothing to send to a printer. So it's common to lose searchability when "refrying" PDF. I absolutely back up the idea that refrying is a terrible thing to do, and it is sad that so many people share this useless, dangerous advice and that people complain when it "doesn't work". This is like complaining that a wine bottle breaks when it is used as a hammer.

Document Geek
Community Expert
Community Expert
January 11, 2021

Yes, refried PDFs lose searchabaility. And yes, the Flatten pages script above is the best way to go. That script converts the drawing markups into actual page content, and it will remain searchable. I use it regularaly formy drawing markups as well. Works great!

try67
Community Expert
Community Expert
January 11, 2021

Refrying a PDF file does not cause the text in it to become an image, and therefore it does not lose searchability.

Participant
January 12, 2021

Why are the files losing searchability? Files exported as PDF out of the drafting software are always searchable, but after a few revisions of Adobe mark-ups its lost.

Participant
January 11, 2021

@Dov Isaacs I saw your post on this thread:

https://community.adobe.com/t5/acrobat/adobe-pdf-printer-outputs-pdf-not-able-to-search/td-p/10967990?page=1

If printing is not recommended, what other Acrobat Pro tools would work better here?