ghostscript

Converting PCL to PDF

三世轮回 提交于 2021-02-07 13:30:44
问题 I am looking to create (as a proof-of-concept) an OCaml (preferably) program that converts PCL code to PDF format. I am not sure where to start. Is there a standardized algorithm for doing so? Is there any other advice available for accomplishing this task? Thanks! 回答1: Conversion of PCL to PDF can be incredibly complex (assuming you need it to be generic and not just for simple PCL). We've investaged this many times and in the end always revert to using other tools. We keep investigating as

How to remove duplicate objects in PDF using ghostscript?

霸气de小男生 提交于 2021-02-07 08:40:55
问题 Using command-line ghostscript, is it possible to remove duplicate embedded objects (images) in the PDF and replace them with a single instance? I have a 200+ pages PDF with a background image and some smaller logos on each page. The file is very large, because the very same background image and logo binaries are embedded in each individual page, instead of being embedded once and then referenced on each page. I am not the creator of the PDF so I can not solve the problem at it's source. (I

How to remove duplicate objects in PDF using ghostscript?

孤者浪人 提交于 2021-02-07 08:39:55
问题 Using command-line ghostscript, is it possible to remove duplicate embedded objects (images) in the PDF and replace them with a single instance? I have a 200+ pages PDF with a background image and some smaller logos on each page. The file is very large, because the very same background image and logo binaries are embedded in each individual page, instead of being embedded once and then referenced on each page. I am not the creator of the PDF so I can not solve the problem at it's source. (I

Keep getting error messages in ghostscript when using the documented ghostscript syntax

瘦欲@ 提交于 2021-02-07 01:58:32
问题 I am new to ghostscript and I cannot figure out the syntax. Whenever I try the simplest of commands ex -h or -? I get an error and I have tried them in all sorts of combinations. GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>-h Error: /undefined in -h Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push

Keep getting error messages in ghostscript when using the documented ghostscript syntax

倾然丶 夕夏残阳落幕 提交于 2021-02-07 01:55:56
问题 I am new to ghostscript and I cannot figure out the syntax. Whenever I try the simplest of commands ex -h or -? I get an error and I have tried them in all sorts of combinations. GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>-h Error: /undefined in -h Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push

Keep getting error messages in ghostscript when using the documented ghostscript syntax

你。 提交于 2021-02-07 01:54:25
问题 I am new to ghostscript and I cannot figure out the syntax. Whenever I try the simplest of commands ex -h or -? I get an error and I have tried them in all sorts of combinations. GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>-h Error: /undefined in -h Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push

Keep getting error messages in ghostscript when using the documented ghostscript syntax

若如初见. 提交于 2021-02-07 01:54:24
问题 I am new to ghostscript and I cannot figure out the syntax. Whenever I try the simplest of commands ex -h or -? I get an error and I have tried them in all sorts of combinations. GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>-h Error: /undefined in -h Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push

Ghostscript On windows leads to Invalid option for -dPDFSETTINGS

ぃ、小莉子 提交于 2021-02-05 07:45:08
问题 To solve my problem here with compressing/down-sizing a PDF file generated by MikTeX on Windows, I am trying this bash script on Cmder as: shrinkpdf.sh in.pdf > out.pdf However I get the error: Invalid value for option -dPDFSETTINGS=C:/Program Files/Git/screen, use -sNAME= to define string constants which I suppose has to do with the line -dPDFSETTINGS=/screen I would appreciate it if you could help me know what is the problem and how I can solve it. My environment is: Windows OS: 1809 Cmder:

Ghostscript On windows leads to Invalid option for -dPDFSETTINGS

断了今生、忘了曾经 提交于 2021-02-05 07:45:06
问题 To solve my problem here with compressing/down-sizing a PDF file generated by MikTeX on Windows, I am trying this bash script on Cmder as: shrinkpdf.sh in.pdf > out.pdf However I get the error: Invalid value for option -dPDFSETTINGS=C:/Program Files/Git/screen, use -sNAME= to define string constants which I suppose has to do with the line -dPDFSETTINGS=/screen I would appreciate it if you could help me know what is the problem and how I can solve it. My environment is: Windows OS: 1809 Cmder:

How can I convert a .ps file into a .png file?

断了今生、忘了曾经 提交于 2021-01-29 10:48:52
问题 I need to convert .ps files to .png files as part of an image recognition program I am making. I know I can use Ghostscript or other programs, but could someone give a specific example of how to write something like this: def ps_to_png(ps_file): file = ghostscript.read(ps_file) png_file = ghostscript.save(file, "png") return png_file (This code is pseudo code- I want to know how to write something that actually does what this code looks like it will do.) Thanks in advance! Stack is a great