Error when trying to create PDF
-
I’m new to Gravity PDF. I’m using it from gravity flow pdf to generate a pdf file in one step of gravity flow. But I get the following error:
[03-Nov-2022 03:11:01 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to GFPDF\Statics\Kses::output() must be of the type string, null given, called in /home/balfo/pub #0 /home/balfo/public_html/malfo/wp-content/plugins/gravity-forms-pdf-extended/src/Helper/Helper_Field_Container_Gf25.php(126): GFPDF\Statics\Kses::output(NULL) #1 /home/balfo/public_html/malfo/wp-content/plugins/gravity-forms-pdf-extended/src/Helper/Helper_Field_Container_Gf25.php(156): GFPDF\Helper\Helper_Field_Container_Gf25->close() #2 /home/balfo/public_html/malfo/wp-content/plugins/gravity-forms-pdf-extended/src/Helper/Helper_Field_Container.php(170): GFPDF\Helper\Helper_Field_Container_Gf25->handle_open_container(Object(GF_Field_Text))
any help is appreciated.
-
Hi there,
Can you check you running the latest version of Gravity PDF on this site (6.5.0 at the time of writing)?
Does this only occur on the Gravity Flow step? Or if you view the PDF from your admin area does it also occur?
Could you please export your Gravity Form and post the .json export file here? If you aren’t comfortable posting it publicly, please submit a support ticket via our website. I’ll try to replicate your issue in our development environment.
Thank you.
Hi Jake, Thank you for replying.
I’m using:
Gravity PDF Version 6.5.0 Gravity Form Version 2.6.7 Gravity Flow Version 2.8.5 Gravity Flow PDF Generator Extension Version 1.8
The problem is not related to gravity flow because I see the error in both form’s entry list and entry detail for both view and download pdfs.
I see the following error for each of my forms entries:
There has been a critical error on this website. Learn more about troubleshooting WordPress.
I will include the JSON file of one of my forms below:
{"0":{"title":"Item Prices","description":"","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"Submit","imageUrl":"","width":"auto","location":"bottom","layoutGridColumnSpan":12,"id":"submit"},"fields":[{"type":"text","id":1,"formId":3,"label":"Part Number","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":3,"enablePasswordInput":"","enableEnhancedUI":0,"layoutGroupId":"339018c2","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"text","id":3,"formId":3,"label":"Brand","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":3,"enablePasswordInput":"","enableEnhancedUI":0,"layoutGroupId":"339018c2","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"text","id":4,"formId":3,"label":"Product Name","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":3,"enablePasswordInput":"","enableEnhancedUI":0,"layoutGroupId":"339018c2","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"text","id":5,"formId":3,"label":"Supplier Name","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":3,"enablePasswordInput":"","enableEnhancedUI":0,"layoutGroupId":"339018c2","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"number","id":7,"formId":3,"label":"Supplier Tel","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":false,"rangeMin":"","rangeMax":"","calculationFormula":"","productField":"","layoutGridColumnSpan":3,"enableEnhancedUI":0,"layoutGroupId":"f24d715f","multipleFiles":false,"maxFiles":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"number","id":8,"formId":3,"label":"Quantity","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":false,"rangeMin":"","rangeMax":"","calculationFormula":"","productField":"","layoutGridColumnSpan":3,"enableEnhancedUI":0,"layoutGroupId":"f24d715f","multipleFiles":false,"maxFiles":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"text","id":9,"formId":3,"label":"Metric","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":3,"enablePasswordInput":"","enableEnhancedUI":0,"layoutGroupId":"f24d715f","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"number","id":10,"formId":3,"label":"Unit Cost (Rials)","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":false,"rangeMin":"","rangeMax":"","calculationFormula":"","productField":"","layoutGridColumnSpan":3,"enableEnhancedUI":0,"layoutGroupId":"f24d715f","multipleFiles":false,"maxFiles":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"number","id":11,"formId":3,"label":"Sub Total (Rials)","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":true,"rangeMin":"","rangeMax":"","calculationFormula":"F8 * F10","productField":"","layoutGridColumnSpan":12,"enableEnhancedUI":0,"layoutGroupId":"6540b194","multipleFiles":false,"maxFiles":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"fields":"","displayOnly":"","errors":[]}],"version":"2.6.7","id":3,"markupVersion":2,"nextFieldId":12,"useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"gfpdf_form_settings":{"636451264421a":{"name":"print item","template":"zadani","filename":"item-price","conditionalLogic":null,"pdf_size":"A4","custom_pdf_size":["","","millimeters"],"orientation":"portrait","font":"dejavusanscondensed","font_size":"10","font_colour":"#000000","zadani_border_colour":"#CCCCCC","show_form_title":"Yes","enable_conditional":"Yes","background_color":"#FFF","background_image":"","header":"","first_header":"","footer":"","first_footer":"","form_field_selector_enabled":"-1","field_label_display":"Standard","option_label_or_value":"Label","group_product_fields":"Yes","format":"Standard","password":"","privileges":{"copy":"copy","print":"print","print-highres":"print-highres","modify":"modify","annot-forms":"annot-forms","fill-forms":"fill-forms","extract":"extract","assemble":"assemble"},"master_password":"","image_dpi":"96","save":"","notification":[],"conditional":"","rtl":"","security":"","public_access":"","restrict_owner":"","id":"636451264421a","active":true}},"is_active":"1","date_created":"2022-10-31 14:38:11","is_trash":"0","confirmations":[{"id":"635fddd384902","name":"Default Confirmation","isDefault":true,"type":"message","message":"Thanks for contacting us! We will get in touch with you shortly.","url":"","pageId":"","queryString":""}],"notifications":[{"id":"635fddd383285","isActive":true,"to":"{admin_email}","name":"Admin Notification","event":"form_submission","toType":"email","subject":"New submission from {form_title}","message":"{all_fields}"}],"feeds":{"gravityflow":[]}},"version":"2.6.7"}
Thank you!
Thanks for providing that info.
I haven’t yet been able to replicate this issue with your form in our development environment. That could mean there is a plugin conflict causing this issue.
Please follow Gravity Forms guide on theme/plugin conflict testing https://docs.gravityforms.com/testing-theme-plugin-conflict/ and see if the PDF generates correctly if you only have Gravity Forms and Gravity PDF enabled. If it does, keep activating plugins one-by-one and testing as you go until you find the cause of the issue.
If you track down the cause, please let me know what software is causing the issue and I’ll investigate further.
I disabled all the plugins and activated gravity form and gravity pdf. But the result is still the same. I also check this with other themes and the result was same.
- This reply was modified 2 years ago by afshin2024.
Is there any PHP library required for this plugin to work?
Thanks for letting me know the results of your plugin and theme test.
The PHP libraries that should be enabled, which might cause this error if disabled, include:
All of the above are enabled by default in a standard PHP installation, but they can be disabled, so double check they are on.
- The topic ‘Error when trying to create PDF’ is closed to new replies.