postscript

Embed eps file in ps

。_饼干妹妹 提交于 2019-12-11 05:32:11
问题 I convert jpeg image to eps(encapsulated postscript) via jpeg2ps, now I want to embed newly created eps in PS(postscript) file, any idea? Actually in ps there are about 80 pages, I want to put eps file code in postscript as a header, and in all 80 pages I just want to use its reference to minimize the size of postscript. 回答1: This was offered to me years ago by Tom Greer via Tek-tips. We have been using this code for almost a decade and has always worked flawlessly: /ImageData currentfile <<

Is there a way to determine in .Net (or WMI) if a print driver will print to PCL or PostScript format when printing to a file?

我只是一个虾纸丫 提交于 2019-12-11 04:14:26
问题 Is there a way to determine in .Net (or WMI) if a print driver will print to PCL or PostScript or XPS format when printing to a file? 回答1: If your target OS is Windows, one more way is to do some logic on the driver and the print queue. You can use WMI/.NET APIs to get the driver DLL name. If it is unidrv.dll then the driver is a PCL driver and if it is pscript.dll then it is a PS driver. Of course, this is for drivers based on the MS Unidrv/PScript driver framework but you will find that a

ImageMagick Conversion from .ps to .png, run from python - invalid param

谁都会走 提交于 2019-12-11 04:07:01
问题 I have been looking through some similar posts and through the ImageMagick page, but I cannot seem to find a reason for my issue: Note I am using a windows machine. I have a .ps image in a folder and it works when running with the command to convert it from the cmd: convert saved.ps newsaved.png However when I try to execute it from my python script with the following code: args = ["convert","saved.ps newsave.png"] subprocess.Popen(args) #or this call(args) os.system("start newsave.png") The

Logo to PostScript mini-Compiler

旧巷老猫 提交于 2019-12-11 03:03:56
问题 I am currently writing a Logo to Postscript compiler. My PS output code doesn't seem to be valid. Any ideas what could be the problem? Or what the actual PostScript version for the LOGO should look like? The LOGO input code PROC LDRAGON ( LEVEL ) IF LEVEL == 0 THEN FORWARD 5 ELSE LDRAGON ( LEVEL - 1 ) LEFT 90 RDRAGON ( LEVEL - 1 ) ENDIF PROC RDRAGON ( LEVEL ) IF LEVEL == 0 THEN FORWARD 5 ELSE LDRAGON ( LEVEL - 1 ) RIGHT 90 RDRAGON ( LEVEL - 1 ) ENDIF PROC MAIN (VOID) LDRAGON ( 11 ) The code

Is there a way to display postscript (.ps) files on iOS?

十年热恋 提交于 2019-12-11 02:25:30
问题 I need to display .ps files in an iOS app. Native support for .ps to .pdf conversion appears to be switched off -- CGPSConverter, https://developer.apple.com/documentation/coregraphics/cgpsconverter?language=occ are not available on iOS: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_ps_convert/dq_ps_convert.html Does anyone know of another way? Is there any 3rd party library that could help me here? Please note that a Ghostscript

Converting/writing a BufferedImage to postscript

二次信任 提交于 2019-12-11 01:29:53
问题 I know how to draw some simple shapes using postcript I'm now looking how to draw the content BufferedImage(width*height) to a postscript page (x,y,width,height) without any external library (FOP,PDFBox...). Do you have any hint/code/algorithm ? Thanks ! :-) 回答1: One has to use the image or colorimage operators. Unlike the simple linedrawing and show text operator, these are complex operators that take several parameters. I am putting a sample postscript snippet which renders an 8 x 8 image

How to determine height and depth of a PostScript font?

天涯浪子 提交于 2019-12-10 15:37:13
问题 I'm looking for PostScript code that estimates a PostScript font's height (room for ascender) and depth (room for descender). Could a font's bounding box ( FontBBox ) be used for this?` Here is some background for my question: glyphs of a font are sitting on a baseline. Obviously glyphs with descenders will reach below the baseline and I want to know how far below the baseline descenders can reach such that I can provide sufficient space in a layout. I have seen PostScript code that renders a

Convert PDF to PostScript

放肆的年华 提交于 2019-12-10 12:16:23
问题 I need to convert a PDF file to PostScript using C#. Is it possible without using a third-party DLL? Or is there an open source project for the same? 回答1: The "cheapest" way to do this (I will not give my definition of 'cheap' in this context, though) would be to call one of the commandline utilities out there which can convert PDF to PostScript: gswin32c.exe (Win), gs (*nix): Ghostscript, multiplatform, GPL v3 license,... pdftops.exe (Win), pdftops (*nix): part of XPDF by Foolabs,

How to execute postscript file to a particular page number?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 12:13:39
问题 I have postscript file of 100 lines. I'm trying to merge 2 pdfs in to the single one with the help of ghostscript. What I want to do is, merge both pdf into one and than apply my postscript code in following manner: 1) first 50 lines of the postscript file should be applied on only page 1 of the generated pdf 2) remaining 50 lines to be applied on the 2nd page of the generated pdf. I have used following code to do that: gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf test.ps

php detect dpi of image in a pdf

拟墨画扇 提交于 2019-12-10 11:47:15
问题 I've tried a few tests using Imagick::getImageResolution on a PDF, and I can't figure out how to get the resolution (and colourspace) of an image embedded in a PDF. I've tried ripping the image out of the PDF, but during that process it seems the DPI is arbitrarily set to 72 not mater what I do. I saw in 1564529 someone said DPI doesn't matter to a PDF, but that is not true (when an image is embedded in a PDF, several attributes about the image, like resolution, are defined in the PostScript)