[gs-devel] overlay text ontop of an image.
ken.sharp at artifex.com
Tue Jan 17 08:28:10 UTC 2012
At 12:07 16/01/2012 -0700, Jeff Sadowski wrote:
>print redirect. I'd like the output of it to pop up a pdf file.
>Messing around with java I was able to use the ghostscript program
>along with pdftk to get the desired pdf file. I was wondering If there
>might be an easier way or a way to do the overlay in ghostscript and
>not need pdftk?
Its not clear to me where the PDFs are coming from (except the one with the
text in it). Are these starting as PostScript too ? If so you could do the
whole job in PostScript.
>then I use ghost script to make it into a pdf
>ps2pdf test.ps test.pdf
>then I used pdftk to overlay with a backgroud pdf images of the document
>pdftk test.pdf stamp document.pdf output page1.pdf
>pdftk test.pdf stamp document2.pdf output page2.pdf
>(could I have done that step with ghostscript?)
Yes, but not in a straight forward fashion, and if you did then you
certainly wouldn't need:
>then I used ghostscript again to combine the pages
>gs -q -dNOPAUSE -dSAFER -dBATCH -sOutputFile=result1.pdf
>-sDEVICE=pdfwrite page1.pdf page2.pdf document3.pdf
>This works great but I was wondering if there was a way to do the
>overlay with ghostscript?
It depends what format the files start in, and how much effort you want to
go to in programming in PostScript. Its certainly possible though.
More information about the gs-devel