Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
string outputFileTemplate = Path.Combine("c:\output", "converted-page-{0}.png");
SavePageStream getPageStream = page => new FileStream(string.Format(outputFileTemplate, page), FileMode.Create);
using (Converter converter = new Converter("sample.pdf"))
{
ImageConvertOptions options = new ImageConvertOptions
{
Format = ImageFileType.Png,
FlipMode = ImageFlipModes.FlipY,
Brightness = 50,
Contrast = 50,
Gamma = 0.5F,
Grayscale = true,
HorizontalResolution = 300,
VerticalResolution = 100
};
converter.Convert(getPageStream, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.