How can I disable text search on a pdf file?

1

I just made a pdf file from the contents of a website (i.e. print->export pdf->save).

Currently, I am able to search the text. I would like to disable this option. In fact, I would like to convert this file into a pdf format which is impossible to text search.

How can I do this?

ShanZhengYang

Posted 2015-08-16T13:53:35.390

Reputation: 153

1Have you considered rendering the text as an image first? – Rowland Shaw – 2015-08-16T14:13:58.463

Answers

2

As long as you stay in PDF format I guess that disabling text search is not possible. But you could do the following:

  1. Extract PDF pages as images
  2. Recreate a PDF based on the images

Depending on the OS you use, there are different tools that can do that. Under Linux for example there is the convert tool from the ImageMagick package that could do that.

EDIT: Based on the fact that the convert tool seems to be available under Windows (thanks for the hint @moonpoint) I will add the commands I would use with convert to achieve the extraction and recreation (please note that this is the Linux command syntax which should either be identical or at least similar to the syntax in Windows):

  1. convert YourFile.pdf YourFile.png # Extract the pages as images
  2. convert YourFile-*.png YourNewFile.pdf # Recreate a PDF from the images

duelle

Posted 2015-08-16T13:53:35.390

Reputation: 81

1

There is a binary download for ImageMagick that can be used on Windows systems available from imagemagick.org at Install from Binary Distribution: "ImageMagick runs on Windows 8 (x86 & x64), Windows 7 (x86 & x64), Windows Server 2012, Windows XP (x86) with Service Pack 3, Windows Vista (x86 & x64) with Service Pack 2, Windows Server 2003 (x86 & x64) with Service Pack 2 (verify MSXML6 is present), Windows Server 2003 R2 (x86 & x64), Windows Server 2008 (x86 & x64) with Service Pack 2, and Windows Server 2008 R2 (x64)."

– moonpoint – 2015-08-16T14:32:30.393

I also compressed the pdf file, which seems to do the trick. I usually just use smallpdf.com – ShanZhengYang – 2015-08-18T20:16:18.400

1

Disabling text search inside PDF is not possible.

One option available for you is to render them as images.

But if you are doing this to stop piracy or infringement, you should consider disabling copy paste & printing.

Instructions below

enter image description here

pun

Posted 2015-08-16T13:53:35.390

Reputation: 5 311

0

There is another option: scramble the font encoding. I mean, scramble the glyph codes in a font embedded into the pdf (and replace the source text with a scrambled text accordingly). Any copy-paste tool in any PDF viewer will grab rubbish...

The benefits of this method:

  • size of the PDF file is not increased,
  • visual quality of the document is not degraded,
  • works with any PDF viewer.

There is a paper which discusses this idea including tools: http://dx.doi.org/10.13140/RG.2.1.4509.8489

(or check this post: https://groups.google.com/forum/#!topic/pdfnet-sdk/luWQmyhRDTw)

Tamás Jursonovics

Posted 2015-08-16T13:53:35.390

Reputation: 1