Title: Pdf create do not work properly
Last modified: December 3, 2023

---

# Pdf create do not work properly

 *  Resolved [andycucca](https://wordpress.org/support/users/andycucca/)
 * (@andycucca)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/)
 * Hello,
 * when I generate the PDF from the io form everything is fine, but the resulting
   PDF is shifted to the left and leaves a lot of empty space on the right, as in
   the follwing pdf.
 * **[https://www.dropbox.com/scl/fi/6q6ddr2a4bix47oabv7vt/modulo-iscrizione.pdf?rlkey=xpeoor1179lrfgl1wmbql6wyh&dl=0](https://www.dropbox.com/scl/fi/6q6ddr2a4bix47oabv7vt/modulo-iscrizione.pdf?rlkey=xpeoor1179lrfgl1wmbql6wyh&dl=0)**
 * By inserting a page break first, however, the result is correct, even if there
   is a useless initial blank page as in the follwing pdf.
 * **[https://www.dropbox.com/scl/fi/m6vx69gvnhb3yqxsw0u0m/modulo-iscrizione_with-page-break.pdf?rlkey=62n5z9ph1hxwt5299uyewt7xf&dl=0](https://www.dropbox.com/scl/fi/m6vx69gvnhb3yqxsw0u0m/modulo-iscrizione_with-page-break.pdf?rlkey=62n5z9ph1hxwt5299uyewt7xf&dl=0)**
 * What can I do to overcome this problem?
   Thanks for your support
 * **_Andrea_**

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Support [Williams – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport3/)
 * (@wpmudevsupport3)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17249255)
 * Hi [@andycucca](https://wordpress.org/support/users/andycucca/),
 * Hope this message finds you well.
 * Could you install this mu-plugin and see if does help? Kindly follow [this guide](https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins)
   to install a mu-plugin.
 *     ```
       <?php
       add_filter( 'sanitize_textarea_field', function( $filtered, $str ){
           $data = Forminator_CForm_Front_Action::$prepared_data;
           if ( empty( $data ) ) {
               return $filtered;
           }
   
           if ( $data['form_id'] != 6 ) { //Please change the form ID
               return $filtered;
           }
   
           $table_css = 'hyphens:auto;';
   
           $replace_css = 'overflow:hidden; white-space:nowrap;';
   
           $filtered = str_replace( $table_css, $replace_css, $filtered );
   
           return $filtered;
       },10, 2);
       ```
   
 * Also, please change the Form ID with yours. You will find the ID by editing it
   in the URL:
 * [https://prnt.sc/zYHJqasYpeLS](https://prnt.sc/zYHJqasYpeLS)
 * If the code didn’t fix the issue, please, export the form following [this guide](https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export)
   and share it using a Drive service la GDrive, OneDrive, or pastebin.pl. Thank
   you.
 * Bets regards,
    Laura
 *  Thread Starter [andycucca](https://wordpress.org/support/users/andycucca/)
 * (@andycucca)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17249380)
 * Hello Laura,
 * Thanks for your suggestion, I’m sending you the link to the file that I put in
   the mu-plugin folder, it seems correct to me, but unfortunately it didn’t produce
   positive results.
 * **[https://www.dropbox.com/scl/fi/cruhe69dhqmge2tu159do/pdf-config.php?rlkey=n5latj1va9hrn4urceipqr2gh&dl=0](https://www.dropbox.com/scl/fi/cruhe69dhqmge2tu159do/pdf-config.php?rlkey=n5latj1va9hrn4urceipqr2gh&dl=0)**
 * Below is the link to download my form, as you will see I use your plugin in a
   rather sophisticated way. 😉
 * **[https://www.dropbox.com/scl/fi/qnp6vivr29dbj3gp2sb4y/forminator-iscrizione-al-circolo-e-tessera-fsi-e-o-endas-form-export.txt?rlkey=h1rxxfdmbw5jfbwgafjcoz2b8&dl=0](https://www.dropbox.com/scl/fi/qnp6vivr29dbj3gp2sb4y/forminator-iscrizione-al-circolo-e-tessera-fsi-e-o-endas-form-export.txt?rlkey=h1rxxfdmbw5jfbwgafjcoz2b8&dl=0)**
 * Thanks for your support
 * **_Andrea_**
 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17250096)
 * Hi [@andycucca](https://wordpress.org/support/users/andycucca/),
 * It seems like the following line is incorrectly edited:
 *     ```wp-block-code
       if ( $data['form_id'] != 6 ) {
       ```
   
 * Suppose your form ID Is 123, then the above line will change as below:
 *     ```wp-block-code
       if ( $data['form_id'] != 123 ) { 
       ```
   
 * You can find the form ID by checking the URL when you edit your Form or by checking
   the shortcode of the form which has a reference to the from ID.
 * The above isn’t how you edited it when I checked the shared form. This is what
   you have done:
 *     ```wp-block-code
        if ( $data['2183'] != 6 ) {
       ```
   
 * The number 6 is what that needs to be updated.
 * However, I tested with the given Form Export and the issue was still the same
   when tested on my side.
 * This will require further investigation, I’m bringing this to our developer’s
   attention to check and advise what might be causing the issue and any workaround
   that could be suggested.
 * Will keep you posted once we get further feedback asap.
 * Kind Regards,
 * Nithin
 *  Thread Starter [andycucca](https://wordpress.org/support/users/andycucca/)
 * (@andycucca)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17250263)
 * Thanks for the suggestion, maybe it’s useful for you to tell your development
   team that putting a page break before the rtf field solves the problem. Maybe
   it helps them understand the problem better.
 *  Thread Starter [andycucca](https://wordpress.org/support/users/andycucca/)
 * (@andycucca)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17252467)
 * Hello,
   when generating the PDF from the previous template attached below
 * **[https://www.dropbox.com/scl/fi/4462hvbqy1infont28284/modulo-iscrizione_Dec-5-23.pdf?rlkey=d73t1jpn5ig5w3g68uyqmsjs0&dl=0](https://www.dropbox.com/scl/fi/4462hvbqy1infont28284/modulo-iscrizione_Dec-5-23.pdf?rlkey=d73t1jpn5ig5w3g68uyqmsjs0&dl=0)**
 * with the fields filled in, I verified that they are all fine, except for the 
   signature which is inserted as a link to the .jpg file and not as an image embedded
   in the text. The wrong result obtained is attached below.
 * **[https://www.dropbox.com/scl/fi/v970f0o0a62lqaakvkwvv/modulo-iscrizione-firmato.pdf?rlkey=t0pgkpdp970gqfnb970dd0ceq&dl=0](https://www.dropbox.com/scl/fi/v970f0o0a62lqaakvkwvv/modulo-iscrizione-firmato.pdf?rlkey=t0pgkpdp970gqfnb970dd0ceq&dl=0)**
 * Maybe have I to put the signature field outside the RTF field in a signature 
   field?
   Thanks for the support
 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17254263)
 * Hi [@andycucca](https://wordpress.org/support/users/andycucca/)
 * Thank you for response!
 * As for signature field:
 * This is a known issue – currently signature image is not “imprinted” into PDF.
   It will be fixed in plugin soon with one of upcoming releases.
 * However, please note that if we are talking about the PDF generator built into
   Forminator plugin, it is a Pro feature. It’s not available in free version of
   Forminator and we cannot provide support for Pro features here (it’s against 
   this forum’s policy).
 * If you need further assistance with it, please request support directly from 
   us at
 * [https://wpmudev.com](https://wpmudev.com)
 * and we’ll assist you there.
 * Kind regards,
    Adam
 *  Thread Starter [andycucca](https://wordpress.org/support/users/andycucca/)
 * (@andycucca)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17254368)
 * Ok, so I can summarize the situation:
    – regarding the anomaly of the text moved
   to the left **you have not provided a solution,** – regarding the image, however,
   it is a known problem that **will be resolved in future releases, not now****
   Well, not a great result I would say! 🙁**

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Pdf create do not work properly’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [andycucca](https://wordpress.org/support/users/andycucca/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/pdf-create-do-not-work-properly/#post-17254368)
 * Status: resolved