Previous | Next | (P-PDF) General
Topic: Manualy Editing PDF Files with a Text Editor
Conf: (P-PDF) General, Msg: 25883
From: JMG
Date: 8/17/2001 06:20 AM
Manualy Editing PDF Files with a Text Editor
On certain occasions, it may be necessary, and very effective, to manually edit sections of a PDF file using a text editor (able to save without formatting the PDF file).
I have used this technique to correct bookmark references in the outline tree that weren't functioning correctly.
For example:
----------------------------------
EXAMPLE BEFORE EDITING
70 0 obj
<<
/Title (SECTION 1: INTRODUCTION)
/A << /S /GoTo /D () >> (problem here)
/Parent 69 0 R
/First 71 0 R
/Last 71 0 R
/Count -1
>>
endobj
------------------------------------
EXAMPLE AFTER EDITING (PROBLEM BOOKMARK CORRECRED)
59 0 obj
<<
/Title (SECTION 1: INTRODUCTION)
/Next 60 0 R
/A << /S /GoTo /D [ 0 /XYZ null 724 null ] >(Corrected)
/Parent 58 0 R
/First 71 0 R
/Last 71 0 R
/Count -1
>>
endobj
---------------------------------------
This method of 'tweaking' the file can be very effective, but unfortunately, any alteration to the length of the PDF file triggers Acrobat Reader into reporting an error: 'Rebuild - the PDF file is damaged and is being repaired'. If the new text / code added to the file is correct, the file still works successfully.
Please can forum users recomend how triggering the error message can be prevented. Using the example, should some object parameter be altered to compensate for the additional text added to the file, so that the error message won't occur. I've looked for a numerical value for the length of the object (which could be 'tweaked' to reflect the additional characters added) but I can't find it.
Suggestion please?
Many thanks
JMG