1
3
I have an Adobe PDF document which when opened displays a warning dialog with the words "the document is trying to connect to" followed by a certain URL.
I choose the "Block" option to try to be safe.
But I'd rather not have this dialog displayed at all, or for the PDF document itself to contain the URL. Connecting to the URL is unnecessary for the document to be useful - it's contents can still be read when "Block" is chosen.
I'm not looking for a solution that addresses the symptom - i.e. the dialog - so I'm not looking for a solution that simply says something like: "change security settings to block on default" or something like that.
The solution I am looking for is to simply remove the URL mentioned in the dialog, from the actual PDF document, so that the dialog never occurs.
My first attempt at this solution was to open the PDF in the Notepad++ text editor (any text editor would suffice, if it has search). Then I searched for the URL mentioned in the warning dialog.
Here is the snippet of the PDF code from the PDF document itself, showing the URL
This only occured once in the document. So I experimented with removing various bits: just the URL to leave () and then the whole snippet.
In all experiments with removing the URL and associated code, the warning dialog disappeared but instead Adobe Reader reported:
"the file is damaged but is being repaired"
and the PDF file still loaded and was displayed.
But obviously I'm looking for a solution that removes the URL without causing this other dialog to occur. Presumably my manual edit disturbed the code somehow, maybe a checksum or a offset position value became inconsitent with the actual position of some code.
So, is there a utility to strip/filter/remove such embedded URLs in PDFs with the resultant document intact without errors?
(By the way, I had to show the code snippet as a image as the it would not get displayed completely due to the double angled equality brackets being interpreted as markup I guess. The URL given was an example to illustrate the problem and not the actual one seen.)
+1. Confirmed that this still works. A quick and easy solution instead of needing to use Adobe Acrobat DC Pro – justhalf – 2015-09-15T07:05:41.410
Would blanks really work? Wow. – jpaugh – 2012-01-23T04:21:46.320
It's a text file format :) Also, you can remove the offset table altogether - and then the offending object, but I can't quite recall how do to it by hand correctly. – wizzard0 – 2012-01-23T04:23:18.463
Nice idea about replacing text +1 for that but I think it will complain about the URL being invalid or empty because the URL call command would still be in there. In fact as I mentioned I tried removing everything between the () and it did complain. Your suggestion for a PDF editor might be worth considering. PDF X-Change viewer might be an option, as a trial at least. – therobyouknow – 2012-01-23T09:21:15.550
I think the solution might be to replace the URL and its calling command with comment characters to the exact amount. – therobyouknow – 2012-01-23T09:21:51.340
2@therobyouknow "URL call command would still be in there" - if you read my answer more carefully, you'll see that the URL call command will be removed too. I'll clarify this, thanks. – wizzard0 – 2012-01-23T12:02:28.253
Accepted answer. I replaced the URL call statement with spaces. But slightly different from your answer - I replaced the << >> as well with the exact amount of characters. Result? No error messages, no attempt to open URL. No damaged message. Document opens as expected. Your answer was closest. – therobyouknow – 2012-01-29T12:05:03.770