Re: Read and rename pdf Script

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Jeff C" <Jeff C@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EFD5C4EC-2D6D-47A3-9891-B11A0C3673E7@xxxxxxxxxxxxxxxx
I need a script that will read the third line in a pdf document and rename
the pdf based on information from that line.

Is this possible to accomplish with vb script. Can any one provide me with
some info a starting point. Im new to vb script but technical. my problem
is
starting need a startin point or direct me to a good online source.
Thanks.

The third physical line in a pdf file or
the third line in the file before it was "printed" as a pdf?

The following (as a text file called "pdf3line.txt") contains five lines:

This is line 1.
This is line 2.
This is line 3.
This is line 4.
This is line 5.

As a PDF (called "pdf3line.pdf") it looks something like this:

%PDF-1.2
%ÀÈÌÒ
1 0 obj
<<
/Title (pdf3line.txt - Notepad)
/Creator (pdfFactory Pro http://www.pdffactory.com)
/Producer (pdfFactory Pro v1.57 \(Windows 98\))
/CreationDate (D:20080122200547)

endobj
4 0 obj
<<
/Filter /FlateDecode
/Length 5 0 R

stream
H??P»ÂPÝûO:¹Ïâjª³?`ÔjcLìàç˽:
"z% ?s8XIµØ0ÙftUdd?&,ÑjßBMH«=Ì`"n?Î]úëÇÇ8ÅTf jd?'²A ]L"
ååÜßA3I?Á<¡¬×@û.Ûî
¸/àß¼&­lôüç_4¶»"Þòf?]ÖòVESendstream
endobj
5 0 obj
151
endobj
6 0 obj
<<
/Type /Page
/Parent 3 0 R
/MediaBox [0 0 612 792]
/Resources
<<
/ProcSet [/PDF/Text]
/Font
<<
/F1 7 0 R
/F2 8 0 R


/Contents 4 0 R

endobj
7 0 obj
<<
/Type /Font
/Subtype /TrueType
/Name /F1
/BaseFont /CourierNew
/FirstChar 32
/LastChar 255
/Widths [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600]
/Encoding /WinAnsiEncoding
/FontDescriptor 9 0 R

endobj
9 0 obj
<<
/Type /FontDescriptor
/FontName /CourierNew
/Flags 35
/FontBBox [-21 -680 638 1021]
/StemV 300
/ItalicAngle 0
/CapHeight 833
/Ascent 833
/Descent -300

endobj
8 0 obj
<<
/Type /Font
/Subtype /TrueType
/Name /F2
/BaseFont /LucidaConsole
/FirstChar 32
/LastChar 255
/Widths [603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603
603 603 603 603 603 603 603 603 603 603 603 603 603 603 603 603]
/Encoding /WinAnsiEncoding
/FontDescriptor 10 0 R

endobj
10 0 obj
<<
/Type /FontDescriptor
/FontName /LucidaConsole
/Flags 35
/FontBBox [0 -211 603 789]
/StemV 301
/ItalicAngle 0
/CapHeight 789
/Ascent 789
/Descent -211

endobj
3 0 obj
<<
/Type /Pages
/Count 1
/Kids [6 0 R]

endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R

endobj
xref
0 11
0000000000 65535 f
0000000016 00000 n
0000003143 00000 n
0000003086 00000 n
0000000202 00000 n
0000000427 00000 n
0000000446 00000 n
0000000603 00000 n
0000001842 00000 n
0000001670 00000 n
0000002913 00000 n
trailer
<<
/Size 11
/Info 1 0 R
/Root 2 0 R
/ID [<8821C8D6DA2AAD3518E3B23BDEA12D69><8821C8D6DA2AAD3518E3B23BDEA12D69>]

startxref
3192
%%EOF


Would you want the file renamed as "This is line 3." or "1 0 obj" or what?


.



Relevant Pages