ghostscript

variable data in ghostscript commandline

青春壹個敷衍的年華 提交于 2019-12-13 05:02:01
问题 OK... It's me again. Same project. I'm trying to loop through files in a directory and set the page size on all the PDFs. I'm having difficulty getting the file names in the parameters I need to pass them through ghostscript. I gave up on changing the parameters IN the .run shell command and decided to create the parameters in a variable (as you can see). My problem seems to be in the strParam variable that I am passing. It looks correct when I check it in the msgbox but when the script runs

.pbm file image render - [vhold] scanline-wiggles?

北慕城南 提交于 2019-12-13 04:40:17
问题 I'm trying to hack-up a program to read a pbm, pgm, or ppm file and render the image to the postscript output device using the image operator. Just testing the P4 input (binary portable (1-bit) bitmap) path, but my output is all screwy. %! % cf. http://en.wikipedia.org/wiki/Netpbm_format % cf. http://en.wikipedia.org/wiki/Computer_Graphics (origin of image) % $ wget http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Spacewar%21-PDP-1-20070512.jpg/320px-Spacewar%21-PDP-1-20070512.jpg % $

Convert pdf to Tiff with same quality

强颜欢笑 提交于 2019-12-13 03:34:45
问题 We are using following shell script to convert pdf attachment in tiff but having some issue with quality, So can you please check below shell script and let us know anything where we can improve quality as well as compress file size too as much as possible while conversation. shell_exec('/usr/bin/gs -q -sDEVICE=tiffg4 -r204x392 -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile=america_out7.tif america_test.pdf'); We have tried following command and seems quality is better but when we are going to

How to call ghostscript from java with whitespaces in file paths

巧了我就是萌 提交于 2019-12-13 02:39:17
问题 Recently I found myself having to launch the ghostscript command from java, in both linux and windows environments, with whitespaces in input/output filenames. An example of the command follows: gs -q -dNOPAUSE -dBATCH -sDEVICE=pnggray -r300 -sOutputFile=/home/nic/tomcat/6.0.33 with spaces/temp/Thread-11/img-%03d.png /home/nic/tomcat/6.0.33 with spaces/temp/tmpfile.tmp The gs gets replaced by gswin32 on windows, given that ghostscript is in the Path. I quickly realized that I had to escape

ghostscript cmyk export yields wrong black

元气小坏坏 提交于 2019-12-12 23:38:23
问题 I'm trying to convert an RGB-pdf file created by Inkscape to a print ready cmyk-pdf using PSOcoated_v3.icc color profile. PDF generation works fine. However, I'd like to check for correct final colors, especially for the black. As I did not found any (free) tool to pick the cmyk color from the final pdf I thought as a first check I convert the RGB-pdf to cmyk-tiff and check the black value. Doing so using gs -q -dBATCH -dSAFER -dNOPAUSE \ -sDEVICE=tiff32nc \ -sDefaultRGBProfile=sRGB2014.icc \

Ghostscript doesn't keep landscape page orientation

淺唱寂寞╮ 提交于 2019-12-12 19:15:02
问题 Example: Create a one sheet landscape PDF from Excel. Open it using Adobe Reader, where it opens as landscape. Print it using Ghostscript. Open printout using Adobe Reader, and it should still be landscape, but it isn't. This issues happens whether or not the source is a PDF or Excel itself. I use a PDF source in the example because I figured that it would be easier to illustrate the issue. I know it can probably be forced to be printed using landscape. What I don't understand is why

Splitting single page into two pages with ghostscript

拈花ヽ惹草 提交于 2019-12-12 07:22:21
问题 I have a pdf with something like presentations slides and multiple slides per page. How can I use ghostscript to split the file so that there is one slide per page? 回答1: A long time ago I wrote some code for someone on comp.lang.postscript to do this, again it was for PowerPoint slides. This PostScript code assumes that all the 'subpages' (ie slides) are the same size and location on the PDF page and that all the PDF pages are the same size. Save the following as a file called pdf_slice.ps

Automatically Scaling SVG At Time of Creation

柔情痞子 提交于 2019-12-12 05:12:33
问题 Currently I'm using this command to generate the SVG: gs -sDEVICE=svg -dNOCACHE -sOutputFile="photo.svg" -q -dbatch -dNOPAUSE "photo.pdf.out" -c quit I'd like to double the size of the image. Using GS's -r and -g options just gives me the same image. I'm not sure these options are supported within GS with the SVG device. I've tried using ImageMagick's convert to bypass ghostscript but when I go to see the image in a browser it displays the SVG as code. The original image is a cropped PDF. I

ghostscript crop pdf not correctly

删除回忆录丶 提交于 2019-12-12 04:38:55
问题 inputPdf Use gswin32c.exe -o nul -sDEVICE=bbox bbox.pdf ,I'v hnow the BoundingBox of this pdf is %%BoundingBox: 6292 6865 8108 7535 %%HiResBoundingBox: 6292.907808 6865.505790 8107.091753 7534.493770, I want to get a pdf with the content in the BoundingBox. I am using the following command to crop a PDF: gswin32c -sDEVICE=pdfwrite -dFirstPage=1 -dLastPage=1 -o croped.pdf -dDEVICEWIDTHPOINTS=1815 -dDEVICEHEIGHTPOINTS=670 -dFIXEDMEDIA -c "6292 6865 translate 6292 6865 8107 7534 rectclip" -f

How do I insert bookmarks into a new PDF file using GhostXPS?

江枫思渺然 提交于 2019-12-12 03:24:45
问题 I want to convert XPS to PDF using GhostXPS. Using command line: "S:\GhostXPS\gxpswin32-9.18.exe" @"S:\Temp\PS\XPS\TestXPSWrite.txt" Where the options are in the TestXPSWrite.txt file: -sDEVICE=pdfwrite -sOutputFile="S:\Temp\PS\XPS\TestMerged.pdf" -dNOPAUSE -dBatch "S:\Temp\PS\XPS\Test1.xps" "S:\Temp\PS\XPS\Test2.xps" "S:\Temp\PS\XPS\Test3.xps" "S:\Temp\PS\XPS\Bookmarks.txt" Contents of Bookmarks.txt file: [/Title (Summary) /Page 1 /OUT pdfmark [/Title (TOC) /Page 2 /OUT pdfmark [/Title