Originally posted by: SystemAdmin
I looked at creating a PDF type tree once but decided the previous poster's advice represented the path of least resistance. There may be a command line program that could be called from a batch adapter but a quick search only turned up Windows-based versions. I suspect an open source program exists for extracting text from a PDF.
However, if you're fearless, PDF is an open standard available at
http://partners.adobe.com/public/developer/pdf/index_reference.html Below is the "Hello World" example provided in the standard. Basically, you have to search for stream & endstream tags, extract the text which is can be found between BT & ET tags. The kicker is that often the text between the BT-ET tags is compressed and must be inflated. This requires an external program.
%PDF−1.4
1 0 obj
<< /Type /Catalog
/Outlines 2 0 R
/Pages 3 0 R
>>
endobj
2 0 obj
<< /Type /Outlines
/Count 0
>>
endobj
3 0 obj
<< /Type /Pages
/Kids
4 0 R /Count 1
>>
endobj
4 0 obj
<< /Type /Page
/Parent 3 0 R
/MediaBox
0 0 612 792 /Contents 5 0 R
/Resources << /ProcSet 6 0 R
/Font << /F1 7 0 R >>
>>
>>
endobj
5 0 obj
<< /Length 73 >>
stream
BT
/F1 24 Tf
100 100 Td
(Hello World) Tj
ET
endstream
endobj
6 0 obj
[/PDF /Text]
endobj
7 0 obj
<< /Type /Font
/Subtype /Type1
/Name /F1
/BaseFont /Helvetica
/Encoding /MacRomanEncoding
>>
endobj
xref
0 8
0000000000 65535 f
0000000009 00000 n
0000000074 00000 n
0000000120 00000 n
0000000179 00000 n
0000000364 00000 n
0000000466 00000 n
0000000496 00000 n
trailer
<< /Size 8
/Root 1 0 R
>>
startxref
625
%%EOF
#DataExchange#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender