Created
October 30, 2019 09:42
-
-
Save GroupDocsGists/1c37f098e8961eba75acefd8a6a98b84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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