PS Errors uploading edited PDFs
Adobe Acrobat X
PHP 5+
MySQL 5+
I need a PDF script guru! I'm having trouble with a part of our website that imports .pdf files (work orders), and appends the database using the markup code. There is one field in each document that is commonly incorrect, and although it's easy enough to amend in the DB, the orders on the server remain incorrect. I've been monkeying around with it for months to no avail, and an associate highly recommended this forum.
The script looks for the text "Company" as a starting point (see ORRIGINAL PDF below), all further pertinant data fields are preceded by plain english marker like that one. Once the two incorrect characters are edited using Adobe Acrobat X, various other text in the document is altered in format. I've tried redacting and replacing the text, editing text, altering document properties to forbid embeding, nothing changes the fact that the ouput after editing changes all of the plain text to the numerical code you'll see in the "EDITED PDF" example below. I'm stumped, and have to find a way to offset the admin cost, and load, associated with manually tracking and inserting the corrected PDFs.
ORRIGINAL PDF
ArialMT/TT Font/Not Embeded/ANSI encoding
PDF Version: 1.5
PDF Markup Code:
1 J 1 0 0 -1 0 792 cm q 0 0 612.001 792.001 re W n 1 1 1 rg 0 0 612 792 re f q BT 0 0 0 rg /F1 8 Tf 1 0 0 -1 19.6 774.69 Tm [(R) -1 (e) -25 (p) -25 (o) -25 (r) -25 (t) -25 ( ) -25 (G) -25 (e) -25 (n) -25 (e) -25 (r) -7 (a) -25 (t) -25 (e) -25 (d) -25 ( ) -25 (f) -25 (o) -25 (r) -25 ( ) -25 (d) -25 (v) -16 (o) -25 (k) -25 (0) -25 (0) -25 (7) -25 (2) -25 (0) -25 (0)] TJ ET Q q BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 506.9 775.69 Tm [(Page 7 of 40)] TJ ET Q 0 0 0 RG [] 0 d 0.5 w 0 0 0 rg 11.1 756 549.9 1.45 re B q 10.05 80.7 588.301 657.751 re W n 1 0 0 1 10.05 80.7 cm q 0 0 594.401 144.401 re W n 0 0 0 RG [] 0 d 0.5 w 1 1 1 rg 0 0 594.4 144.4 re B q 6.2 6.2 579.351 135.551 re W n 1 1 1 rg 6.2 6.2 579.35 135.55 re f 1 0 0 1 6.2 6.2 cm q BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 3 56.59 Tm [(Earliest Start)] TJ ET Q q BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 3 70.09 Tm [(Planned start)] TJ ET Q q BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 3 83.59 Tm [(Due)] TJ ET Q q 1 1 1 rg 3.65 5.95 54.8 10 re f BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 3.65 13.19 Tm [(Company)] TJ ET Q q 1 1 1 rg 3 22.35 57.6 11.5 re f BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 3 29.59 Tm [(T) 111 (ech ID)] TJ ET Q q 1 1 1 rg 3 35.85 57.6 11.5 re f BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 3 43.09 Tm [(Service Region)] TJ ET Q q BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 65.15 56.04 Tm [(09/15/1) 74 (1 8:00 ) 55 (AM)] TJ ET Q q BT 0 0 0 rg /F2 8 Tf 1 0 0 -1 65.15 69.14 Tm [(8:00 ) 55 (AM)] TJ ET Q q BT 0 0 0 rg
Arial/TT Font/Embeded/CID Encoding
PDF Version: 1.6
PDF Markup Code:
792 re f 1 0 0 -1 0 792 cm BT 0 0 0 rg /TT0 8 Tf 19.6 17.31 Td [(R)-1 (e)-25(p)-25(o)-25(r)-25(t)-25( )-25(G)-25(e)-25(n)-25(e)-25(r)-7 (a)-25(t)-25(e)-25(d)-25( )-25(f)-25(o)-25(r)-25( )-25(d)-25(v)-16 (o)-25(k)-25(0)-25(0)-25(7)-25(2)-25(0)-25(0)]TJ /C2_0 8 Tf 487.3 -1 Td<00330044004A004800030003001A0003005200490003000300170013>Tj ET q 1 0 0 -1 0 792 cm 0 0 0 RG 0.5 w 1 J 11.1 756 549.9 1.45 re B Q q 1 0 0 -1 0 792 cm 10.05 80.7 588.301 657.751 re W n q 1 0 0 1 10.05 80.7 cm 0 0 594.401 144.401 re W n 1 1 1 rg 0 0 0 RG 0.5 w 1 J 0 0 594.4 144.4 re B q 6.2 6.2 579.351 135.551 re W n 6.2 6.2 579.35 135.55 re f 1 0 0 -1 -10.05 711.3 cm BT 0 0 0 rg /C2_0 8 Tf 19.25 648.51 Td <002800440055004F004C004800560057000300360057004400550057>Tj 0 -13.5 TD <0033004F00440051005100480047000300560057004400550057>Tj T* <002700580048>Tj ET q 1 0 0 -1 16.25 705.1 cm 1 1 1 rg 3.65 5.95 54.8 10 re f Q BT /C2_0 8 Tf 19.9 691.91 Td <002600520050005300440051005C>Tj ET q 1 0 0 -1 16.25 705.1 cm 1 1 1 rg 3 22.35 57.6 11.5 re f Q BT /C2_0 8 Tf 19.25 675.51 Td [<0037>111<00480046004B0003002C0027>