One of my clients has a software package that they use called Prelien2Lien, which has several thousand document templates. They'd like to be able to also use these templates outside of the software, but I haven't had any luck determining what file type they are. Ideally, I'd like to be able to convert it to DOC, PDF, ODT, or some other format that would be usable to us. Short of that, I'd like to be able to separate the text from the rest of the document (in an automated fashion, because there are hundreds of these templates) and reformat them.

Here are some tidbits that may be useful:

- They have .tpl extensions.
- The first four characters of the binary file are TPL3.
- The software is built on Visual FoxPro.

I've uploaded a sample file here: http://www.hyperionworks.com/AZ90DayClaimBondPublic.tpl
Feel free to download and examine it.

I'm hoping that the format being used is somewhat standard and can be opened by other programs. Though I fully accept that the format may be proprietary and I'd be out of luck.

Recommended Answers

All 2 Replies

One of my clients has a software package that they use called Prelien2Lien, which has several thousand document templates. They'd like to be able to also use these templates outside of the software, but I haven't had any luck determining what file type they are. Ideally, I'd like to be able to convert it to DOC, PDF, ODT, or some other format that would be usable to us. Short of that, I'd like to be able to separate the text from the rest of the document (in an automated fashion, because there are hundreds of these templates) and reformat them.

...

I'm hoping that the format being used is somewhat standard and can be opened by other programs. Though I fully accept that the format may be proprietary and I'd be out of luck.

MS Word 2007 doesn't recognize it as a document template, and a quick Internet search wasn't very helpful either. My best guess is that this is a proprietary format and you're probably not going to have much luck trying to find anything out there that would convert it. I might be wrong, but I expect it would take a lot of digging to prove it.

If you want to try to extract the text, that shouldn't be too hard. I had a look with a hex editor, and the text blocks all seem to follow the same pattern.

Look for: 00 01 02 FF 00 00 00 00 00 00 00 00 (12 bytes)
Then read:
2-byte integer (little-endian) --> font name length
"font name length" bytes (ASCII?) --> font name
4-byte integer (little-endian) --> text length
"text length" bytes (code points in the font) --> text

I think that would get you at least all of the static text in the template, but without formatting. Also, I don't know if that would cover any input fields; this is left as an exercise for the reader. :)

Thank you.. I appreciate the response, and it seems very helpful as it should get me going in the right direction. Thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.