• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

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

georgie

Member
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:
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?
 
So, many untimely margins appear after printing.

They are however absent from the PDF seen on a browser.
 
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
 

Attachments

  • WOSIAM Certificate-992.pdf
    1,013.3 KB · Views: 36
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.
 
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:
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
 

Attachments

  • WOSIAM Certificate-992 (13).pdf
    1.1 MB · Views: 34
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.
 
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
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top