Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2053 Lượt xem

I've tried add this paper format to my xml. I've put 0 margin to all side but the result, there still margin on the left and the right side. I try to change the margin to negative value, but the pdf can't be open




Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Its because the body tag of the pdf report has a class named container-fluid and it has properties 

.container, .o_container_small, .container-fluid, .container-xxl, .container-xl, .container-lg, .container-md, .container-sm {
    width: 100%;
    padding-right: var(--bs-gutter-x, 15px);
    padding-left: var(--bs-gutter-x, 15px);
    margin-right: auto;
    margin-left: auto;
}

So you need to unset the property of padding (which is not recommended)

You could do this to make your custom pdf to your preference

 .container-fluid {
      padding-right: unset !important;
      padding-left: unset !important;
}

If not changing try around it by changing the report type from pdf to html and then click on print pdf and it will redirect you to an html view and change around there by inspecting the view


Hope it helps


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
PDF reports Đã xử lý
5
thg 7 25
2248
Wrong PDF Format Đã xử lý
2
thg 3 24
2768
0
thg 11 22
2985
0
thg 9 17
5298
0
thg 3 15
3675