postscript

PostScript - table of hyperlinks but only one link being used for all

孤者浪人 提交于 2021-02-19 05:47:03
问题 The requirement is to show some text in a pdf which has a hyperlink underneath to a site/pdf/etc - similar to HTML where you will see please click here and here opens up a link. I'm using PlanetPress to create the pdf, which basiclly is PostScript code with added vitamins and iron. Acrobat automatically creates links when http:// is found within the text, as a consequence PlanetPress does not handle links directly (because they are created automatically by Acrobat). I can create static links

How to change the width of lines in a PDF/PostScript file

笑着哭i 提交于 2021-02-11 13:29:00
问题 I regularly need to handle technical drawings (mechanical engineering) and they often come with colored lines, which can't be printed properly. Therefore I wrote the batch script listed below. It uses ghostscript to convert drawings to black & white; note that greyscales aren't sufficient, as they might be barely visible on a laser print. The batch script even handles multiple files dragged and dropped on it. Now I encounter a large bunch of drawings which appear to have linewidths of

Add Duplex option for certain pages in postscript file using ghostscript

不羁岁月 提交于 2021-02-10 13:00:07
问题 I have a pdf file with 3 pages. I want to print first page as simplex and second & third page as duplex(double-sided - second on the front, third on the back). How can I generate the required postscript with ghostscript. I found the below solution on the internet and it works, but it makes the whole document as duplex. gswin64c.exe -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile=output.ps -c "<</PSDocOptions (<</Duplex true>> setpagedevice)>> setdistillerparams" -f input.pdf Above

How to select PostScript printer output tray

允我心安 提交于 2021-02-08 07:47:04
问题 I'm having problems with PostScript, especially the setpagedevice operator. Goal: I want to set the pagesize, select the output tray and then do my PostScript thing. For example, for printing on A3 to tray 3, no duplex, I say <</DeferredMediaSelection true /PageSize [842 1191] /ImagingBBox null /MediaClass null>> setpagedevice <</MediaPosition 2 /TraySwitch false>> setpagedevice <</Duplex false /Tumble false>> setpagedevice This works well initially, but when I want to switch to another

How to ensure line widths are the same vertically and horizontally in PostScript?

送分小仙女□ 提交于 2021-01-28 10:41:42
问题 The width of a line in PostScript is defined in terms of distances in the user space. In my use case, the aspect ratio of the device space (e.g. 4:3) is different from the aspect ratio of the user space (e.g. 1:1), which causes the line widths in the device space to be different in vertical and horizontal directions. How to make line widths the same regardless of the line orientation? The PostScript Language Reference Manual for setlinewidth mentions that if the current transformation matrix

Show Unicode characters in PostScript

被刻印的时光 ゝ 提交于 2021-01-28 06:01:12
问题 How do I get my PostScript program to show G clef character from Bravura font? According to this SMuFL document the Unicode code point for a G (treble) clef in Bravura is U+E050 (see page 48 Clefs (U+E050–U+E07F)). The PostScript glyph name might be gClef (not sure). Here is my best attempt so far to get the unicode characters on page. I am using GhostScript 9.25 to produce a PDF. This is the output from GhostScript: GPL Ghostscript 9.25 (2018-09-13) Copyright (C) 2018 Artifex Software, Inc.

How to convert a PDF to a postscript file using pdfbox 2.0

霸气de小男生 提交于 2021-01-28 02:20:30
问题 I was able to create a PDF with PDFBox (version 1.8.9) and then convert it to a PostScript file with the following code: DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE; StreamPrintServiceFactory[] factories = StreamPrintServiceFactory.lookupStreamPrintServiceFactories(flavor, DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType()); if (factories.length == 0) { throw new PrinterException("No PostScript factories available"); } PDDocument document = pdfGenerator.getDocument(); // Attributes