Support Hacks & Workarounds
This article is a collection of our top support hacks and workarounds — tried-and-tested methods for overcoming common challenges and getting the most out of our platform in ways you might not have expected. Discover new tricks to add to your toolkit.
1. Collapsing Space for Conditionally Hidden Elements
Scenario
In a vertically stacked layout of elements, you may need to conditionally hide one or more elements based on certain data. When an element is hidden, the empty space it occupied should be removed, and all subsequent elements should shift upwards to maintain a contiguous layout, as illustrated below.
Solution
Make all the text components the same height, and spread them evenly, leaving the same space between all components. Once the document is generated, the components that were left collapse and fill the empty space. On the left, the editor view shows five text elements with vertical spacing. On the right, the generated PDF shows the "Discount" element has been removed, and the bottom element has shifted up, closing the gap.
2. Applying Inline Styling within a Text Element
Scenario
While styling properties are applied to an entire text component, it's frequently necessary to apply formatting to specific words or phrases within it for emphasis or clarity.
Solution
You can achieve granular text formatting by embedding standard HTML inline tags directly into your text content.
Common tags for this purpose include:
<b>
for bold text.<i>
for italic text.<u>
for underlined text.<s>
for strikethrough text.
3. Managing Line Breaks for Long Hyperlinks
Problem
Long URLs within a text element can exceed the component's width. This can cause the link to be truncated or wrap awkwardly, which impairs readability and breaks the hyperlink's functionality.
Solution
Instead of displaying the raw URL, you use concise, descriptive text (known as anchor text) that links to the target address. This improves the document's aesthetics and accessibility.
<a href="https://www.google.com" target="_blank">Click here</a>
<a href="https://docs.pdfgeneratorapi.com/v4" target="_blank">https://docs.pdfgeneratorapi.com/v4</a>
4. Resolving Save Errors After an Extended Editing Session
Scenario
You have been working in the template editor for a long time (e.g., an hour or more) without saving your progress. When you finally click "Save," you receive an error message stating that the template cannot be saved. This often happens because your user session has timed out in the background for security reasons. Closing the tab would cause you to lose all your work.
Solution
To save your work without losing it, you can refresh your session in the background.
- Do not close the editor tab that contains your unsaved work. This is the most important step.
- Open a new browser tab and navigate to TEMPLATES tab.
- Open the same template (or any other template) in the editor. This action will re-authenticate and refresh your session.
- Return to the original tab where you encountered the save error.
- Click the save button again. Your template should now save successfully with all changes preserved.
5. Setting Page Height in the Editor
The Page Height in the Editor feature is a powerful tool that increases the size of your design canvas [without changing the page dimensions of your final PDF] allowing you to solve common layout challenges, but still render the document page size as A4 (or anything else defined in Page Setup).
Use Case 1: Designing Repeating Multi-Page Layouts
The Challenge: You need to create a template where a single data item generates a fixed, multi-page sequence, like a children's book with an image on page one and text on page two. Laying this out on a single-page canvas is difficult.
The Solution: By setting the Page Height in the Editor to 200%
(for a two-page sequence) or 300%
(for three), you get a single long canvas to design the entire sequence.
- Place the content for page one at the top.
- Place the content for page two directly below it. To ensure it starts on a new page, set its Top position to be greater than the height of a single page (e.g., for an A4 page of
29.7 cm
, page two's content should start at29.7 cm
or more).
This makes designing the flow intuitive, and the final PDF will be correctly split into separate, standard-sized pages.
Use Case 2: Managing Long or Variable Content
The Challenge: Your template uses dynamic content, like a long table or text block, which often won't fit on the single-page editor view. This makes it hard to arrange all your elements, but adding a fixed second page isn't an option as it would always appear in the output.
The Solution: Increase the Page Height in the Editor to give yourself enough room to see and organize all potential content in one continuous flow.
This provides a spacious canvas for you to design on, while the PDF generator retains its intelligence. It will automatically create page breaks in the final document only when and where they are needed based on the actual amount of content generated.
This is the perfect way to manage templates with variable lengths, ensuring a clean and professional layout every time.
Related articles you may find helpful
Updated on: 25/09/2025
Thank you!