postscript

How to merge two postscript files together?

筅森魡賤 提交于 2019-11-27 01:59:15
问题 I am trying to merge two or more postscript files into one. I tried concatenation but it does not work as each postscript file may have different resource header. Have anyone done this before? Are there any libraries (commercial or open source) out there? I do not mind C++, C# or even Java libraries. Edited These are large postscript files (more than 200 Mb) and their purpose is only for color printing (not for online viewing). Conclusion ps2write is not the answer as it does not support DSC.

How do Bezier Patches work in the Utah Teapot?

拈花ヽ惹草 提交于 2019-11-26 23:17:30
问题 I prematurely posted a code golf challenge to draw the Utah Teapot using this dataset (just the teapot). (Revised and Posted teapot challenge) But when I looked deeper at the data in order to whip up a little example, I realized I have no idea what's going on with that data. I have a good understanding of Bezier curves in 2D, implemented deCasteljau. But for 3D does it work the same? Yes! It does! The data contains patches containing 16 vertices each. Is there a standard ordering for how

Is it possible in Ghostscript to add watermark to every page in PDF

你离开我真会死。 提交于 2019-11-26 22:25:36
问题 I convert PDF -> many JPEG and many JPEG -> many PDF using ghostscript . I need to add watermark text on every converted JPEG (PDF) page. Is it possible using only Ghostscript and PostScript? The only way I found: gswin32c -q -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=output.pdf watermark.ps input.pdf But this will insert watermark.ps watermark on first separate page in output.pdf . Can I do this on output PDF pages directly? Can I do this on output JPEG pages directly? << /BeginPage {

How can I remove all images from a PDF?

耗尽温柔 提交于 2019-11-26 12:42:51
问题 I want to remove all images from a PDF file. The page layouts should not change. All images should be replaced by empty space. How can this be achieved with the help of Ghostscript and the appropriate PostScript code? 回答1: Meanwhile the latest Ghostscript releases have a much nicer and easier to use method of removing all images from a PDF. The parameter to add to the command line is -dFILTERIMAGE gs -o noimages.pdf -sDEVICE=pdfwrite -dFILTERIMAGE input.pdf Even better, you can also remove