# Convert HTML (containing SVG) to PDF using PDFNetJs in a browser

**URL:** <https://community.apryse.com/t/convert-html-containing-svg-to-pdf-using-pdfnetjs-in-a-browser/3231>\
**Category:** Apryse SDK\
**Tags:** salesforce\
**Created:** [May 18, 2017, 9:33am UTC](https://community.apryse.com/t/convert-html-containing-svg-to-pdf-using-pdfnetjs-in-a-browser/3231 "2017-05-18T09:33:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Armin](https://community.apryse.com/letter_avatar_proxy/v4/letter/a/b9e5f3/32.png) [@Armin](https://community.apryse.com/u/Armin)\
**Post date:** [May 18, 2017, 9:33am UTC](https://community.apryse.com/t/convert-html-containing-svg-to-pdf-using-pdfnetjs-in-a-browser/3231/1 "2017-05-18T09:33:13Z")

</div>

I am evaluating the use of PDFNetJs for one of our customers.

We need in-browser functionality for merging arbitrary PDF files into one single file. Merging works with PDFNetJs like a charm.

The second requirement to create PDF content from HTML including SVG graphics. I could not find any useful information about HTML2PDF support for JavaScript running in a browser. At least there seems to exist an API for HTML2PDF in PDFNetJs but it does not work as expected (in the evaluation version).

My question: Is it possible (and if so how) to convert HTML and SVG to PDF by the help of PDFNetJs running in a browser environment?

---

<div class="post-metadata">

**Author:** ![Ryan](https://community.apryse.com/user_avatar/community.apryse.com/ryan/32/314_2.png) [@Ryan](https://community.apryse.com/u/Ryan)\
**Post date:** [May 19, 2017, 8:26pm UTC](https://community.apryse.com/t/convert-html-containing-svg-to-pdf-using-pdfnetjs-in-a-browser/3231/2 "2017-05-19T20:26:14Z")

</div>

Thank you for your interest in our products.

The HTML2PDF API is actually a server side only technology. That API should not be available in PDFNetJS. I’ll look to see that corrected for a future release.

Could you clarify why HTML and SVG to PDF conversion is important for you?  
Why is it important to do in the browser?

---

<div class="post-metadata">

**Author:** ![Armin](https://community.apryse.com/letter_avatar_proxy/v4/letter/a/b9e5f3/32.png) [@Armin](https://community.apryse.com/u/Armin)\
**Post date:** [May 22, 2017, 1:28pm UTC](https://community.apryse.com/t/convert-html-containing-svg-to-pdf-using-pdfnetjs-in-a-browser/3231/3 "2017-05-22T13:28:33Z")

</div>

Thanks for clarification.

The situation is as follows:  
On the server side we have a Salesforce environment where this kind of functionality is not available.  
The application is designed to be a cloud-only solution running virtually in any browser.  
Some diagrams and graphics are rendered in SVG and would have to be somehow embedded in a PDF document as well.
