I Have a problem with exporting a PDF to an Image when i set the DPI:
public static Bitmap ConvertPdfToBitmap(string filepath, int dpi)
{
Bitmap bmp = null;
PdfViewerControl loadedDocument = new PdfViewerControl();
loadedDocument.Load(filepath);
bmp = loadedDocument.ExportAsImage(0);
bmp = loadedDocument.ExportAsImage(0, bmp.HorizontalResolution *2, bmp.VerticalResolution*2) ;
return bmp;
}
When i use the DPI settings, the image DPI gets higher but the image itself is nto stretched. White space is added around it, even when I put in an integer like 300,300 it is the same thing.
Is this a bug or am i doing something wrong?
Attachment:
20190117_19_40_31_665a0895.rar