← Back to Blog
How to Generate PDF from Form Data Automatically
April 10, 2026 · Form2Doc Team

How to Generate PDF from Form Data Automatically

How to Generate PDF from Form Data Automatically

You need a client to fill out a form, and you need a polished PDF document on the other end — a contract, an invoice, a certificate, or a report. But manually transferring data from form submissions into document templates is tedious and error-prone.

The solution: automatically generate PDFs from form data. When someone submits a form, the data flows into a template, and a finished PDF is created instantly.

This guide shows you exactly how to set it up — no coding required.


Why Convert Form Submissions to PDF?

Professional Output

Form data alone is just text in a database. A PDF gives you a formatted, branded document you can share with clients, print, or archive.

Legal Requirements

Many industries require signed, formatted documents — not just form responses. Contracts, NDAs, and agreements need to be in document format.

Client Experience

Sending a client a polished PDF within seconds of their form submission shows professionalism and speed that builds trust.

Record Keeping

PDFs are the standard for archiving business documents. They preserve formatting across devices and can't be accidentally edited.


4 Ways to Generate PDF from Form Data

Method 1: Form2Doc (Recommended — No Code)

Best for: Businesses that want to go from form to PDF in minutes without any coding.

How it works:

  1. Create a form with the Form2Doc visual builder
  2. Create a Google Docs template with {{placeholders}}
  3. Connect the template to the form
  4. When someone submits the form → PDF is generated automatically

Pros:

  • Setup in 5 minutes
  • No coding required
  • Uses Google Docs (familiar tool)
  • Generates both DOCX and PDF
  • Email + Telegram notifications
  • Free plan available

Cons:

  • Requires Google Drive for templates

Try Form2Doc free →


Method 2: Google Forms + Apps Script

Best for: Developers comfortable with JavaScript who want a free DIY solution.

How it works:

  1. Create a Google Form
  2. Create a Google Docs template
  3. Write an Apps Script that triggers on form submission
  4. Script copies template, replaces placeholders, exports as PDF

Example script snippet:

function onFormSubmit(e) {
  const responses = e.namedValues;
  const templateId = 'YOUR_TEMPLATE_DOC_ID';
  const doc = DriveApp.getFileById(templateId).makeCopy();
  const body = DocumentApp.openById(doc.getId()).getBody();
  
  body.replaceText('{{name}}', responses['Name'][0]);
  body.replaceText('{{email}}', responses['Email'][0]);
  body.replaceText('{{date}}', responses['Date'][0]);
  
  doc.saveAndClose();
  // Convert to PDF and email...
}

Pros:

  • Completely free
  • Full control over the process

Cons:

  • Requires coding knowledge
  • Fragile — scripts break when forms change
  • No built-in error handling
  • Limited formatting options
  • Maintenance burden on you

Method 3: Zapier + Document Generation Service

Best for: Teams already using Zapier who want to add document generation to existing workflows.

How it works:

  1. Create a form in any tool (Google Forms, Typeform, etc.)
  2. Set up a Zap triggered by form submission
  3. Connect to a document generation step (WebMerge, Documint, etc.)
  4. Output PDF is saved to Google Drive or emailed

Pros:

  • Works with many form tools
  • Visual workflow builder

Cons:

  • Gets expensive quickly ($20+/month for Zapier + document service)
  • Multiple subscriptions to manage
  • Slower — Zap execution can take minutes
  • Complex setup for simple use cases

Method 4: Custom Code (Node.js / Python)

Best for: Developers building custom applications who need full control.

How it works:

  1. Build a form endpoint (Express, FastAPI, etc.)
  2. Use a library like Puppeteer, wkhtmltopdf, or pdfkit to generate PDFs
  3. Merge form data into an HTML or DOCX template
  4. Convert to PDF and deliver

Pros:

  • Complete control
  • Can handle any complexity
  • No vendor dependency

Cons:

  • Significant development time (days to weeks)
  • Need to handle hosting, errors, scaling
  • Maintenance is on you
  • Overkill for most use cases

Step-by-Step: Form to PDF with Form2Doc

Let's walk through the fastest method:

Step 1: Create Your Template in Google Docs

Open Google Docs and write your document. Use {{double_curly_braces}} for any data that should come from the form:

INVOICE #{{invoice_number}}
Date: {{date}}

Bill to: {{client_name}}
Company: {{company}}
Email: {{client_email}}

Description: {{service_description}}
Amount: {{amount}} USD

Payment due: {{due_date}}

Step 2: Create Your Form

In Form2Doc, create a new form with fields for each variable:

Field NameField TypeMaps to Template
Invoice NumberText{{invoice_number}}
DateDate{{date}}
Client NameText{{client_name}}
CompanyText{{company}}
Client EmailEmail{{client_email}}
Service DescriptionText Area{{service_description}}
AmountNumber{{amount}}
Due DateDate{{due_date}}

Step 3: Connect Template

  1. Link your Google Docs template to the form
  2. The system automatically detects {{variables}} and maps them to form fields
  3. Choose output format: PDF, DOCX, or both

Step 4: Test It

Fill in the form with test data. Within seconds:

  • ✅ PDF is generated with all data merged in
  • ✅ You receive a notification with the document link
  • ✅ Document is saved to Google Drive automatically

Step 5: Share

Copy the form link and share it with clients, embed it on your website, or send it via email.


Common Use Cases for Form-to-PDF Automation

📄 Contracts

Client fills in project details → contract PDF generated with all terms filled in → ready for signature.

🧾 Invoices

Order form submitted → invoice PDF created with itemized list and total → emailed to customer.

📋 Certificates

Course completion form → certificate PDF with student name, course title, and date → emailed instantly.

📊 Reports

Data submission form → formatted report PDF with tables and calculations → stored in Google Drive.

📝 Applications

Application form → formatted application document → sent to review committee.


Tips for Better Form-to-PDF Automation

1. Design Your Template First

Start with the final document you want, then build the form to match. This ensures you collect exactly the data you need.

2. Use Conditional Logic

Some tools (including Form2Doc) support formulas and conditional fields. Show different sections based on form responses.

3. Test with Edge Cases

Try submitting with very long names, special characters, and empty optional fields. Make sure your template handles all cases gracefully.

4. Set Up Notifications

Always configure email or Telegram notifications so you know when new documents are generated.

5. Use Number-to-Text for Legal Documents

For contracts and invoices, display amounts in both numbers and words: "$5,000 (Five thousand dollars)". Form2Doc supports this with built-in number-to-text formulas.


FAQ

Can I generate PDFs from forms on my website?

Yes. Form2Doc provides an embed code so you can add the form to any website. When visitors submit the form, a PDF is generated automatically.

What if I need to generate DOCX, not PDF?

Form2Doc generates both DOCX and PDF from the same template. Choose the format that works for your workflow.

Can I customize the PDF design?

Your PDF inherits the design from your Google Docs template — fonts, colors, logos, tables, headers, and footers are all preserved.

Is there a limit on how many PDFs I can generate?

Free plans typically have submission limits (Form2Doc offers 10/month on the free plan). Paid plans offer more submissions at affordable rates.


Conclusion

Generating PDFs from form data doesn't require custom code or expensive enterprise software. With Form2Doc, you can go from a blank form to automated PDF generation in under 10 minutes.

The workflow is simple:

  1. Template in Google Docs
  2. Form in Form2Doc
  3. Connect them
  4. PDFs generate automatically on every submission

Try it free — create your first form-to-PDF workflow →