Enable the Spacious Layout in a PDF Form

Edit in →

SurveyJS PDF Generator separates color settings from dimensional styling. Themes define colors and shadows, while layouts define spacing, sizing, typography, corner radius, and other properties. PDF Generator includes two predefined layouts: Compact (default) and Spacious. This demo applies the Spacious layout. Click Download PDF or Preview PDF to generate a PDF form with this layout, or use the PDF layout switcher in the Settings panel to switch back to Compact.

Compact vs. Spacious

Compact is a dense layout designed to reduce page count and maximize the amount of content that fits on each page. Its characteristics include:

  • Tighter spacing between pages, questions, and matrix cells
  • Smaller gaps throughout the document
  • No corner rounding on questions and matrices

Spacious increases spacing and visual proportions to improve readability and create a more open presentation. Its characteristics include:

  • Larger gaps between pages and questions
  • Increased whitespace around matrix table cells
  • Rounded corners on questions, matrices, and sections
  • A less dense appearance that resembles a designed form rather than a compact report

To apply the Spacious layout, import it or reference its script and call the applyLayout method:

// Modular applications
import { Spacious } from "survey-pdf/layouts";

const surveyPdf = new SurveyPDF({ /* ... */});

surveyPdf.applyLayout(Spacious);

surveyPdf.save("my-spacious-form.pdf");
<!-- Classic script applications -->
<head>
  <!-- ... -->
  <script src="https://unpkg.com/survey-pdf/layouts/spacious.min.js"></script>
  <!-- ... -->
</head>
<body>
  <script>
    const surveyPdf = new SurveyPDF.SurveyPDF({ /* ... */});

    surveyPdf.applyLayout(DocLayout.Spacious);

    surveyPdf.save("my-spacious-form.pdf");
  </script>
</body>

For more information about layouts and other appearance customization options, refer to the following help topic:

PDF Appearance Customization

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.