ScriptX.Cloud
HTML to PDF service
ScriptX.Cloud allows the easy conversion of any web page into a printable PDF or XPS via the click of a button.
- Unlimited users
- Free for 1 domain
- Zero installation required
ScriptX.Cloud HTML to PDF converter functionality for your website
Brilliant for testing and evaluation of ScriptX.Services
ScriptX.Cloud Features
Output HTML to print ready PDF
Control margins and orientation
Set headers and footers
Try it now
Click the button to receive a PDF conversion of this web page. This example is simple but the margins, the page header and footer and the paper orientation have all been described in JavaScript. CSS has been used to remove some content for the print and to layout the content appropriately. Notice the date and time in the PDF headers and footers – the PDF was produced right now; it isn’t a canned file. You will receive a PDF file – the output from our cloud service `printing` using a print to PDF print driver.
FREE Cloud service license
Give it a try! You can always upgrade your license later to print to printers and devices on your own premises.
How to use ScriptX.Cloud
Implementing save webpage as pdf with ScriptX.Cloud couldn’t be easier.
Once you have verified your free subscription, follow this simple guide to be up and running quickly. This is a basic guide; in-depth walk-through can be found here.
Add these JavaScript modules to the page:
The whole of MeadCo.ScriptX.Print.HTML is now available to the page and must be configured with:
- The url of the ScriptX.Services server.
- Your subscription identifier.
MeadCo.ScriptX.Print.HTML.connect(
"https://scriptxservices.meadroid.com/api/v1/printHtml",
"{replace-withyour-subsription-id}"
);
A UI is now needed for the user to click/touch, a button in standard html styled with some Bootstrap css and Font Awesome:
We need some code to set the desired properties and print the page:
function printPage() {
var settings = MeadCo.ScriptX.Print.HTML.settings;
settings.header = "ScriptX.Services :: Browser Agnostic Printing";
settings.footer = "&D&b&p of &P&b&t";
settings.page.orientation =
MeadCo.ScriptX.Print.HTML.PageOrientation.PORTRAIT;
var margins = settings.page.margins;
margins.left = 12.5;
margins.top = 12.5;
margins.bottom = 12.5;
margins.right = 12.5;
MeadCo.ScriptX.Print.HTML.printDocument(true);
});
And lastly, we handle the click event on the button to do the print:
document.getElementById("btn_printPage")
.addEventListener("click",function(event) {
printPage();
})
Need greater print control?
Try ScriptX.Services instead
ScriptX.Services is an evolution that provides developers with the tools they need to ensure the consistent formatting and appearance of printed content. We promise you’ll love it, and with an immediate sixty-day license there’s nothing to lose.