condorheroblog / vuepress-plugin-export-pdf

VuePress plugin exports PDF 📁.
MIT License
22 stars 2 forks source link

How can I zoom in on the table to show the full content? #3

Closed ykla closed 1 year ago

ykla commented 1 year ago

There are many tables in https://handbook.bsdcn.org/FreeBSD-Handbook-CN.pdf that are not fully displayed, such as the "Glossary of Terms" on pages 54-59. The original article is available at https://handbook.bsdcn.org/yi-zhe-shuo-ming.html. How can I zoom in on the table to show the full content? Thanks a lot. Now index.scss is:

blockquote > p {
  display: block;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
}
div.theme-default-content:not(.custom) {
    max-width: 75%;
}
@media print {
  .navbar,
  .sidebar,
  .sidebar-mask,
  .page-edit,
  .page-nav {
    display: none;
  }
}

QQ图片20220922140326 QQ图片20220922140330

condorheroblog commented 1 year ago

Two solutions:

  1. add a class name for table(glossary-table) and then:
@media print {
    .glossary-table {
        zoom: .5;
    }
}

image

  1. change print pdf size:
{
    pdfOptions: {
        format: "A0" // default A4
    }
}

format doc

ykla commented 1 year ago

OK, Thank you, and I solved the problem. The reason is that the program does not do line breaks for website links, so whenever a line contains a link, it will overflow the screen. Just write the link in markdown syntax "[text](link)" to solve the problem. The amount of text does not affect the display of the table.