postscript

Printing to PostScript with PDFBox produces a massive file, why?

蹲街弑〆低调 提交于 2019-12-12 03:48:42
问题 I am using PDFBox to create PDFs and that is working great. I also have a need to create PostScript files which I would like to generate from the PDF I create. I am using the following code to have PDFBox work with SimpleDoc to create the PostScript file. That is working but the file is massive. A 30KB PDF produces a 2meg PostScript file. What do I need to change to create a reasonably sized PostScript file? PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add

CMYK Overprinting and Knockout in Ghostscript

流过昼夜 提交于 2019-12-12 02:56:09
问题 I'm trying to get a grasp on the capabilities of the current version of Ghostscript (see also this question that I asked a few days ago). So, I downloaded a "test form" for the PDF/X-4 standard from www.pdfx-ready.ch, a standards organization in Switzerland, and tried to render it... (In case anyone wants to try this, here's the direct download link: http://www.pdfx-ready.ch/files/PDFX-ready-OutputTest_PDFX4-CMYK_V301d.zip. You can find more info on this page (in German): http://www.pdfx

Ghostscript - using a font in a form makes it unavailable

我与影子孤独终老i 提交于 2019-12-12 01:28:19
问题 I'm seeing some weird behaviour in Ghostscript 9.06 and am wondering whether it's to do with my PS structure or something else. We have an embedded font defined and then attempt to setup a form and use it as below. Underneath I also have some lines to put text directly on the page without using a form. globaldict begin true setglobal /frm_test << /FormType 1 /BBox [-842 -842 596 596] /Matrix [1 0 0 1 0 0] /PaintProc { pop /ArialMT 7.0 selectfont 0 0 moveto (Test text form) show }

Copy command in PostScript

≡放荡痞女 提交于 2019-12-11 18:07:17
问题 I am reading algorithms by RobertSedwick at following link http://books.google.co.in/books?id=pQRLfMngZ7sC&pg=PA213&lpg=PA213&dq=towers+of+hanoi+relation+with+trailing+zeros&source=bl&ots=gfM2UdBkNq&sig=avk5lNz7XeNODghvOlvHKSGMc8g&hl=en#v=onepage&q=towers%20of%20hanoi%20relation%20with%20trailing%20zeros&f=false Page number: 218 Fig 5.13 What does following statement mean in PostScript. 2 copy ge {dup 0 rlineto} { ... } ifelse And also what does following means 2 copy KochR I am looking into

Overlaying or merging multiple .ps files

依然范特西╮ 提交于 2019-12-11 12:52:45
问题 I have used gmt to create several .ps files of x - y graphs with identical axes. I have several sets of data, each containing between 14 and 20 plots. Each plot is in a separate directory. I would like to overlay every .ps within a dataset, in order to show correlation between the plots. I know this is similar to the thread posted here: overlay one pdf or ps file on top of another but I don't have to deal with multiple pages. I'm not a programmer, I'm a student! I would really appreciate a

Create image of, “specific page” of postscript file using ghostscript

泪湿孤枕 提交于 2019-12-11 12:42:41
问题 Please someone help me with ghostscript.... I want to create image of a particular page postscript file using ghostscript. I will specify the page number or something like that will get the respective image as output. Is this possible with ghostscript? 回答1: In current versions of Ghostscript you have two choices: 1) Render every page to an image file, use the '%d' file name format so that you know which page you want, delete the others. 2) PostScript is a programming language. Write a

Postscript: discover rotate/scale value

青春壹個敷衍的年華 提交于 2019-12-11 12:07:25
问题 How can I discover the values of rotate/scale? For example, after I issue the following command: 90 rotate the current rotation is set to 90. How do I discover what rotate is set to? 回答1: Rotation (also scaling and shearing) do not have individual values. All such transformations are rolled up into the Current Transformation Matrix (CTM). You can find an excellent description of the CTM and the transformations in the PostScript Language Reference Manual, especially sections 4.3.1 to 4.3.3.

What's wrong with my pdf writer?

落花浮王杯 提交于 2019-12-11 09:46:55
问题 I'm writing code to produce pdfs (from postscript of course), and I've tried to follow the spec as best I could. But imagemagick's identify says there's something wrong with my xref table. Can anyone see where/what my problem is? $ echo quit | gsnd -q pw.ps dancingmen.ps | identify - **** Warning: An error occurred while reading an XREF table. **** The file has been damaged. This may have been caused **** by a problem while converting or transfering the file. **** Ghostscript will attempt to

Why do I get Error: /invalidfileaccess in --file--

强颜欢笑 提交于 2019-12-11 07:45:07
问题 Based on Simple way to add an image in postscript I wrote the following: gsave 360 72 translate % set lower left of image at (360, 72) 230 346 scale % size of rendered image is 175 points by 47 points 2304 % number of columns per row 3456 % number of rows 8 % bits per color channel (1, 2, 4, or 8) [2304 0 0 -3456 0 3456] % transform array... maps unit square to pixel (graphics/IMG_2216.jpg) (r) file /DCTDecode filter % opens the file and filters the image data false % pull channels from

How to crop a multipage pdf using ghostscript with an array of page specific cropboxes

余生颓废 提交于 2019-12-11 06:45:43
问题 This post is a follow-up of "How do I crop pages 3&4 in a multipage pdf using ghostscript", but it changes the input to an array of data. The quest: I have a pdf file (a set of drawings) where all pages have the same size and I want to crop some pages in one way and others differently. The following screenshot shows how I generated the data below for cropping:spreadsheet The "left,bottom,right,top" are to be handed over to the postscript /CropBox [934 350 3318 2034] command. Pagenumbers are