1. If you update to Joomla 3.8.10, please make sure that you either do a full GitHub update of Fabrik, or disable caching for your lists (in the Advanced settings) or turn off Joomla's System Cache setting. A change in Joomla's cache code in 3.8.10 required a fix in Fabrik, which will be rolled in to the next release, but is currently only available in GitHub.
    Dismiss Notice
  2. We will be performing an update of XenForo (the forum software use on this site) this afternoon, Fri 8/17/2018. The forums will be unavailable for a (hopefully!) short time.
    Dismiss Notice

[Solved] Optimize PDF export of one page A4 portrait mode

Discussion in 'Professional Support' started by georgie, Jan 12, 2018.

  1. georgie

    georgie Member

    Level: Community
    Hello

    I would do an export from a detail form in an A4 page, portait mode, with a background image.

    For paper printing purposes (certificates ... that sort of thing...).

    Please what are the best practices?

    For now I use this CSS, it seems OK in browser, but not for print:
    Code (Text):
    html, body {
    margin:0 !important;
    padding:0 !important;
    }
    body {
        background-image:url(wosiam_certificate_85dpi.jpg);
        background-repeat: no-repeat;
        background-position:center center;
        background-attachment: fixed;
        background-size: 595pt 842pt !important ;
       
        text-align : center ;
       
        margin-top: -5px !important ;
        margin-bottom: 1px !important ;
        padding: 0px !important ;

    }

    .list-striped li:nth-child(odd), .list-striped dd:nth-child(odd),
    .row-striped .row:nth-child(odd), .row-striped .row-fluid:nth-child(odd) {
       
        background-color: transparent !important;
        border-bottom: 0px  !important;
    }

    .list-striped li, .list-striped dd, .row-striped .row, .row-striped .row-fluid,
    .list-striped, .row-striped,
    .page-header {
        border-top: 0px  !important;
        border-bottom: 0px  !important;
    }

    .row-fluid:hover{
        background-color : transparent !important ;
    }
    Please can you help me?
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Standard
    What do you get in your PDF (resp. what is missing)?
     
  3. georgie

    georgie Member

    Level: Community
    So, many untimely margins appear after printing.

    They are however absent from the PDF seen on a browser.
     
  4. georgie

    georgie Member

    Level: Community
    Hello

    Please what do you think about my problem?

    Find attached a PDF example. It is OK when you just see it on a browser or an photo app, PDF viewer... But when you print it, it lets some margins.
    Can we avoid these margins?

    THX
     

    Attached Files:

  5. troester

    troester Well-Known Member Staff Member

    Level: Standard
    So this example is what you get from Fabrik?

    My printer is showing
    upload_2018-1-18_12-40-56.png
    So it seems you didn't set A4 but Letter size in the form (PDF paper size in form Layout settings).
    upload_2018-1-18_12-43-38.png

    Maybe you have to change the background size, too.
     
    georgie likes this.
  6. georgie

    georgie Member

    Level: Community
    Ahah ! Many thanks indeed I did a bad choice !

    I change and I test !
     
  7. georgie

    georgie Member

    Level: Community
    Hello

    Yes it is better, but not perfect, I explain:
    - Now I use A4 size in the form, OK.
    - I tried with 8.27 in x 11.69 in, but I have always some margin.
    - I gradually went up to 9.32 in x 13.26 in, and it seems to be a little better, but not perfect, as attached.

    Please what is the best practice for a good print with standard tools (Edge, Chrome...) ?

    And what about my CSS code, I do it for example, is it necessary ?

    Code (Text):
    html, body {
    margin:0 !important;
    padding:0 !important;
    }
    body {
        background-image:url(wosiam_certificate_85dpi.jpg);
        background-repeat: no-repeat;
        background-position:center center;
        background-attachment: fixed;
        background-size: 595pt 842pt !important ;
       
        text-align : center ;
       
        margin-top: -5px !important ;
        margin-bottom: 1px !important ;
        padding: 0px !important ;

    }
    THX
     

    Attached Files:

  8. troester

    troester Well-Known Member Staff Member

    Level: Standard
    I think the PDF is ok now.

    But if you don't want to have any margin around your paper printout you'll need a printer which is able to print borderless. You have to chose the correct printer setup.

    If the PDF is generated and printed by multiple users maybe it's better to design it with a border around the background so it can be printed on any printer.
     
  9. georgie

    georgie Member

    Level: Community
    OK thanks.

    Yes it should be printed by multiple users.
    I note : design with a border OK, it is just some test for now.

    THX
     

Share This Page