Search Results

Search found 105 results on 5 pages for 'ghostscript'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Where are ghostscript options / switches documented?

    - by sdaau
    I know there is a Ghostscript option, for instance -dPDFSETTINGS=/screen - where is that documented? How can I see what other options it accepts, appart from screen? Also, -dMaxSubsetPct=100 - what does it do? I open man gs, search for PDFSET, I get "Pattern not found". I type in a search engine, I get a myriad of personal webpages, no documentation hits. Can anyone help with a link? Many thanks in advance, Cheers! EDIT: also see this related post: Querying Ghostscript for the default options/settings of an output device (such as 'pdfwrite' or 'tiffg4') - Stack Overflow ... for getting a list of supported options for a given device.

    Read the article

  • Stuck GhostScript processes, how to debug?

    - by Jonathan
    Having a problem with Ghostscript processes that don't end. This does not happen often, probably once every 3 weeks we see this issue with 1-3 processes. Running CentOS 6.4 on a VPS from Rackspace. We use PrinceXML to generate PDFs which uses GhostScript to handle fonts. Here's an image of top: http://i.stack.imgur.com/J9D7D.jpg As you can see those two processes are using a lot of resources, I haven't killed them yet in hopes someone can help me diagnose. I'm a developer not a server admin so I have a basic knowledge of *nix but no clue on how to fix this. Installed strace and ran it on each process with the following command: strace -p 20619 -s 80 -o gs.txt Left it for 5m, gs.txt is empty? Thanks in advance!

    Read the article

  • using ghostscript in server mode to convert pdfs to pngs

    - by emh
    while i am able to convert a specific page of a PDF to a PNG like so: gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 -sOutputFile=gymnastics-20.png -dFirstPage=20 -dLastPage=20 gymnastics.pdf i am wondering if i can somehow use ghostscript's JOBSERVER mode to process several conversions without having to incur the cost of starting up ghostscript each time. from: http://pages.cs.wisc.edu/~ghost/doc/svn/Use.htm -dJOBSERVER Define \004 (^D) to start a new encapsulated job used for compatibility with Adobe PS Interpreters that ordinarily run under a job server. The -dNOOUTERSAVE switch is ignored if -dJOBSERVER is specified since job servers always execute the input PostScript under a save level, although the exitserver operator can be used to escape from the encapsulated job and execute as if the -dNOOUTERSAVE was specified. This also requires that the input be from stdin, otherwise an error will result (Error: /invalidrestore in --restore--). Example usage is: gs ... -dJOBSERVER - < inputfile.ps -or- cat inputfile.ps | gs ... -dJOBSERVER - Note: The ^D does not result in an end-of-file action on stdin as it may on some PostScript printers that rely on TBCP (Tagged Binary Communication Protocol) to cause an out-of-band ^D to signal EOF in a stream input data. This means that direct file actions on stdin such as flushfile and closefile will affect processing of data beyond the ^D in the stream. the idea is to run ghostscript in-process. the script would receive a request for a particular page of a pdf and would use ghostscript to generate the specified image. i'd rather not start up a new ghostscript process every time.

    Read the article

  • Image Magick and Ghostscript

    - by user114671
    I mainly do web design but I host a few client sites on a Centos 5 VPS. A new client has asked me to host their site and I've been given the following configuration requirement: Apache 2.2.3 PHP 5.2.17 MySQL 5.0.77 Image Magick 6.5.1-0 (not as an Apache module) Ghostscript 8.7 Checking php_info() I have: Apache 2.2.3 PHP 5.2.14 MySQL 5.0.90 I don't have IM or GS listed. I expect that my versions of PHP and MySQL are similar enough to work, but how do I get my server set up to work with this client's site as well?

    Read the article

  • Using Ghostscript in a Webapplication (PDF Thumbnails)

    - by cpt.oneeye
    Hello, i am using the ghostscriptsharp wrapper for c# and ghostscript. I want to generate thumbnails out of pdf-files. Further Information on the sample-code are given here. There are different Methods imported form the ghostscript-c-dll "gsdll32.dll". [DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")] private static extern int CreateAPIInstance(out IntPtr pinstance, IntPtr caller_handle); [DllImport("gsdll32.dll", EntryPoint = "gsapi_init_with_args")] private static extern int InitAPI(IntPtr instance, int argc, IntPtr argv); //...and so on I am using the GhostscriptWrapper for generating the thumbnails in a webapplication (.net 2.0). This class uses the methods imported above. protected void Page_Load(object sender, EventArgs e){ GhostscriptWrapper.GeneratePageThumb("c:\\sample.pdf", "c:\\sample.jpg", 1, 100, 100); } When i debug the Web-Application in Visual Studio 2008 by hitting key "F5" it works fine (a new instance of webserver is generated). When i create a WindowsForm Application it works too. The thumbnails get generated. When i access the application with the webbrowser directly (http://localhoast/mywebappliation/..) it doesn't work. No thumbnails are generated. But there is also no exception thrown. I placed the gsdll32.dll in the system32-folder of windows xp. The Ghostscript Runtime is installed too. I have given full access in the IIS-Webproject (.Net 2.0). Does anybody know why i can't access Ghostscript from my webapplication? Are there any security-issues for accessing dll-files on the IIS-Server? Greetings Klaus

    Read the article

  • Can GhostScript run in Medium Trust

    - by SkippyFire
    I am using GhostScript to generate some thumbnails of PDF pages in an ASP.NET application. I have it wrapped in this library called GhostScriptSharp that just uses DllImport to call methods in the GhostScript DLL. It looks like this wont work on a medium trust hosting environment, either because of the fact that it is calling unmanaged code, or that it looks like the library is creating files all over the place (outside my virtual directory). I ran Process Monitor and saw it trying to Read, QueryNameInformationFile, CreateFile and QueryStandardInformationFile in places like: C:\WINDOWS\system32\Halftone\Default or C:\gs\gs8.63\lib\Halftone\Default or C:\gs\font\Halftone\Default Any ideas about whether this is "fixable" to run in medium trust? If I can't use GhostScript, is there another free/open source library that WILL work in Medium trust?

    Read the article

  • Weird problem, with ghostscript and pdf files.

    - by kofucii
    Hello, am using ghostscript to create pdf file from postscript file. My PS file, doesn't have orientation instructions, so when I want to create landscape pdf file, I'm using ghostscript to rotate the page. The problem is, that ghostscript rotates only the first page, and when my pdf file is more than 1 page, the others, are not rotated correctly. Here is the command I'm using: cat $psinput | gs -sPAPERSIZE=a4 -sDEVICE=pdfwrite -sOuputFile="/tmp/pdf" \ -dAutoRotatePages="/None" -c "<< /Orientation 3 >> setpagedevice" \ 90 rotate 0 -595 translate -dNOPAUSE -dEPSCrop -f - -c -quit Does anybody have an idea how to correct this?

    Read the article

  • Can Ghostscript to start numbering pages from zero?

    - by SuZi
    I am using Ghostscript to convert a multi-page pdf to individual jpg files and can get it to output the files numbered like page_%03d.jpg but it always starts at page_001.jpg and i need it to start numbering the output files starting from page_000.jpg. Is there a setting i can use to get Ghostscript to start at zero or am i going to have to rename all the files after processing?

    Read the article

  • Convert a PDF to a Transparent PNG with GhostScript

    - by Jonathon Wolfe
    Hi all. I am attempting, unsuccessfully, to use Ghostscript to rasterize PDF files with a transparent background to PNG files with a transparent background. I've searched high and low for questions from others attempting the same thing and none of the posted solutions, which as far as I can tell come down to specifying -sDEVICE=pngalpha, have worked with my test files. At this point I would really appreciate any advice or tips a more experienced hand could provide. My test PDF is located here: http://www.kolossus.com/files/test.pdf It could be that the issue is with this file, but I doubt it. As far as I can tell, it has no specified background, and when I open the file with a transparency-aware app like Photoshop or Illustrator, sure enough it displays with a transparent background. However, when opened with an application like Adobe Reader the file is rendered with a white background. I believe that this has more to do with the application rendering the PDF than with the PDF itself -- apps like Adobe Reader assume you want to see what a printed document will look like and therefore always show a white canvas behind the artwork -- but I can't be sure. The gs command I'm using is: gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r72 -sOutputFile=test.png test.pdf This produces a PNG that has transparent pixels outside of the bounding box of the artwork in the file, but all pixels that are inside the artwork's bounding box are rasterized against a white background. This is a problem for me, as my artwork has drop shadows and antialiased edges that need to be preserved in the final output, and can't just be postprocessed out with ImageMagick. A sample of my PNG output is at the same location as the pdf above, with .png at the end (stackoverflow won't let me include more than one url in my post). Interestingly, I see no effects from using the -dBackgroundColor flag, even if I set it to something non-white like -dBackgroundColor=16#ff0000. Perhaps my understanding of the syntax of this flag is wrong. Also interestingly, I see no effects from using the -dTextAlphaBits=4 -dGraphicsAlphaBits=4 flags to try to enable subpixel antialiasing. I would also appreciate any advice on how to enable subpixel antialiasing, especially on text. Finally, I'm using GPL Ghostscript 8.64 on Mac OS 10.5.7, and the rendering workflow I'm trying to get set up is to generate transparent PNG images from PDFs output by PrinceXML. I'm calling Ghostscript directly for the rasterization instead of using ImageMagick because ImageMagick delegates to Ghostscript for PDF rasterization and I should be able to control the rasterization better by calling GS directly. Thanks for your help. -Jon Wolfe

    Read the article

  • GhostScript PDF Merging (Losing Editable Fields)

    - by Scott
    I'm using GhostScript to merge to PDFs into one PDF. One of the PDFs has textbox fields (editable fields) that I created in Adobe Acrobat Pro 9. When I merge these two PDFs with GhostScript I lose the textbox fields. Is there any way to merge these files (using GS or some other free linux software) that keeps the textbox fields intact?

    Read the article

  • What could be causing my Ghostscript to fail

    - by simplr
    When I run ps2pdf I get the following error messages: norman@host:~$ ps2pdf test.ps test.pdf While reading gs_dbt_e.ps: ERROR: /syntaxerror in -file- Operand stack: (gs_cidfm.ps) 1 --nostringval-- Execution stack: %interp_exit --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:928/1123(G)-- --dict:0/20(G)-- --dict:74/200(L)-- --dict:928/1123(G)-- --dict:8/8(G)-- --dict:1/1(G)-- Current allocation mode is global Current file position is 4623 norman@host:~$ I have tried re-installing gs and gs-esp without affect. Files test.ps, gs_dbt_e.ps and gs_cidfm.ps all checked against a working system as being good. Regardless of what postscript file I try to convert, the "Current file position is 4623" remains exactly the same. The host is running Ubuntu 7.04. Any suggestions as to what I should re-install will be much appreciated.

    Read the article

  • "jpeglib.h: No such file or directory" ghostscript port in OPENBSD

    - by holms
    Hello I have a problem with compiling a ghostscript from ports in openbsd 4.7. SO i have jpeg-7 installed, I have latest port tree for obsd4.7. ===> Building for ghostscript-8.63p11 mkdir -p /usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63/obj gmake LDFLAGS='-L/usr/local/lib -shared' GS_XE=./obj/../obj/libgs.so.11.0 STDIO_IMPLEMENTATION=c DISPLAY_DEV=./obj/../obj/display.dev BINDIR=./obj/../obj GLGENDIR=./obj/../obj GLOBJDIR=./obj/../obj PSGENDIR=./obj/../obj PSOBJDIR=./obj/../obj CFLAGS='-O2 -fno-reorder-blocks -fno-reorder-functions -fomit-frame-pointer -march=i386 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/8.63\"' prefix=/usr/local ./obj/../obj/gsc gmake[1]: Entering directory `/usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63' cc -I./obj/../obj -I./src -DHAVE_MKSTEMP -O2 -fno-reorder-blocks -fno-reorder-functions -fomit-frame-pointer -march=i386 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/8.63\" -DGX_COLOR_INDEX_TYPE='unsigned long long' -o ./obj/../obj/sdctc.o -c ./src/sdctc.c In file included from src/sdctc.c:17: obj/jpeglib_.h:1:21: jpeglib.h: No such file or directory In file included from src/sdctc.c:19: src/sdct.h:58: error: field `err' has incomplete type src/sdct.h:70: error: field `err' has incomplete type src/sdct.h:72: error: field `cinfo' has incomplete type src/sdct.h:73: error: field `destination' has incomplete type src/sdct.h:84: error: field `err' has incomplete type src/sdct.h:87: error: field `dinfo' has incomplete type src/sdct.h:88: error: field `source' has incomplete type gmake[1]: *** [obj/../obj/sdctc.o] Error 1 gmake[1]: Leaving directory `/usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63' gmake: *** [so] Error 2 *** Error code 2 Stop in /usr/ports/print/ghostscript/gnu (line 2225 of /usr/ports/infrastructure/mk/bsd.port.mk). I tried to place one more param in CFLAGS in Makefile with value "-I/usr/local" but no luck =( People in irc [freenode server, #openbsd channel] refuses give any help for ports at all, and even more - because this is 4.7 unstable version. I have my reasons to use this version and ports believe me =) CFLAGS+= -DSYS_TYPES_HAS_STDINT_TYPES \ -I${LOCALBASE}/include \ -I${LOCALBASE}/include/ijs \ -I${LOCALBASE}/include/libpng \

    Read the article

  • Create pdf file with ghostscript

    - by kofucii
    Hello, I'm using SCO Unix, with old version of ghostscript (7.7). When I convert the postscript source file to pdf otput file, It's content is visible on the SCO machine. But when I copy the pdf file into windows, and open it with adobe acrobat, all I can see is a blank page. Does anybody have a solution to this?

    Read the article

  • Hooks in ghostscript

    - by anon
    Anyone know the right places to hook into ghostscript, so that when interpreting a ps file, I can get logs of all calls of the form: draw_character(float x, float y, string font_name, int char_id); ? Basically I want to take a postscript file, and get a list of where all characters are drawn to the screen. Thanks!

    Read the article

  • Using GhostScript to get page size

    - by Aristoteles
    Is it possible to get the page size (from e.g. a PDF document page) using GhostScript? I have seen the "bbox" device, but it returns the bounding box (it differs per page), not the TrimBox (or CropBox) of the PDF pages. (See http://www.prepressure.com/pdf/basics/page_boxes for info about page boxes.) Any other possibility?

    Read the article

  • Converting PDF to PostScript with GhostScript

    - by Joel Martinez
    I installed ghostscript and updated the appropriate path variables ... however, I'm getting an error when I try to execute this command: C:\PROGRA~1\gs\gs8.64\lib>pdf2ps mydocument.pdf mydocument.ps Access is denied. Unable to open command line file _.at Is this the right command? did I miss some configuration or path setting? Otherwise, is there a sane method of doing this conversion? Thanks!

    Read the article

  • GhostScript font issues

    - by Robert
    I'm running GPL Ghostscript 8.70 (2009-07-31) on Windows XP. I have about 100 PDF files I've attempted to run through GS, but I'm having font-related issues on two separate groups of files from two different customers. I'm not sure if the issues could be related. Here are the two errors I receive: Loading Courier font from C:\Program Files\gs\fonts/cour.ttf... 2343384 986555 13583240 12261829 3 done. Using CourierNewPSMT font for Courier. Error: /rangecheck in --get-- Can't find CID font "Arial". Substituting CID font /Adobe-Identity for /Arial, see doc/Use.htm#CIDFontSubstitution. The substitute CID font "Adobe-Identity" is not provided either. Will exit with error. Error: /undefined in findresource I've tried just about everything I can think of with fontmap and cidfmap. Does anyone out there have a solution?

    Read the article

  • Obey the MediaBox/CropBox in PDF when using ghostscript to render a PDF to a png

    - by gordonwatts
    I've been using ghostscript to convert my single figure plots rendered in PDF to png: gswin32c -sDEVICE=png16m -r300x300 -sOutputFile=junk.png -dBATCH -dNOPAUSE Figure_001-a.pdf This works in the sense I get a png out and it contians the plot. But it contains a huge amount of white space as well (an example source image: http://cdsweb.cern.ch/record/1258681/files/Figure_001-a.pdf). If you view it in Acrobat you'll note there is no white space around the plot. If you use the above command line you'll find the plot is only about 1/3 of the space. When doing the same thing with an eps file I run into the same problem. However, there is the command-line parameter -dEPSCrop that one can pass to get the PS rendering engine to pay attention to the BoundingBox. I need the similar argument for rendering PDF's. I was not able to find it in docs (nor even the EPSCrop, actually).

    Read the article

  • How to make GhostScript PS2PDF stop subsetting fonts

    - by gavin-softyolk
    I am using the ps2pdf14 utility that ships with GhostScript, and I am having a problem with fonts. It does not seem to matter what instructions I pass to the command, it insists on subsetting any fonts it finds in the source document. e.g -dPDFSETTINGS#/prepress -dEmbedAllFonts#true -dSubsetFonts#false -dMaxSubsetPct#0 Note that the # is because the command is running on windows, it is the same as =. If anyone has any idea how to tell ps2pdf not to subset fonts, I would be very greatful. Thanks --------------------------Notes ------------------------------------------ The source file is a pdf containing embedded fonts, so it is the fonts already embedded in the source file, that I need to prevent being subset in the destination file. Currently all source file embedded fonts are subset, in some cases this is not apparent from the font name, i.e it contains no hash, and appears at first glance to be the full font, however the widths array has been subset in all cases.

    Read the article

  • PHP exec error, possibly MAMP using ghostscript

    - by user1762526
    I have been trying to use ghostscript in PHP to convert pdf files to images (png, jpg). I don't really care as long as they are images. This is the code that I used. exec("gs -sDEVICE=jpeg -sOutputFile=/Applications/Mamp/htdocs/cover.jpg -r144 /Applications/Mamp/htdocs/test.pdf"); When I enter the exact same thing, without the exec and quotes obviously, into the command line it does exactly what I want. However, when I run the php file nothing happens. I am using a MAMP server and the server seems to work fine, whenever I run another file with it I have no issues. Anyone have any ideas why it might not execute right?

    Read the article

  • How to print PDF on default network printer using GhostScript (gswin32c.exe) shell command

    - by Maciej
    I'd like to print PDF file(s) on windows' network printer via GhostScript. (I dont want to use Adobe Reader) I've read gswin32c.exe which can do the job. I experimented with many commands and coudn't find the way how to force gs to print PDF on my (windows default) network drive. I don't need point exact network printer- default can be used. But if there is no such option I'm happy to pass printer name as well. (I've tried with param -SDevice="\server_IP\printer_name" but this didnt work as well...) Command working under Windows cmd: gswin32c -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=1 -sDEVICE=ljet4 -sOutputFile="\\spool\\\Server_Name\Printer_name" "C:\test.pdf" Method created base on above - doesnt work and thorws exception. (Error code = 1) /// <summary> /// Prints the PDF. /// </summary> /// <param name="ghostScriptPath">The ghost script path. Eg "C:\Program Files\gs\gs8.71\bin\gswin32c.exe"</param> /// <param name="numberOfCopies">The number of copies.</param> /// <param name="printerName">Name of the printer. Eg \\server_name\printer_name</param> /// <param name="pdfFileName">Name of the PDF file.</param> /// <returns></returns> public bool PrintPDF (string ghostScriptPath, int numberOfCopies, string printerName, string pdfFileName) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.Arguments = " -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=" + Convert.ToString(numberOfCopies) + " -sDEVICE=ljet4 -sOutputFile=\"\\\\spool\\" + printerName + "\" \"" + pdfFileName + "\""; startInfo.FileName = ghostScriptPath; startInfo.UseShellExecute = false; Process process = Process.Start(startInfo); return process.ExitCode == 0; } Any idea how to make it working under C#?

    Read the article

1 2 3 4 5  | Next Page >