Hi, When I want to convert pdf file to jps files, watermark comes to in front of the text with a very dark color. Here is an example. http://www.pdf-to-image-online.com/result.rar I use windows platform and ghostscriptWrapper. And the dll version is 8.7.1 The parameters are here. Os is Windows 2003 Server. Thank you for any help // Keep gs from writing information to standard output "-q", "-dQUIET", "-dPARANOIDSAFER", // Run this command in safe mode "-dBATCH", // Keep gs from going into interactive mode "-dNOPAUSE", // Do not prompt and pause for each page "-dNOPROMPT", // Disable prompts for user interaction "-dMaxBitmap=500000000", // Set high for better performance // Set the starting and ending pages String.Format("-dFirstPage={0}", firstPage), String.Format("-dLastPage={0}", lastPage), // Configure the output anti-aliasing, resolution, etc "-dAlignToPixels=0", "-dGridFitTT=0", "-sDEVICE=jpeg", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", String.Format("-r{0}x{1}", width, height), // Set the input and output files String.Format("-sOutputFile={0}", outputPath), inputPath
This file claims to be %PDF-1.1 but uses transparency. Ghostscript doesn't check for transparency if it is not supported by the declared version of the file. Changing the file version to %PDF-1.5 fixes the problem. Since old version of PDF are not common now, the check for transparency is cheap, and mis-labeled files occur occasionally, the version check will be removed.
D'oh! Thanks Alex, that explains why extracting a single page with Acrobat and resaving solved the problem....
(In reply to comment #1) > This file claims to be %PDF-1.1 but uses transparency. > Ghostscript doesn't check for transparency if it is not supported by > the declared version of the file. Changing the file version to > %PDF-1.5 fixes the problem. > > Since old version of PDF are not common now, the check for transparency > is cheap, and mis-labeled files occur occasionally, the version check > will be removed. Thanks you(In reply to comment #2) > D'oh! Thanks Alex, that explains why extracting a single page with Acrobat and > resaving solved the problem.... Thank you guys
Created attachment 6244 [details] patch Check all PDF files for transparency features because some files have incorrect version number but Acrobat renders them just fine. The patch has been committed as a rev. 11162.