From 509b95e3a2eeb70bec47a1980c889c6fe17813fa Mon Sep 17 00:00:00 2001 From: Rasjid Wilcox Date: Wed, 7 Mar 2018 17:04:56 +1100 Subject: [PATCH] Use PdfRenderFlags.CorrectFromDpi so that the DPI settings in 'Export bitmaps' have an effect. --- PdfiumViewer.Demo/MainForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PdfiumViewer.Demo/MainForm.cs b/PdfiumViewer.Demo/MainForm.cs index e65cddf5..72aab0c5 100644 --- a/PdfiumViewer.Demo/MainForm.cs +++ b/PdfiumViewer.Demo/MainForm.cs @@ -157,7 +157,7 @@ private void renderToBitmapsToolStripMenuItem_Click(object sender, EventArgs e) for (int i = 0; i < document.PageCount; i++) { - using (var image = document.Render(i, (int)document.PageSizes[i].Width, (int)document.PageSizes[i].Height, dpiX, dpiY, false)) + using (var image = document.Render(i, (int)document.PageSizes[i].Width, (int)document.PageSizes[i].Height, dpiX, dpiY, PdfRenderFlags.CorrectFromDpi)) { image.Save(Path.Combine(path, "Page " + i + ".png")); }