[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