Troubleshooting: PDF Generation Failures or Incorrect Formatting
Problem
An automation Sentence configured to generate a PDF using the "Generate PDF" action either:
- Fails to produce a PDF file (e.g., subsequent email action has no attachment).
- Generates a PDF, but the content is missing, data is incorrect, or the layout/formatting is broken.
Common Causes
- Incorrect Template Name: The Template Name specified in the "Generate PDF" Sentence action does not exactly match the unique name assigned to the uploaded Word template by Zudello staff.
- Template Issues (Word Document):
- Invalid Placeholders: Incorrect syntax used for placeholders (e.g., single curly braces
{ }
instead of double{{ }}
, incorrect field names{{ supplier_name }}
instead of{{ supplier.name }}
, typos). - Incorrect Loop Syntax: Errors in the
{{#lines}} ... {{/lines}}
tags for line item tables (e.g., tags placed outside table cells, mismatched tags). - Complex Word Features: Use of unsupported Word features (e.g., complex macros, embedded objects, certain types of content controls) that interfere with the conversion process.
- Corrupted Template File: The uploaded .docx template file itself is corrupted.
- Invalid Placeholders: Incorrect syntax used for placeholders (e.g., single curly braces
- Missing Data in Zudello Record: The Zudello transaction record (e.g., the Purchase Order) is missing data for fields referenced by placeholders in the template (e.g.,
delivery_address
is empty,supplier.tax_number
is empty). The PDF generates, but with blank spots. - Incorrect Data in Zudello Record: The data in the Zudello record is incorrect (e.g., wrong supplier linked, incorrect line item descriptions), leading to incorrect data appearing in the PDF.
- Sentence Logic Error: The Sentence runs the "Generate PDF" action at the wrong time (e.g., before necessary data is populated on the record) or fails before reaching the PDF generation step.
- Platform PDF Service Issue (Rare): Temporary issues with the backend service responsible for converting Word documents to PDFs.
Troubleshooting Steps
- Verify Sentence Configuration:
- Go to Settings > Automations. Edit the relevant Sentence.
- Check the Generate PDF action. Verify the Template Name exactly matches the name provided by Zudello staff for the intended template. Check for typos or case sensitivity issues.
- Review Template Placeholders (Requires Template File):
- Obtain a copy of the .docx template file being used.
- Carefully check the syntax of all placeholders:
{{ object.field_name }}
. Ensure correct double curly braces and accurate field names (including dot notation for related objects likesupplier.name
). - Verify the
{{#lines}}
and{{/lines}}
tags are correctly placed within the first and last cells of a single table row intended for line items. - Consult Zudello support for a list of valid placeholders for the specific document type.
- Simplify Template: If formatting is broken, try creating a very simple test template with only a few basic placeholders (e.g.,
{{ document_number }}
,{{ supplier.name }}
). Does the simple template generate correctly? If yes, gradually add complexity back to the original template to isolate the problematic section. Avoid complex Word formatting where possible. - Verify Zudello Record Data:
- Open the Zudello transaction record (e.g., the PO) that was used when the PDF generation failed or produced incorrect results.
- Check all fields referenced by placeholders in the template. Is the data present and correct in Zudello? Correct any missing/incorrect data.
- Check Sentence Execution:
- Review Automation Logs (Admin/Staff) for the transaction. Did the Sentence run? Did it reach the "Generate PDF" action? Were there any errors reported for the Sentence execution?
- Test PDF Generation Manually (Staff Task): Zudello staff may have internal tools to test template conversion directly with specific transaction data to isolate template vs. data issues.
- Check Zudello Status Page: Visit status.zudello.com for any platform incidents affecting PDF generation or automations.
Need Help?
Resolving PDF generation issues often requires access to the template file and Sentence configuration. Contact Zudello support or your implementation partner. Provide:
- The Document UUID of an example transaction.
- The name of the Sentence and Template involved.
- A copy of the .docx template file (if possible).
- A copy of the incorrectly generated PDF (if applicable).
- Details of what is wrong or missing in the generated PDF.