Hi. Trying to get image of specified size
private Bitmap Convert(SizeF size)
{
//Load the input PDF file
var lDoc = new PdfLoadedDocument("exportAsImageTest.pdf");
var dpi = 300;
//Export first page as image
Bitmap result;
if (size.IsEmpty)
{
result = lDoc.ExportAsImage(0, dpi, dpi);
}
else
{
result = lDoc.ExportAsImage(0, size, dpi, dpi, true);
}
lDoc.Close(true);
return result;
}
If I don't specify size, I get
{Width = 2480 Height = 3507}
If I specify size in pixels, Width=1000, Height=1000, I get
{Width = 2209 Height = 3125}
If I specify same size in points, Width=240, Height=240, I get
{Width = 530 Height = 750}
How to correctly specify size to get image of desired siz
Attachment:
exportAsImageTest_83f7441f.zip