Gavin Yu
Gavin Yu
Offline
0
Dear support,

We found that the quotatopn pdf format is very wide layout at top/bottom margins.
How pdf format output to narrow top and bottom margins ? is need to change the css or change some backend coding??



Regards,
Gavin
Attachments:
Responses (3)
  • Accepted Answer

    Joan Vilà
    Joan Vilà
    Offline
    Wednesday, June 17 2015, 09:30 AM - #Permalink
    0
    Hello Gavin,

    You can modify your pdf template if you know some html and css.

    This can be done in the backend > templates > edit using plain text. And edit the one in the tab PDF and email version.

    What you are looking for is in the "Styles for PDF and email"
    .table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}

    You can also add extra css to adapt your requirements.

    Tell me if that helps,
    Joan
    The reply is currently minimized Show
  • Accepted Answer

    Gavin Yu
    Gavin Yu
    Offline
    Wednesday, June 17 2015, 12:03 PM - #Permalink
    0
    Dear Joan,

    I tested to reduce the .table{width:100%;margin-bottom:5px;} or changed some css.
    However, our pdf template are still very wide layout at top/bottom margins.

    which css class or div i need to change it??

    Regards,
    Gavin
    The reply is currently minimized Show
  • Accepted Answer

    Joan Vilà
    Joan Vilà
    Offline
    Wednesday, June 17 2015, 12:22 PM - #Permalink
    0
    Helo Gavin,

    You're right. This solution is not enough because dompdf inserts some margins.

    To tell dompdf which margins to set you can insert this css in the "Styles for PDF and email" field:

    @page { margin: 0px; }
    body { margin: 0px; }

    Remember to change 0px for a bigger number. 0px means 0 margin. I think 10px sould look ok for you.

    Regards,
    Joan
    The reply is currently minimized Show
Your Reply