Well, that's the advantage of fonts, you only have to describe each character once. Convert to outlines and you need to describe it every time, so yeah, much bigger.
Ghostscript's pdfwrite device goes to considerable effort to try and make text searchable, because in general people shout at us when a 'searchable' file becomes 'non-searchable'. So (amongst other things) it preserves any ToUnicode CMaps in the input file. To prevent simple indexing you need to avoid that. You haven't linked to a PDF file so I can't test this, but....
There are three places you need to edit:
/ghostpdl/Resource/Init/gs_pdfwr.ps, line 642, change:
/WantsToUnicode /GetDeviceParam .special_op {
exch pop
}{
//true
}ifelse
To:
//false
In the same file, at line 982, change:
/WantsToUnicode /GetDeviceParam .special_op {
exch pop
}{
//false
}ifelse
To:
//false
Then in /ghostpdl/Resource/Init/pdf_font.ps, line 614, change:
/WantsToUnicode /GetDeviceParam .special_op {
exch pop
}{
//false
}ifelse
To:
//false
That should prevent any ToUnicode information in the inptu file making it through to the output file. Depending on the Operating System you are using, and the way Ghostscript has been built (you haven't said), you may need to tell Ghostscript to include that directory in its search path, which you do with -I/ghostpdl/Resource/Init.
You should also set -dSubsetFonts=true
, that will emit all fonts as subsets, I think that's the default but I can't immediately recall and it does no harm to set it. That means the first glyph that is encountered is encodesd at index 1, the second at index 2 etc. So Hello World becomes 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x04, 0x07, 0x03, 0x08. The ordering wil be consistent throughout the file (obviously) but different for every font in the file and for every file. That should be adequately scrambled I'd have thought. It certainly won't be possible to search/copy/paste trivially.
If you make an example file available I can test it.
Oh, it also just occured to me that you might be able to get the same effect by using the ps2write device to create a PostScript file, then using the pdfwrite device to convert that back to PDF. The ps2write device can't embed ToUnicode CMaps, because there's no standard support in PostScript for that. Of course, it also means the content drops back to PostScript, which may result in other, unacceptable, quality/size chanegs.