Generate a PDF or .docx (Client Side) with Javascript.

If you have ever needed to create a PDF document with info generated by the user you know this can be a daunting task. Dynamic text, images, and hyperlinks add to the complexity. Add in the business requirement for the generated file to render in a specific format and the task quickly becomes mountainous.

Generating a PDF on the server is often the path of least resistance. But requires lots of involvement from a variety of developers, additional planning, and design considerations.

A better way is to directly take the user input and render the PDF on the frontend. This results in less moving parts and a quicker go-to-market allowing the business to capitalize sooner on the added value.

Generating a PDF from the Client can be done using our Zocuments API in 3 simple steps:

Step 1: Create a .docx Template

Becomes:

Step 2: Gather Data

data = {
	"NAME" : "BILL,
	"TITLE" : "BBQ MASTER",
	"RECIPIENT_NAME" : "Bill Johnson",
	"ACHIEVEMENT" : "World's Best BBQ Pork Ribs"
}

Step 3: Generate PDF from Template & Gathered Data

More advanced features include the ability to insert images from a URL and create clickable hyperlinks to anywhere on the Internet.

Show Comments