Is PDFium supports WebP image format?

89 views
Skip to first unread message

Deepak G

unread,
Jul 29, 2021, 7:58:12 AM7/29/21
to pdfium
Is PDFium supports WebP image format?

Lei Zhang

unread,
Jul 29, 2021, 10:38:59 AM7/29/21
to Deepak G, pdfium
Why does PDFium need to support WebP?

On Thu, Jul 29, 2021 at 4:58 AM Deepak G <deepa...@gmail.com> wrote:
>
> Is PDFium supports WebP image format?
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/48646d54-8104-4ccc-acbb-a8731f00e5a3n%40googlegroups.com.

Deepak G

unread,
Jul 29, 2021, 11:48:50 AM7/29/21
to Lei Zhang, pdfium
I think I have not clealy asked the question. Currently it is possible to get pages as images in .png format. Is it possible to get in WebP image format?

Lei Zhang

unread,
Jul 29, 2021, 11:55:39 AM7/29/21
to Deepak G, pdfium
To further clarify, how are you using PDFium to convert PDF pages to PNGs?

Deepak G

unread,
Jul 29, 2021, 12:17:51 PM7/29/21
to Lei Zhang, pdfium
Using the below link to run the sample, the PDF pages are rendered as .png images

Lei Zhang

unread,
Jul 29, 2021, 12:20:25 PM7/29/21
to Deepak G, pdfium
The sample program is just that, a sample program. It converts to a
few formats, but is not intended to be one that converts to all
formats. If you want to output to WebP, feel free to extend your copy
of the sample program to do that.

Deepak G

unread,
Jul 29, 2021, 12:32:18 PM7/29/21
to Lei Zhang, pdfium
Ok. Thank you for the details. May I know what the FDF_RenderPage method returns? Still now I thought it returns a PDF page as Bitmap. 

Lei Zhang

unread,
Jul 29, 2021, 2:16:59 PM7/29/21
to Deepak G, pdfium
The return type for FPDF_RenderPage() is void. One passes a HDC for it
to render into. This is explained by the comments in
public/fpdfview.h.
Reply all
Reply to author
Forward
0 new messages