From: Dave Howell Date: 2005-12-24T05:27:24+09:00 Subject: Re: Merging two Word documents with Ruby? On Dec 23, 2005, at 11:37, Daniel Calvelo wrote: > OpenOffice.org can do the .doc to pdf conversion. I like your idea very > much, Dave. Maybe PostScript would be easier to fiddle with ex-post. Probably. If you have a program that lets you overlay one PDF page on another, then your best bet is to output a PDF page with your header in it. (I'd probably use TeX, or maybe script OSX's TextEdit program, and my copy of full Acrobat 4 for the page overlay.) The other alternative would be to create (or have somebody create for you) an .eps with the white box and a line of text in a program like Freehand or Illustrator. If you pop open the .eps file in a text editor, you'll find it not too difficult to programmatically replace the text, although you won't easily be able to duplicate the kerning and other textual adjustments. Have OpenOffice print to a postscript file, then figure out what you can use as a page marker in order to embed the .eps in that file on each page so that it comes after (and thus covers) the original headers, if any. Then feed the modified .ps file into a PDF distiller. That's what I'd try, I think.