How to render the page as EMF or meta file in pdfium.

250 views
Skip to first unread message

Mohan Selvaraj

unread,
Mar 7, 2018, 8:23:45 AM3/7/18
to pdfium
Hi ALL,

currently i have generated the PDF page as bitmap by using FPDF_RenderPageBitmap method,Is there any method for rendering the pdf page as EMF or as metafile in PDFium. Kindly provide the details,

Thanks,
Mohan S

Dan Sinclair

unread,
Mar 7, 2018, 10:17:40 AM3/7/18
to Mohan Selvaraj, pdfium
I know there is a  FPDF_SetPrintMode(FPDF_PRINTMODE_EMF) (which is the default value) that can be called on Windows. There is then a FPDF_RenderPage() method which is defined on windows which takes an HDC to render too.  I believe you can then get the EMF data out of the HDC, you can take a look the Chrome printing code which does this I believe.

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+unsubscribe@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/12982c61-e5f6-4ddf-9d2e-52229d218e6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lei Zhang

unread,
Mar 15, 2018, 3:56:22 AM3/15/18
to Mohan Selvaraj, pdfium
Look at WriteEmf() in samples/pdfium_test.cc.
> --
> 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.
Reply all
Reply to author
Forward
0 new messages