linkedinfacebooktwittermenuarrow-up

GemBox Support Forum

Loading PDF document from HTML

Hi there,

For our application, we need to create PDFs from HTML, and then do further work with those PDFs (add watermarks etc).

It seems like GemBox Pdf can do most of the things we require with the PDFs, but is it possible to Create a PDF from Html? I can see you can load from a Stream, but what kind of data is supported?

It looks like you can create PDFs from HTML with GemBox.Document, however we do not need any of the other functionality provided by that library, so having both seems like a waste.

Thank you!

Hi Alvin,

For HTML to PDF conversion, you’ll need to use GemBox.Document.

But note that GemBox.Document also supports other functionality that you may want in your output PDF. For example, it also supports Watermarks.

Can you tell me a bit more about the “further work” that you need to do on your PDF files?

Regards,
Mario

Hey Mario,

Thanks for your quick response!

Yeah I did a bit of research into which requirements each library would be able to meet. As you say Watermarks can be supported by both, and Page Sizes / Orientation / Margins seem to be better supported by Gembox.Document (though it’s possible with PDF through MediaBox I believe?).

One functionality we do require is the filling of form fields on a PDF form (this is a separately workflow to the one that requires HTML to PDF). As far as I can tell this is only possible with Gembox.PDF?

Thanks

Alvin

Hi Alvin,

Yes, you are correct. Working with form fields is only possible with GemBox.Pdf.
Also, yes MediaBox can be used to set page size and orientation.

I’m afraid it seems that you will need both GemBox.Document and GemBox.Pdf to accomplish all your workflows.

Regards,
Mario