To make the long story short; I would like to edit a read-only field from a pdf form using a text editor ONLY. I've succeeded but I would like to understand why in some cases it doesn't work...
I've noticed that if I have a version PDF 1.5 of my original document (without fields, saved by word 2010 as pdf) and add the field with Acrobat Pro XI, save it using Save as other... -> Optimized PDF and make it compatible with Acrobat 6.0. My field will look like this in a text editor (notepad++):
<</AP<</N 28 0 R>>/DA(/Helv 12 Tf 0 g)/DV(mytextfield)/F 4/FT/Tx/Ff 1/MK<<>>/P 3 0
R/Rect[99.4934 686.99 249.493 708.99]/Subtype/Widget/T(%mytextfield)/Type/Annot/V(mytextfield)>>
endobj
28 0 obj
<</BBox[0.0 0.0 150.0 22.0]/FormType 1/Length 88/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</Font<</Helv 20 0 R>>/ProcSet[/PDF/Text]>>/Subtype/Form/Type/XObject>>stream
/Tx BMC
q
1 1 148 20 re
W
n
BT
/Helv 12 Tf
0 g
2 6.548 Td
(mytextfield) Tj
Which is very easy to modify as every time you see 'mytextfield', it's the content of my field and where you see '%mytextfield', it's the name of my field.
On the other hand, if I take my PDF 1.5 (saved by word 2010) and instead of making an optimized saving (after adding the field) using acrobat pro XI I save it normally (save as), I get a PDF 1.6 with the following (in notepad++):
<</AcroForm 25 0 R/Lang(fr-CH)/MarkInfo<</Marked true>>/Metadata 3 0 R/Pages 15 0 R/StructTreeRoot 8 0 R/Type/Catalog>>
endobj
19 0 obj
<</Annots 26 0 R/Contents 22 0 R/CropBox[0 0 595.32 841.92]/Group<</CS/DeviceRGB/S/Transparency/Type/Group>>/MediaBox[0 0 595.32 841.92]/Parent 15 0 R/Resources<</ExtGState<</GS0 30 0 R>>/Font<</TT0 33 0 R>>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 0/Tabs/S/Type/Page>>
endobj
20 0 obj
<</BBox[0.0 0.0 150.0 22.0]/FormType 1/Length 85/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Resources<</Font<</Helv 28 0 R>>/ProcSet[/PDF/Text]>>/Subtype/Form/Type/XObject>>stream
/Tx BMC
q
1 1 148 20 re
W
n
BT
/Helv 12 Tf
0 g
2 6.548 Td
(mytextfield) Tj
Which is not an easy format to edit the field (if I change mytextfield, I get a corrupted document!). Now, it would be just fine if when I open this PDF 1.6 in acrobat pro and save it using the optimized PDF trick mentioned above the field would transform to the first one; but it's not the case! Instead I get the exact same field format.
So my questions are the following:
- Is there a way to ensure that my pdf form, no matter which PDF version the original is, get converted to the right format (field easy to edit) using Acrobat Pro or any other program?
- Is there a way to easily edit the PDF 1.6 fields?