Text is not rendered properly when EMF is drawn over the canvas using PDFium

52 views
Skip to first unread message

sabari anand

unread,
Mar 13, 2018, 2:50:17 AM3/13/18
to pdfium
I have created a EMF for a page of the PDF document using PDFium. But the text rendered from the EMF on a canvas is not proper. I have attached the the text from the PDF document and part of the text available in the EMF in the attachments. The code snippet I have used is given below.

IntPtr pages = PdfiumViewer.FPDF_LoadPage(doc, pageIndex);
IntPtr dc = graphicss.GetHdc();
PdfiumNative.FPDF_RenderPage(dc, pages, 0, 0, Width, Height, 0, PdfiumNative.FPDF.PRINTING);

Can you please provide a solution to fix this?





oriimage.jpg
image.jpg

Dan Sinclair

unread,
Mar 13, 2018, 10:25:41 AM3/13/18
to sabari anand, pdfium, Lei Zhang
It almost looks like a font issue? Doe you know if the font is embedded in the PDF or pulled from the system? I'm not sure how EMF gets access to fonts, if it uses ones provided or uses the system fonts.

dan



--
You received this message because you are subscribed to the Google Groups "pdfium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
To post to this group, send email to pdf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/f86ad6b7-cc06-47a4-bb93-ec6cf6103333%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lei Zhang

unread,
Mar 15, 2018, 4:02:16 AM3/15/18
to sabari anand, pdfium
Does "pdfium_test --emf input.pdf" generate an input.pdf.emf with the
same problem?
Reply all
Reply to author
Forward
0 new messages