ghostscript

Ghost Script pdf thumbnail in .NET

南楼画角 提交于 2019-12-11 14:51:54
问题 I want to display thumbnails of the uploaded pdf files on my website(ASP.NET). So far I have done following things. From this link i got the idea to use ghostscript How to generate thumbnail for some pages of a PDF file? You could probably use one of the general-purpose PDF libraries: • Ghostscript - C, available under the GPL • Poppler - C++, available under the GPL • Adobe PDF Library SDK - expensive Google reveals quite a few PDF-to-image converters which you may be able to incorporate if

Create image of, “specific page” of postscript file using ghostscript

泪湿孤枕 提交于 2019-12-11 12:42:41
问题 Please someone help me with ghostscript.... I want to create image of a particular page postscript file using ghostscript. I will specify the page number or something like that will get the respective image as output. Is this possible with ghostscript? 回答1: In current versions of Ghostscript you have two choices: 1) Render every page to an image file, use the '%d' file name format so that you know which page you want, delete the others. 2) PostScript is a programming language. Write a

Determine the max resolution (DPI) on a PDF page

左心房为你撑大大i 提交于 2019-12-11 12:38:28
问题 I am using GhostScript.Net to rasterize PDF to page images before sending the page images to the printer. I am doing this so that I can always rasterize to 300dpi. This allows me to print the PDF in a reasonable amount of time regardless of the size of any image in the PDF (mainly scanned PDFs). However, it strikes me that in some cases there will not be a need to rasterize as high as 300dpi. It may be possible to rasterize to 200dpi or even 100dpi depending on the content of the page. Has

Building GhostScript 9.04 Win32

对着背影说爱祢 提交于 2019-12-11 12:03:39
问题 I want to build GhostScript 9.04 for Win32 and I have read the documentation to do so which details creating your own makefile project. I was just curious about the "ghostscript.vcproj" I'm finding in the top level directory. If I convert this to VS2010, I seem to get a good build out of it. Is there any reason not to use this "ghostscript.vcproj"? The build commandline seems to have some extra stuff in it than what is detailed in the documentation, so I was worried that it might be making

Error trying to create a jpeg thumb image of a PDF using Imagick on Godaddy server

倾然丶 夕夏残阳落幕 提交于 2019-12-11 12:03:07
问题 I'm getting this error trying to convert a pdf to a jpeg thumbnail: Fatal error: Uncaught exception 'ImagickException' with message 'PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dUseCIEColor -dFirstPage=1 -dLastPage=1 "-sOutputFile=/tmp/magick-1514TynhowIwvsS8%d" "-f/tmp/magick-1514ToUFRp0QWKlG" "-f/tmp/magick-1514zEMWRNGv55Od"':

Why converting this PDF file fails when using ImageMagick/Ghostscript?

人盡茶涼 提交于 2019-12-11 11:07:15
问题 I want to convert this PDF file compiled with LaTeX (XeLaTeX engine so that to use an Arabic font) and I want to upload it to the web and prevent copy and paste of its content. Since I am looking for a freeware to do that, I came across two powerful beasts to do this job, namely, ImageMagick and Ghostscript . All what I need is to convert one text PDF to image PDF in one go, preferably with batch processing if possible (to convert many PDFs in one go). I run this code in command line and it

Remove images from PDF

血红的双手。 提交于 2019-12-11 08:44:02
问题 I read Create a tiff with only text and no images from a postscript file with ghostscript and try to use KenS`s answer. But this method remove only "black" images - image contain data only in black channel (PDF has colorspace CMYK). How can i remove all images in my case? 回答1: This does a better job, but its incomplete. It doesn't deal with images using multiple data sources for example. Its essentially untested, except that I did test your smaller file (pages.pdf) by using ps2write to

How to rotate PDF page with iTextSharp without causing error in ghostscript?

偶尔善良 提交于 2019-12-11 08:01:12
问题 I'm trying to use iTextSharp to rotate a page & have it read by ghostscript to generate the pages as images. This is how I'm rotating the pages: byte[] retVal = null; using (MemoryStream oOutput = new MemoryStream()) { PdfReader oPDFReader = new PdfReader(BaseFile); PdfStamper stamper = new PdfStamper(oPDFReader, oOutput ); for (var pageNum = 1; pageNum <= oPDFReader.NumberOfPages; pageNum++) { var oDocumentPage = DocumentPages.Where(page => page.PageNumber == pageNum && page.RotationDegree !

Convert all files in a folder from PDF to PCL with Ghostscript

↘锁芯ラ 提交于 2019-12-11 07:45:47
问题 I'm trying to use Ghostscript to convert my files in PDF to PCL. I'm able to convert one file with this command: gswin64c -dBATCH -dNOPAUSE -dSAFER -sDEVICE=pxlcolor -sOutputFile=[PCLPath].pcl [PDFPath].pdf It works fine, I think, if you see anything wrong or not needed please say me. The question is to convert all files in a folder, I don't know how to change the command line to do that, or what I have to do, maybe a script file?? Other question is if there is someway to accelerate the

How to crop a multipage pdf using ghostscript with an array of page specific cropboxes

余生颓废 提交于 2019-12-11 06:45:43
问题 This post is a follow-up of "How do I crop pages 3&4 in a multipage pdf using ghostscript", but it changes the input to an array of data. The quest: I have a pdf file (a set of drawings) where all pages have the same size and I want to crop some pages in one way and others differently. The following screenshot shows how I generated the data below for cropping:spreadsheet The "left,bottom,right,top" are to be handed over to the postscript /CropBox [934 350 3318 2034] command. Pagenumbers are