The "RasterizePdfComponent" is a component designed for pdf file rasterization.
It has simple interface where you initialize object with initial file path and just call convert method. Rasterization quality and output path can also be optionally specified.
This component uses Ghostscript.NET for pdf to image conversion and itextsharp to combine images to final pdf file.
- teachers can make their pdf material non searchable / non copyable;
- a way to simplify overcomplicated vectorized pdf's.
- Make sure you have native ghostscript library (gsdll32.dll, version >= 9.23) installed
- Add project from NuGet in Visual Studio:
- Select your .NET project
- Right click References
- Click Manage NuGet Packages...
- In Browse tab search for RasterizePdfComponent
- install RasterizePdfComponent and other associate packages
using RasterizePdfComponent;
RasterizePdf sample = new RasterizePdf(@"E:\MainTestFolder\MyTestPdf.pdf");
sample.Convert();
Converted file will have dpi=100 and be located at E:\MainTestFolder\MyTestPdf_Rasterized.pdf
For more detailed example please look here