LuminaFolio

Embedding PDF Files in HubSpot Quote Templates Using JavaScript

Written by Deepak Garg | Mar 13, 2025 10:11:22 AM

To overcome this, we implemented a custom JavaScript solution that dynamically displays external PDF files within the HubSpot quote template.

Challenge

  • HubSpot quote templates do not allow direct PDF embedding.
  • No built-in feature to attach external files within a quote.
  • Users required a seamless way to display relevant PDF files without manually attaching them in emails or external links.

Solution:

We developed a JavaScript-based approach that retrieves the PDF file URL from a deal property in HubSpot and dynamically embeds it within the quote page.

How It Works

  1. Upload the PDF file to the deal record in HubSpot.
  2. Store the file URL in a custom deal property.
  3. Modify the quote template to include a JavaScript script that:
    • Reads the deal property containing the file URL.
    • Fetches the file dynamically.
    • ppends the file to the quote page, embedding it for easy access.

Conclusion

By leveraging JavaScript within HubSpot quote templates, we successfully overcame HubSpot’s limitations and provided a custom solution for embedding PDFs in published quotes. This approach ensures a smooth workflow, improving efficiency for sales teams and enhancing the overall user experience for clients.