I’m generating a preview image of a PDF using PngDevice. Some of the text on the screen is miss aligned.
MemoryStream stream = new MemoryStream();
Document pdfDocument = new Document(sourceFileInfo.FullFilePath);<span style="color:#2b91af;">Page</span> firstPage = pdfDocument.Pages.Cast<<span style="color:#2b91af;">Page</span>>().First(); <span style="color:#2b91af;">PngDevice</span> pngDevice = <span style="color:blue;">new</span> <span style="color:#2b91af;">PngDevice</span>((<span style="color:blue;">int</span>)firstPage.MediaBox.Width, (<span style="color:blue;">int</span>)firstPage.MediaBox.Height); pngDevice.Process(firstPage, stream);