Git Product home page Git Product logo

ghostscriptsharp's Introduction

GhostscriptSharp

GhostscriptSharp is a simple C# wrapper for the Ghostscript library.

Using GhostscriptSharp

The GhostscriptWrapper class contains 3 static methods that can be used to generate jpg images from a PDF file.

Generate an Image for a Single Page

This method will generate a single thumbnail for a single page at the given output path

GeneratePageThumb(string inputPath, string outputPath, int page, int width, int height)

Parameters

  • inputPath a path to the PDF file
  • outputPath the path where you would like the output jpg
  • page the page number for the page you want to create an image from
  • width the width of the image
  • height the height of the image

Generate Multiple Images for Multiple Pages

This method generates a collection of thumbnail jpgs for the PDF at the input path, starting with firstPage and ending with lastPage. Put "%d" somewhere in the output path to have each of the pages numbered.

GeneratePageThumbs(string inputPath, string outputPath, int firstPage, int lastPage, int width, int height)

Parameters

  • inputPath a path to the PDF file
  • ouputPath the path where you would like the output jpgs to go (put '%d' somewhere in the path to have the jpgs numbered)
  • firstPage the first page to start generating the thumbnails from
  • lastPage the last page to end the thumbnail generator
  • width the width of the image
  • height the height of the image

Generate Output Based on Settings

This method generates Ghostscript output at the given output path based on a collection of GhostscriptSettings. (See the source for a list of possible settings)

GenerateOutput(string inputPath, string outputPath, GhostscriptSettings settings)

Parameters

  • inputPath a path to the PDF file
  • outputPath the path where you would like the output jpg
  • settings a collection of settings for the output (see source for more details)

ghostscriptsharp's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.