1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Issue with the display of Digsig plugins in PDF

Discussion in 'Community' started by 7webcreator, Jun 22, 2022 at 4:29 PM.

  1. 7webcreator

    7webcreator Member

    Level: Community
    Hello,

    The Digsig plugin displays correctly in the form and form details. However, the result I get in the PDF is a tiny, tiny picture. Anyone knows why and has a solution to this?
    Joomla version 3.10.9, Fabrik 3.10.

    Thank you
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    I think there's a thread somewhere.

    Are other images displayed correctly?

    It's ringing a bell, maybe it needs some custom CSS.
    In one of my details PDF templates (PDF is always details) I have
    #{$form} img {width:auto;height:auto;}
     
  3. 7webcreator

    7webcreator Member

    Level: Community
    Thank you for your reply.
    Yes, the other pictures are displayed correctly. Only the signature is tiny. The width and height given in the settings don't apply. Where should I insert the following #{$form} img {width:auto;height:auto;}?
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    CSS: in your pdf details template's custom_css.php
    And/or you can try to tweak (override) plugins\fabrik_element\digsig\layouts\fabrik-element-digsig-details-pdf.php
     
  5. 7webcreator

    7webcreator Member

    Level: Community
    I have inserted ( #{$form} img {width:auto;height:auto;}) in the relevant plugin, and the tiny picture has been replaced by the syntax

    upload_2022-6-23_19-49-4.png

    the file fabrik-element-digsig-details-pdf.php has currently the following code. I might have something wrong:rolleyes:

    <?php
    defined('JPATH_BASE') or die;
    $d = $displayData;
    ?>
    <img src="<?php echo $d->link; ?>" width="<?php echo $d->digsig_width; ?>" height="<?php echo $d->digsig_height; ?>" />
    #{$form} img {width:auto;height:auto;}
     
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    #{$form} img {width:auto;height:auto;} must go
    I just tested, you don't need to touch fabrik-element-digsig-details-pdf.php, it's just the custom CSS.
     
  7. 7webcreator

    7webcreator Member

    Level: Community
    I have checked the custom CSS, and the following code was already there. I still get a tiny signature on the PDF. The custom CSS file doesn't seem to work.

    upload_2022-6-23_22-55-19.png
     
    Last edited: Jun 23, 2022 at 11:15 PM
  8. troester

    troester Well-Known Member Staff Member

    Level: Community
    Must be coming from you...
    Digsig in a PDF of a details view is working with this CSS on my site (without this setting I also see the tiny one), but this may also depend on your Joomla template.

    Did you add the CSS to the custom_css of the details template you have selectet as PDF template?
    You can check with Fabrik's PDF debugging on with your browser console if your CSS is loaded correctly
    Are you using the PDF button? In case of PDF attatchment there's a fix in GitHub for CSS loading.
     
  9. lousyfool

    lousyfool Well-Known Member

    Level: Community
    Compare the lines with #$form and #{$form} -- I think you want to leave the curly brackets off, so that it's #$form everywhere?
     
  10. 7webcreator

    7webcreator Member

    Level: Community
    My Joomla template is Protostar. I have added the CSS to the custom_css of the details template I have selected as PDF template. When I check with Fabrik's PDF debugging, the signature is displayed. However, I lose some of the CSS for the group 3 columns layout. I noticed also that when I set the PDF Bootstrap to NO, the signature displays, and I lose the layout. I really need to have the PDF Bootstrap set to YES. I have also removed the curly bits with no success.
    upload_2022-6-24_11-31-52.png

    I have found that also in the browser console

    upload_2022-6-24_11-56-15.png

    upload_2022-6-24_11-57-28.png
     
    Last edited: Jun 24, 2022 at 11:57 AM
  11. troester

    troester Well-Known Member Staff Member

    Level: Community
    Strange, is this some browser security setting? Did you try a different browser?
    In a custom template you can also modify template_css.php directly and remove (rename) custom_css.php.

    Which php version? Are you running a recent GitHub update?
    This doesn't say much, the PDF libs (which one do you have, domPDF or mPDF?) are rendering slightly different, e.g. not supporting float/flex....
    So in debug mode you can check for errors, if templates and CSS are loaded correctly etc. but you don't see exactly how the PDF will render. It's a lot of try & error:rolleyes:
     
  12. 7webcreator

    7webcreator Member

    Level: Community
    I don't think I have anything special with my browser because I tried it with Edge and Safari and my iPad, and I got the same result (tiny image when the PDF Bootstrap is set to YES).
    The PHP version the site is using is 7.4.30. The last Fabrik update is dated August 2021. I'm using domPDF.
     
  13. troester

    troester Well-Known Member Staff Member

    Level: Community
    The official Fabrik3.10 from Aug2021 is not php7.4 ready.
    You should update from GitHub, there are several php7.4 and php8 fixes.
    (Not sure if this is related to your PDF problem)
     
  14. 7webcreator

    7webcreator Member

    Level: Community
    Thank you for your valuable support. I have done a full GitHub update, and I still have the same issue.
     

Share This Page