How it works

Upload & Edit
Your PDF Document
Save, Download,
Print, and Share
Sign & Make
It Legally Binding
Customers love our service for intuitive functionality
Rated 4.5 out of 5 stars by our customers

PDFkit Html To PDF: What You Should Know

GetElementById('text')).write(text); doc (FS.getElementById('text')).close(); PDF = new FS('FS', style('PDF'), 'print'); PDF.write(FS.getElementById('text')); PDF.close(); In this article, I will explain in detail how to convert HTML/CSS/JS/Images to PDF. Here I am explaining how I convert HTML/CSS to PDF. The following code snippet demonstrates how to convert HTML to PDF.  HTML to PDF converter using html2pdf JavaScript function.  Get HTML document with <title> text in it   Use html2pdf to create a PDF document   Convert your HTML pages in your PDF   Convert image to PDF and save it as a file. HTML to PDF converter using Node.js Use to convert text from HTML to PDF. Node.js to PDF Converter How to create PDF by creating JavaScript files from HTML   Using FSS, FS, HTTP, wkhtmlloto and FSS   Create PDF by using   Create PDF with pdfjs.js   Convert CSS from HTML on JS   Convert JS from HTML on js.js How to convert HTML to PDF. HTML to PDF converter using PHP HTML to PDF converter in PHP. This will convert HTML into PDF. HTML to PDF generator with Python HTML to PDF converter and Generator in Python. This will convert HTML to PDF, convert images into PDF and make PDF to web. How to convert HTML to PDF in Node.js. Using Profit How to convert HTML to PDF in Node.js. Using Profit.js it will convert text to PDF and convert images to PDF. The code can be found here. HTML to PDF in Node.js using Profit HTML to PDF Generator using Python HTML to PDF Generator can be found here. HTML to PDF Converter with Node.js using FSS Node.js to PDF Converter can be found here. How to convert HTML to PDF in Python using Profit How to convert HTML to PDF in Python will help you convert HTML into PDF. Profit is written in Python. This will help you convert your HTML to PDF easily. The following code example will convert your HTML to PDF in python.</p> </div> </div> <div class="page-section page-section--video-instruction"> <div class="page-section__inner"> <div class="section-title">Video instructions and help with filling out and completing pdfkit html to pdf</div> <div class="video-container"> <div class="video-player video-player--red"> <div class="video-player__lazyframe" data-vendor="youtube" data-src="https://www.youtube.com/embed/m3u3oLgDcJI?autoplay=1"></div> <a class="video-player__link" href="https://www.youtube.com/watch?v=m3u3oLgDcJI" target="_blank">Video instructions and help with filling out and completing pdfkit html to pdf</a> </div> </div> </div> </div> <div class="page-section page-section--related"> <div class="page-section__inner"> <h2 class="section-title">Related Content - PDFkit HTML To PDF</h2> <div class="cards"> <a class="card" target="_blank" rel="nofollow" href="https://effect.bfw.wiki/effect/16594868696994290011.html"> <div class="card__title">pdfkit实现在浏览器中创建pdf文档并预览下载效果代码-html代码</div> <div class="card__description">pdfkit实现在浏览器中创建pdf文档并预览下载效果代码. pdfkit实现在浏览器中创建pdf文档并预览下载效果代码. 在线编辑此代码 全屏查看 下载此特效代码 收藏. PDF ...</div> </a> <a class="card" target="_blank" rel="nofollow" href="http://wtkrieger.faculty.noctrl.edu/csc495-spring2016/students/pdf_gem.pdf"> <div class="card__title">Mark Prucha PDF Gem There are 4 widely-used ...</div> <div class="card__description">PDF Gem. There are 4 widely-used gems for converting files to PDF format. These are: PDFKit, wkhtmltopdf, Wicked PDF (which builds off of wkhtmltopdf), ...</div> </a> <a class="card" target="_blank" rel="nofollow" href="https://nvd.nist.gov/vuln/detail/CVE-2007-2405"> <div class="card__title">CVE-2007-2405 Detail - NVD</div> <div class="card__description">Description. Integer underflow in Preview in PDFKit on Apple Mac OS X 10.4.10 allows remote attackers to execute arbitrary code via a crafted PDF file.</div> </a> </div> </div> </div> </div> <footer class="layout-responsive__footer"> <div class="page-footer"> <div class="page-footer__row page-footer__row--functions"> <div class="page-footer__row-inner"> <div class="service-functions-menus"> <h2 class="service-functions-menus__title">Choose the way of PDF processing</h2> <div class="service-functions-menus__areas"> <div class="service-functions-menus__area"> <div class="service-functions-menu"> <div class="service-functions-menu__title">Convert & Compress</div> <div class="service-functions-menu__list"> <a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://compress-pdf-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-compress-pdf"></div> </div> Compress PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://pdf-converting.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-converter"></div> </div> Convert PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://ocr-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-ocr-pdf"></div> </div> OCR PDF </a></div> </div> </div> <div class="service-functions-menus__area"> <div class="service-functions-menu"> <div class="service-functions-menu__title">Split & Merge</div> <div class="service-functions-menu__list"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://pdf-splitting.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-split-pdf"></div> </div> Split PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://pdf-merging-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-merge-pdf"></div> </div> Merge PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://combine-and-reorder-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-combine-and-reorder"></div> </div> Combine & Reorder </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://extract-pdf-pages.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-extract-pages"></div> </div> Extract Pages </a></div> </div> </div> <div class="service-functions-menus__area"> <div class="service-functions-menu"> <div class="service-functions-menu__title">Convert from PDF</div> <div class="service-functions-menu__list"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://pdf-to-word-conversion.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-to-word"></div> </div> PDF to Word </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://pdf-to-excel-conversion.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-to-excel"></div> </div> PDF to Excel </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://pdf-to-ppt-converter.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-to-ppt"></div> </div> PDF to PPT </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://convert-pdf-to-jpg-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-convert-to-jpg"></div> </div> PDF to JPG </a></div> </div> </div> <div class="service-functions-menus__area"> <div class="service-functions-menu"> <div class="service-functions-menu__title">View & Edit</div> <div class="service-functions-menu__list"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://online-pdf-editing.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-edit-pdf"></div> </div> Edit PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://delete-pages-in-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-delete-pages"></div> </div> Delete Pages </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://rotate-pdf-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-rotate-pdf"></div> </div> Rotate PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://online-pdf-reader.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-reader"></div> </div> PDF Reader </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://fill-pdf-and-edit.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-edit-and-fill"></div> </div> Edit & Fill </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://page-numbering-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-page-numbering"></div> </div> Page Numbering </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://watermark-on-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-watermark"></div> </div> Watermark </a></div> </div> </div> <div class="service-functions-menus__area"> <div class="service-functions-menu"> <div class="service-functions-menu__title">Convert to PDF</div> <div class="service-functions-menu__list"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://word-to-pdf-conversion.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-word-to-pdf"></div> </div> Word to PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://excel-to-pdf-converter.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-exel-to-pdf"></div> </div> Excel to PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://ppt-to-pdf-converter.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-ppt-to-pdf"></div> </div> PPT to PDF </a></div> </div> </div> <div class="service-functions-menus__area"> <div class="service-functions-menu"> <div class="service-functions-menu__title">Sign & Protect</div> <div class="service-functions-menu__list"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://e-sign-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-esign-pdf"></div> </div> eSign PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://protectpdfonline.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-protect-pdf"></div> </div> Protect PDF </a></div> </div> </div> </div> </div> <div class="service-functions-menus service-functions-menus--mobile"> <div class="service-functions-menus__title">Choose the way of PDF processing</div> <div class="accordion" role="tablist" aria-multiselectable="true"> <div class="accordion__item"> <div class="accordion__title" aria-selected="false"> <div class="icon-expand-status"></div> Convert & Compress </div> <div class="accordion__body"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://compress-pdf-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-compress-pdf"></div> </div> Compress PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://pdf-converting.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-converter"></div> </div> PDF Converter </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://ocr-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-ocr-pdf"></div> </div> OCR PDF </a></div> </div> <div class="accordion__item"> <div class="accordion__title" aria-selected="false"> <div class="icon-expand-status"></div> Split & Merge </div> <div class="accordion__body"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://pdf-splitting.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-split-pdf"></div> </div> Split PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://pdf-merging-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-merge-pdf"></div> </div> Merge PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://combine-and-reorder-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-combine-and-reorder"></div> </div> Combine & Reorder </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://extract-pdf-pages.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-extract-pages"></div> </div> Extract Pages </a></div> </div> <div class="accordion__item"> <div class="accordion__title" aria-selected="false"> <div class="icon-expand-status"></div> Convert from PDF </div> <div class="accordion__body"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://pdf-to-word-conversion.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-to-word"></div> </div> PDF to Word </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://pdf-to-excel-conversion.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-to-excel"></div> </div> PDF to Excel </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://pdf-to-ppt-converter.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-to-ppt"></div> </div> PDF to PPT </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://convert-pdf-to-jpg-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-convert-to-jpg"></div> </div> PDF to JPG </a></div> </div> <div class="accordion__item"> <div class="accordion__title" aria-selected="false"> <div class="icon-expand-status"></div> View & Edit </div> <div class="accordion__body"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://online-pdf-editing.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-edit-pdf"></div> </div> Edit PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://delete-pages-in-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-delete-pages"></div> </div> Delete Pages </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://rotate-pdf-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-rotate-pdf"></div> </div> Rotate PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://online-pdf-reader.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-pdf-reader"></div> </div> PDF Reader </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://fill-pdf-and-edit.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-edit-and-fill"></div> </div> Edit & Fill </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://page-numbering-online.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-page-numbering"></div> </div> Page Numbering </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://watermark-on-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-watermark"></div> </div> Watermark </a></div> </div> <div class="accordion__item"> <div class="accordion__title" aria-selected="false"> <div class="icon-expand-status"></div> Convert to PDF </div> <div class="accordion__body"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://word-to-pdf-conversion.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-word-to-pdf"></div> </div> Word to PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="http://excel-to-pdf-converter.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-exel-to-pdf"></div> </div> Excel to PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://ppt-to-pdf-converter.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-ppt-to-pdf"></div> </div> PPT to PDF </a></div> </div> <div class="accordion__item"> <div class="accordion__title" aria-selected="false"> <div class="icon-expand-status"></div> Sign & Protect </div> <div class="accordion__body"><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://e-sign-pdf.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-esign-pdf"></div> </div> eSign PDF </a><a target="_blank" class="service-functions-menu__list-item" rel="nofollow" content="noindex" href="https://protectpdfonline.com/"> <div class="service-functions-menu__list-item-icon"> <div class="icon icon-protect-pdf"></div> </div> Protect PDF </a></div> </div> </div> </div> </div> </div> </div> <div class="page-section page-section--footer"> <div class="page-section__inner"> <div class="page-section__row page-section__row--primary"> <div class="page-section__row-column"> <div class="page-footer-copyright"> <strong>© 2024 airSlate Inc.</strong> <br>All rights reserved. </div> </div> <div class="page-section__row-column"> <div class="page-footer-menu"> <div class="page-footer-menu__title">Resources</div> <div class="page-footer-menu__items"> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://www.airslate.com/workflows" rel="nofollow" target="_blank">airSlate workflows</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://www.uslegalforms.com" target="_blank">US Legal Forms</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://www.airslate.com" target="_blank">No-code document workflows</a> </div> </div> </div> </div> <div class="page-section__row-column"> <div class="page-footer-menu"> <div class="page-footer-menu__title">Functions</div> <div class="page-footer-menu__items"> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://watermark-on-pdf.com/watermark-on-pdf-additional-features" rel="dofollow">More Features</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="/faq" rel="dofollow">FAQ</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://watermark-on-pdf.com/general-functionality" rel="dofollow">General Functionality</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://watermark-on-pdf.com/watermark-on-templates" rel="dofollow">Feature and Template</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://watermark-on-pdf.com/watermark-on-pdf-by-document-type" rel="dofollow">By Document Type</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://watermark-on-pdf.com/watermark-on-pdf-by-os-and-browser-type" rel="dofollow">By OS and Browser Type</a> </div> <div class="page-footer-menu__item"> <a class="page-footer-menu__link" href="https://watermark-on-pdf.com/watermark-on-pdf-by-device-type" rel="dofollow">By Device Type</a> </div> </div> </div> </div> </div> <div class="page-section__row page-section__row--secondary"> <div class="page-section__row-column"> <div class="footer-terms-note"><a href="https://watermark-on-pdf.com/terms-of-service" rel="nofollow">Terms of Service</a> </div> </div> <div class="page-section__row-column"> <div class="footer-links-list"> <a href="https://watermark-on-pdf.com/privacy-notice" rel="nofollow">Privacy Notice</a> <a href="https://watermark-on-pdf.com/dmca" rel="nofollow">DMCA</a> <a href="https://watermark-on-pdf.com/patents" rel="nofollow">Patents</a> </div> </div> </div> </div> </div> </footer> </div> <div class="popup-cookie js-popup-cookie "> <div class="popup-cookie__close js-popup-cookie__close"></div> <div class="popup-cookie__row"> <div class="popup-cookie__column popup-cookie__column--description"> <div class="popup-title"></div> <div class="popup-cookie__column popup-cookie__column--description"> <div class="popup-title"></div> <div class="popup-text">We use cookies to improve security, personalize the user experience, enhance our marketing activities (including cooperating with our marketing partners) and for other business use. Click <a href="https://watermark-on-pdf.com/cookies" target="_blank" title="Cookie Policy">“here“</a> to read our Cookie Policy. By clicking “Accept“ you agree to the use of cookies. <span class="popup-readmore popup-readmore--more">... <span>Read more</span></span> <span class="popup-readmore popup-readmore--less">Read less</span></div> </div> </div> <div class="popup-cookie__column popup-cookie__column--action"><span class="button button--bordered js-popup-accept js-popup-cookie__close " onclick="formCookieGtm()" tabindex="0">Accept</span></div> </div> </div> <script> function formCookieGtm() { dataLayer.push({"event": "allowRemarketingCookies"}) return true; } </script> <div class="subscription--brown subscription"> <div class="subscription__title">Get your PDF documents done in seconds</div> <form class="form--subscribe" action="https://www.pdffiller.com/en/login/signup"> <div class="form__row"> <div class="form__column"> <input class="form-input form-input--email" id="emailField" name="email" type="email" required="required" placeholder="Enter your email"> <div class="response" id="response"></div> </div> <div class="form__column"><button class="button form-submit" id="button" type="submit">Get started</button></div> </div> </form> </div> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MJVML5S" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <!-- SKS tracking --> <script async src="https://cdn.mrkhub.com/sks/js/sks_track.js" onerror="window.scriptOnError(this)"></script> <script> window.onbeforeunload = function () { if (document.activeElement.matches('iframe')) { if (typeof gtag !== 'undefined') { gtag('event', 'click', { 'event_category': 'uploader', 'event_action': 'action', 'event_label': 'topdffiller' }); } else { window.dataLayer = window.dataLayer || []; dataLayer.push({ 'event': 'CustomEvent', 'eventCategory': 'uploader', 'eventAction': 'action', 'eventLabel': 'topdffiller' }); } } } </script> <script type="text/javascript" charset="utf-8"> var start; var end; window.addEventListener("AppStarted", editorLoad, false); function editorLoad(event) { end = new Date().getTime(); var loadTime = end - start; var body = { 'message': 'editor loaded', 'time': loadTime, }; var ajax = new XMLHttpRequest(); ajax.open('POST', '/editor-time', true); ajax.setRequestHeader('Content-Type', 'application/json'); ajax.send(JSON.stringify(body)); } function globalErrorHandler(event) { var body = { 'message': 'js error', 'level': 'error', 'data': { 'referrer': window.location.href, 'userAgent': window.navigator.userAgent, 'guestId': '971b41b4a3.1733244690', 'eventMessage': event.message, 'stackTrace': (event.error && event.error.stack) ? event.error.stack : null }, }; var ajax = new XMLHttpRequest(); ajax.open('POST', '/logger', true); ajax.setRequestHeader('Content-Type', 'application/json'); ajax.send(JSON.stringify(body)); } function scriptOnError(script) { console.log(script); var event = {message: 'script error: ' + script.src, error: {stack: ''}}; globalErrorHandler(event) } window.globalErrorHandler = globalErrorHandler; window.scriptOnError = scriptOnError; window.addEventListener('error', globalErrorHandler); var isGoToProductClicked = false function gotoProduct(event, url, id) { event.preventDefault(); start = new Date().getTime(); if (isGoToProductClicked) { return false; } if (typeof startLoad === 'function') { startLoad(); } isGoToProductClicked = true; setTimeout(function () { isGoToProductClicked = false; }, 3000); var data = {"event": "click"}; var request = new XMLHttpRequest(); request.open("POST", "/click-event/click", true); request.setRequestHeader("Content-Type", "application/json"); var that = this; request.onload = function () { if (request.readyState === 4) { if (!id) { id = that.getAttribute("data-sender-id"); } if (!url) { url = "https://edit-pdf.pdffiller.com/?ref=http%3A%2F%2Fwatermark-on-pdf.com%2F%3Fenv%3Dmicrosites"; } if (id == 'buttononepformonfunc') { url = that.getAttribute("data-link"); } dataLayer.push({ 'event': 'CustomEvent', 'eventCategory': id, 'eventAction': 'click', 'eventLabel': 'topdffiller' }); if (typeof sksTracker !== 'undefined') { sksTracker.trackEdit(); } // Only for ipads if ( ((' ' + document.getElementsByTagName('html')[0].className + ' ').indexOf('ios') > -1) || ((' ' + document.getElementsByTagName('html')[0].className + ' ').indexOf('ie') > -1) ) { setTimeout(function () { window.location.href = url; }, 1000) } else { window.location.href = url; } } else { // finishLoading(); } } request.send(JSON.stringify({ data: data })); } function logConv(event, url, id) { var data = { 'message': 'wizzard_conversion', 'level': 'warning' }; if (isGoToProductClicked) { return false; } isGoToProductClicked = true; setTimeout(function() { isGoToProductClicked = false; }, 3000); if(!id) { id = this.getAttribute("data-sender-id"); } if ( ((' ' + document.getElementsByTagName('html')[0].className + ' ').indexOf('ios') > -1) || ((' ' + document.getElementsByTagName('html')[0].className + ' ').indexOf('ie') > -1) ) { setTimeout(function() { var request = new XMLHttpRequest(); request.open("POST", "/logger", true); request.setRequestHeader("Content-Type", "application/json"); request.send(JSON.stringify({ data: data })); return false; }, 1000) } else { var request = new XMLHttpRequest(); request.open("POST", "/logger", true); request.setRequestHeader("Content-Type", "application/json"); request.send(JSON.stringify({ data: data })); } } window.addEventListener("load", function(event) { Array.prototype.forEach.call( document.querySelectorAll('[data-sender-id]'), function (element) { element.addEventListener('click', gotoProduct); element.addEventListener('keydown', function(e) { if (e.key == 'Enter') { gotoProduct.call(e.target); } }); } ); Array.prototype.forEach.call( document.querySelectorAll('.button.form-submit'), function (element) { element.addEventListener('click', logConv); element.addEventListener('keydown', function(e) { if (e.key == 'Enter') { logConv.call(e.target); } }); } ); }); </script> <script src="https://cdn.mrkhub.com/microsites/28/javascripts/functionalityPageV3.js" onerror="window.scriptOnError(this)"></script> <script src="https://cdn.mrkhub.com/microsites/28/legacy-js/pages/popup-cookie.js" onerror="window.scriptOnError(this)"></script> <script src="https://cdn.mrkhub.com/microsites/28/javascripts/extandPopupOupdatedBrowser.js" onerror="window.scriptOnError(this)" defer></script> <script src="https://cdn.mrkhub.com/microsites/28/javascripts/footer.js" onerror="window.scriptOnError(this)"></script> <script src="https://cdn.mrkhub.com/microsites/28/javascripts/MPS-150-rating-block.js" onerror="window.scriptOnError(this)"></script> <script src="https://cdn.mrkhub.com/microsites/28/legacy-js/pages/popup-subscription.js" onerror="window.scriptOnError(this)"></script> <script> window.dataLayer = []; var isUserClosePopUp = localStorage.getItem('isUserClosePopup'); if (isUserClosePopUp && isUserClosePopUp !== 'false') { dataLayer.push({ 'event': 'allowRemarketingCookies', 'blockRemarketingCookies': false }); } document.addEventListener('DOMContentLoaded', function() { var createDocumentSubmitButton = document.getElementById('createDocumentSubmit'); if (createDocumentSubmitButton) { createDocumentSubmitButton.addEventListener('click', function() { var selectedState = document.querySelector('#bannerStateDropdown .ui-dropdown-select__value span').textContent; var selectedTemplate = document.querySelector('#bannerTemplateDropdown .ui-dropdown-select__value span'); var selectedDataElement = document.querySelector('#bannerTemplateDropdown .ui-dropdown-select__value'); var template = ''; var dataValue = 1670; if (selectedTemplate) { template = selectedTemplate.textContent dataValue = selectedDataElement.getAttribute('data-value'); } var dataEvent = { } var jsonString = JSON.stringify(dataEvent); jsonString = jsonString.replace('nameOfForm', template); jsonString = jsonString.replace('state', selectedState); jsonString = jsonString.replace('id', dataValue); jsonString = jsonString.replace('domain', ''); var parsedObject = JSON.parse(jsonString); dataLayer.push(parsedObject); }); } }); dataLayer.push({ "SiteType": "microsite-func" }); dataLayer.push({ "ItemID": "func_1670", 'Language': 'en', }); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer', 'GTM-MJVML5S'); var data = {"event": "visit"}; var request = new XMLHttpRequest(); request.open("POST", "/click-event/click", true); request.setRequestHeader("Content-Type", "application/json"); request.send(JSON.stringify({ data: data })); var data = {"event": "pf_mks_scroll_to_footer"}; document.addEventListener('DOMContentLoaded', function () { var footer = document.querySelector('.footer, .layout-responsive__footer'); var isTracked = localStorage.getItem('isUserFooterScroll'); var handler = function() { var footerYOffset = document.body.scrollHeight - footer.scrollHeight - window.innerHeight; if (window.pageYOffset >= footerYOffset) { window.removeEventListener('scroll', handler); var request = new XMLHttpRequest(); request.open("POST", "/click-event/click", true); request.setRequestHeader("Content-Type", "application/json"); request.send(JSON.stringify({ data: data })); localStorage.setItem('isUserFooterScroll', true); } }; if (footer !== undefined && !isTracked) { window.addEventListener('scroll', handler); } })</script></body> </html>