[Wolves] php generated text over image or rewrite entire doc?

Jon Farmer jon at bctech.co.uk
Wed Jun 20 10:47:30 UTC 2012

On 19/06/12 16:08, Wayne Morris wrote:
> Hi all,

> 1) Just scan each document , set it as page background and float the
> text boxes over the appropriate spaces on the form - apart from I
> haven't the foggiest where to start with
> this, I can forsee a lot of bother setting up the positions of text box
> relative to the form space - the text overflowing past the space over
> the rest of the text etc.
> 2) Retype or OCR each document as text file, and then just create the
> page as per normal php page - easy peasy - looks pretty whatever the
> text field contents - but possible
> typo on scan/retype might mean a 'I promise not to kill you' becomes 'I
> promise to kill you' and its lawyer city because you deviated from the
> approved document...

About 10 years ago I faced a similar challenge with a supplier order
document which had to be submitted as a MS Word doc. We obviously didn't
want to key in the data to our CRM then again into the .doc.

So I saved the .doc as Rich Text format. Added tags into the relevant
fields on the document such as <first name>. Then used a bit of Perl to
open the RTF file, connect to DB, replace the tags with the data, save
the file as a RTF with a .doc extension and then email it to the supplier.

It 'Just Worked' as the MS Word opened the .doc even though it was
actually RTF and the supplier was non the wiser.

This approach might work but as a download-able '.doc' rather than email.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.lug.org.uk/pipermail/wolves/attachments/20120620/9b9e5e95/attachment.pgp>

More information about the Wolves mailing list