ghostscript

Print PDF using GhostScript

帅比萌擦擦* 提交于 2019-12-04 09:44:30
问题 I am in need of your support on the following issue since its pulling me for a while. We have a small c# utility, which print given PDF using GhostScript . This print as expected but fail to retain the page formatting’s. However, pages are printed as expected when I switch Adobe Acrobat in place of GhostScript . So I presume, I am making some obvious mistake on the GhostScript's command line arguments . Background Following is the core c# logic, which print a given PDF file with varying style

Converting correctly pdf to ps and vice-versa

两盒软妹~` 提交于 2019-12-04 09:41:23
问题 I'm using "pdftops" to convert .pdf files to .ps files and then "ps2pdf" for the reverse process (poppler-utils). The problem is that when creating the .pdf files from the .ps files, the text looks ok, but when i try to copy it, the characters are very strange (it's like they are corrupted). I used these tools on other files for a long time and it worked fine. I also tried "pdftohtml -xml" to create an .xml file, and the text is ok (the characters are extracted correctly). What problem could

Black color showing on CMY channels when converted to CMYK using GhostScript

∥☆過路亽.° 提交于 2019-12-04 06:06:13
问题 I am trying to generate a PDF using a library called wkhtmltopdf to create an RGB pdf. I am then using ghostscript to convert it to a CMYK format, however, the black text that is in the pdf is not pure black [cmyk(0,0,0,1)]. The black color is visible in other channels. The command for ghostscript is: gs -dBATCH -dNoOutputFonts -dNOPAUSE -dTextBlackPt=1 -dBlackPtComp=1 -sTextICCProfile -dNOCACHE -sDEVICE=pdfwrite -sProcessColorModel=DeviceCMYK -sColorConversionStrategy=CMYK -sOutputICCProfile

ImageMagick or GhostScript: convert a multi-page TIFF to a multi-page PDF

折月煮酒 提交于 2019-12-04 05:04:28
I need to convert a multi-page TIFF to a multi-page PDF. I have access to ImageMagick and GhostScript (in *nix environment). How do I do this? Thanks. UPDATE: It turns out that my test file was wrong (it didn't have multiple pages), which made me think my command was wrong. This seems to work for me: convert input.tif output.pdf Use a tool called tiff2ps from the tool set provided by libtiff: http://www.libtiff.org/tools.html Once you have the tiff in ps format, you can call ps2pdf to convert to pdf, which is part of the ghostscript package in most linux distributions. convert multipage.tiff

How to covert svg to eps in ghostscript

雨燕双飞 提交于 2019-12-04 04:57:36
Can you please help me with a command to convert svg file to eps in ghostscript? I tried to open the svg file in Gimp but it is very big so it looks like gimp cannot open it or it take too long. I have two files which I want to convert. Note: I have done a conversion from png to svg to convert raster to vectors and the convertion take most of my system disk space (almost 2GB). There for is it possible to use external cache drive for the command? You'll need the 'sister' application to Ghostscript, called GhostPDL. GhostPDL includes an executable named gsvg (or gsvg.exe on Windows) which can

What are best parameters to run ImageMagick to convert low quality pdf to images (for OCR)

别等时光非礼了梦想. 提交于 2019-12-04 03:18:01
I have several low quality pdfs. I would like to use OCR -- to be more precise Ocropus to get text from them. To do use, I use first ImageMagick -- a command line tool to convert pdf to images -- to transforms these pdfs into jpg or png. However ImageMagick produces very low quality images and Ocropus hardly recognizes anything. I would like to learn what are the best parameters for handling low quality pdfs to provide as-good-as-possible-quality images to OCR. I have found this page , but I do not know where to start. You can learn about the detailed settings ImageMagick's "delegates"

How can you find a problem with a programmatically generated PDF? [closed]

笑着哭i 提交于 2019-12-04 00:17:35
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . My group has been using the itext-sharp library and C#/.NET to generate custom, dynamic PDFs. For the most part, this process is working great for our needs. The one problem we can run into during development/testing is layout issues which can cause the PDF to not open/render correctly in Adobe Reader, esp. the newer versions of Acrobat/Reader. The document will open the display correctly for the first

AWS Lambda function - convert PDF to Image

烈酒焚心 提交于 2019-12-03 17:33:22
I am developing application where user can upload some drawings in pdf format. Uploaded files are stored on S3. After uploading, files has to be converted to images. For this purpose I have created lambda function which downloads file from S3 to /tmp folder in lambda execution environment and then I call ‘convert’ command from imagemagick. convert sourceFile.pdf targetFile.png Lambda runtime environment is nodejs 4.3. Memory is set to 128MB, timeout 30 sec. Now the problem is that some files are converted successfully while others are failing with the following error: { [Error: Command failed:

PDF to PostScript Using Ghostscript: large files having issues printing

不羁岁月 提交于 2019-12-03 17:16:18
I'm currently using Ghostscript to convert 500 page PDF files into PostScript. I'm using Windows 7, Ghostscript x64 v 9.16, and a Kodak Digimaster Commercial Printer. I use the following arguments for GhostScript to convert a PDF into PS: C:\Program Files\gs\gs9.16\bin\gswin64c.exe" -dCompressFonts=true -dSubsetFonts=true -dEmbedAllFonts=true -sFONTPATH=C:\Windows\Fonts\ -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile="PostScript.ps" "MyPdf.pdf" I then add %KDK (proprietary) commands to dictate which pages need to print on which paper by using the %KDKSlip command based on the Printer

Ghostscript convert a PDF and output in a textfile

廉价感情. 提交于 2019-12-03 15:26:51
1.I need to convert a PDF File into a txt.file. My Command seems to work, since i get the converted text on the screen, but somehow im incapable to direct the output into a textfile. public static string[] GetArgs(string inputPath, string outputPath) { return new[] { "-q", "-dNODISPLAY", "-dSAFER", "-dDELAYBIND", "-dWRITESYSTEMDICT", "-dSIMPLE", "-c", "save", "-f", "ps2ascii.ps", inputPath, "-sDEVICE=txtwrite", String.Format("-sOutputFile={0}", outputPath), "-c", "quit" }; } 2.Is there a unicode speficic .ps? Update: Posting my complete Code, maybe the error is somewhere else. public static