Documentation Docs
Documentation Docs

Export Matrix questions to PDF

SurveyPDF supports export all types of SurveyJS matrix questions. When exporting, SurveyPDF tries to render the matrix as a table. But if there is no enough free space, then SurveyPDF will render the matrix as a list

You can set preferred render directly to fit your needs more accurately. Pass matrixRenderAs parameter with "list" value to render all matrix questions as list. Omit this parameter or pass "auto" value to allow SurveyPDF automatically choose renders matrix as a table or as a list

const options = {
    matrixRenderAs: 'list'
};
const surveyPDF = new SurveyPDF.SurveyPDF(json, options);

Also, you can override the render of particular matrix question via setting renderAs property with "list" value. Default value is "auto"

const json = {
    type: 'matrix',
    name: 'matrix_as_list',
    columns: [
        'Column 1'
    ],
    rows: [
        'Row 1'
    ],
    renderAs: 'list'
}

See Also
Options in SurveyPDF Constructor: Matrix question render mode

Copyright © 2022 Devsoft Baltic OÜ. All rights reserved.

Why we use cookies.

This site uses cookies to make your browsing experience more convenient and personal. Cookies store useful information on your computer to help us improve the efficiency and relevance of our site for you. In some cases, they are essential to making the site work properly. By accessing this site, you consent to the use of cookies.

For more information, refer to DevSoft Baltic’ privacy policy and cookie policy.