orzih / mkdocs-with-pdf

Generate a single PDF file from MkDocs repository.
MIT License
325 stars 76 forks source link

how to export B5 instead of A4 #57

Closed yuruotong1 closed 3 years ago

yuruotong1 commented 3 years ago

how to export B5 instead of A4

orzih commented 3 years ago

Try adding the following to your custom style:

@page {
  size: b5 portrait !important;
}

See also:

https://github.com/orzih/mkdocs-with-pdf/blob/f2e78d8c8ecb505636ba31a4830646038a78accd/mkdocs_with_pdf/styles/_paging.scss#L1-L3

yuruotong1 commented 3 years ago

Try adding the following to your custom style:

@page {
  size: b5 portrait !important;
}

See also:

https://github.com/orzih/mkdocs-with-pdf/blob/f2e78d8c8ecb505636ba31a4830646038a78accd/mkdocs_with_pdf/styles/_paging.scss#L1-L3

thanks, do you know how to change font size

orzih commented 3 years ago

e.g.

@media print {
  html { font-size: 95%; }
  body { font-size: 10.5pt; }
  article { font-size: 0.8rem; line-height: 1.6; }
}

and, See debug_html option.

yuruotong1 commented 3 years ago

e.g.

@media print {
  html { font-size: 95%; }
  body { font-size: 10.5pt; }
  article { font-size: 0.8rem; line-height: 1.6; }
}

and, See debug_html option.

Thanks!!