Dear Mike,
Thanks for your waiting.
The new version has been released, please download and test
Spire.PDFViewer Pack(Hotfix) Version:2.0.16.
Downloading link: http://www.e-iceblue.com/Download/download-pdf-viewer-for-net-now.html
The below code as a referance.
Save the specified PDF page as image with specified size in WPF application, SaveAsImage(int pageNumber, int imageWidth, int imageHeight).
- Code: Select all
using (FileStream fs = new FileStream("sample.png", FileMode.Create))
{
BitmapSource bs= viewer.SaveAsImage(1, 800, 1000);
BmpBitmapEncoder encoder = new BmpBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bs));
encoder.Save(fs);
}
Save the specified PDF page range as tiff file in WPF application, SaveAsImage(string tiffFilePath, int[] pagesNumbers).
- Code: Select all
int[] pageNumbers = {1, 3, 4};
viewer.SaveAsImage("sample.tiff", pageNumbers);
Save the specified PDF page range as tiff file with specified size in WPF application, SaveAsImage(string tiffFilePath, int[] pagesNumbers, int imageWidth, int imageHeight).
- Code: Select all
int[] pageNumbers = {1, 3, 4};
viewer.SaveAsImage("sample.tiff", pageNumbers,800,1000);
Regards,
Amy
E-iceblue support team