![ghostscript commercial license price ghostscript commercial license price](https://www.gnostice.com/images/ANIMATION-XtremeDocumentStudio-Java-DOCX-viewing.gif)
![ghostscript commercial license price ghostscript commercial license price](https://ididtryit.files.wordpress.com/2018/09/image18.png)
Using (GhostScriptAPI api = new GhostScriptAPI())Īpi.Execute(this.GetConversionArguments(this._pdfFileName, outputFileName, pageNumber, this.PdfPassword, this.Settings)) Īs you can see, this is a very simple call - create an instance Throw new ArgumentException("Page number is out of bounds", "pageNumber") Is done using the ConvertPdfPageToImage method: public void ConvertPdfPageToImage(string outputFileName, int pageNumber)
GHOSTSCRIPT COMMERCIAL LICENSE PRICE PDF
The next step is to call GhostScript and convert the PDF which Returned as a strongly typed dictionary - the GhostScriptAPIĬlass will convert these into the correct GhostScript commands,īut the enum is much easier to work with from your code! Theįollowing is an example of the typical GhostScript commands toĬonvert a single page in a PDF document: -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -sOutputFile=tmp78BC.tmp -dFirstPage=1 -dLastPage=1 -dUseCIEColor -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dGridFitTT=2 -r150 -dUseCropBox=true sample.pdf If (settings.PaperSize != PaperSize.Default)Īrguments.Add(GhostScriptCommand.FixedMedia, true) Īrguments.Add(GhostScriptCommand.PaperSize, settings.PaperSize) Īrguments.Add(GhostScriptCommand.UseTrimBox, true) Īrguments.Add(GhostScriptCommand.UseCropBox, true) Īrguments.Add(GhostScriptCommand.PDFPassword, password) Īrguments.Add(GhostScriptCommand.InputFile, pdfFileName) Īs you can see from the method above, the commands are being If (settings.TrimMode != PdfTrimMode.PaperSize)Īrguments.Add(GhostScriptCommand.Resolution, ()) If (settings.AntiAliasMode != AntiAliasMode.None)Īrguments.Add(GhostScriptCommand.TextAlphaBits, settings.AntiAliasMode) Īrguments.Add(GhostScriptCommand.GraphicsAlphaBits, settings.AntiAliasMode) Īrguments.Add(GhostScriptCommand.GridToFitTT, settings.GridFitMode) GhostScript: protected virtual IDictionary GetConversionArguments(string pdfFileName, string outputImageFileName, int pageNumber, string password, Pdf2ImageSettings settings)Īrguments.Add(GhostScriptCommand.Silent, null) Īrguments.Add(GhostScriptCommand.Safer, null) Īrguments.Add(GhostScriptCommand.Batch, null) Īrguments.Add(GhostScriptCommand.NoPause, null) Īrguments.Add(GhostScriptCommand.Device, GhostScriptAPI.GetDeviceName(settings.ImageFormat)) Īrguments.Add(GhostScriptCommand.OutputFile, outputImageFileName) Īrguments.Add(GhostScriptCommand.FirstPage, pageNumber) Īrguments.Add(GhostScriptCommand.LastPage, pageNumber) Īrguments.Add(GhostScriptCommand.UseCIEColor, null) Quality, etc, and returns the appropriate commands to pass to Various properties of the conversion such as output format,
GHOSTSCRIPT COMMERCIAL LICENSE PRICE CODE
Most of the code in the class is taken up with the Settings.ImageFormat = ImageFormat.Png24 Settings.GridFitMode = GridFitMode.Topological Settings.AntiAliasMode = AntiAliasMode.High Typical settings could look like this: Pdf2ImageSettings settings
![ghostscript commercial license price ghostscript commercial license price](https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/fba58250-9e70-4bc4-bc24-cd2829ab2d42.png)
The dUseCropBox or the dUseTrimBox switches. Internally sets either the dFIXEDMEDIA and sPAPERSIZE or Milage may vary if you try and use the paper size option.