Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Margins when printing #1519

Closed
lukejanicke opened this issue May 27, 2018 · 1 comment
Closed

Margins when printing #1519

lukejanicke opened this issue May 27, 2018 · 1 comment

Comments

@lukejanicke
Copy link

I cannot seem to gain full control over margins when exporting to PDF/printing. With margin: 0; on everything there is still some margin in PDF/print and it’s different between top/bottom and left/right.

The following CSS gives me ~2 cm margins.

@media print {
    html {
        font-size: 16px!important;
        padding: 0 !important;
        margin: 0 !important;
    }
    body.typora-export {
        padding: 0 !important;
        margin: 0 !important;
    }
    .typora-export #write {
        padding: 0 !important;
        margin-top: 4mm !important;
        margin-right: 15mm !important;
        margin-bottom: 4mm !important;
        margin-left: 15mm !important;
    }
}

Is there some other CSS that I am not aware of?

I’ve searched the Typora core CSS files and couldn’t see anything else that adds margins.

@abnerlee
Copy link
Contributor

The css is correct.

But CSS rule of margin for printing is not well supported by browsers. I will put this into #998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants