# Can someone please help check this css for pdf exporting

**URL:** <https://discourse.joplinapp.org/t/can-someone-please-help-check-this-css-for-pdf-exporting/42850>\
**Category:** Support\
**Created:** [3 January 2025 07:54 UTC](https://discourse.joplinapp.org/t/can-someone-please-help-check-this-css-for-pdf-exporting/42850 "2025-01-03T07:54:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bush911](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bush911/32/22587_2.png) [@bush911](https://discourse.joplinapp.org/u/bush911)\
**Post date:** [3 January 2025 07:54 UTC](https://discourse.joplinapp.org/t/can-someone-please-help-check-this-css-for-pdf-exporting/42850/1 "2025-01-03T07:54:59Z")

</div>

### Operating system

Windows

### Joplin version

3.2.5

### Desktop version info

Joplin 3.2.5 (prod, win32)

客户端 ID: 280e49f2b42a439db2331bff3b1cbe79  
同步版本：3  
配置文件版本：47  
支持的密钥链：否

修订：2da789a

Backup: 1.4.2  
Copy Anchor Link: 1.1.0  
Journal: 1.2.0  
Markmap: 1.7.0  
Rich Markdown: 0.15.1

### Sync target

OneDrive

### Editor

Markdown Editor

### What issue do you have?

I wanted to make pdf with background color specify the margin for page and number while exporting to pdf.  
I have searched forum and with the help of the chatgpt to obtain the following css:

```auto
@media print {
    @page {
        margin: 0; /* Set the page margin to 0 */
    }
    body {
        padding: 10mm; /* Set the padding of the content to 10mm on all sides */
        background-color: #F3F2EE!important; /* Set the background color */
        box-sizing: border-box; /* Ensure padding does not affect the content width */
    }
}

```

But I acutally got the following, the margin for header is zero, this is werid. Can someone please help check the above

### Screenshots

 ![捕获.PNG](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/c/f/cf5558353de0fd4fcaedb611908ae5e38d6d130e.png)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [2 February 2025 07:55 UTC](https://discourse.joplinapp.org/t/can-someone-please-help-check-this-css-for-pdf-exporting/42850/2 "2025-02-02T07:55:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
