MWeb Version 1.2 update description and generate PDF with Wkhtmltopdf and custom preview CSS

Source: Internet
Author: User
Tags wkhtmltopdf

New
    • Share features Copy as image, save as image, Save as PDF are now unified with HTML style, but also dedicated to share to the meager and other SNS generated images are optimized, for example, if there is code, will force the line.
    • New export of single or multiple documents in the document library to HTML or PDF. To use: Select a document to export (multiple options)-right---export as HTML, PDF
    • New to export the entire classification to HTML or PDF. To use: Right-click the category you want to export and export as HTML, PDF. The exported PDF now has no way to automatically generate the table of contents, and the detailed description below will share a way to automatically generate the table of contents, and then personally feel that the resulting pdf is very good.
    • Added mweb with two themes octopress, Greyshade's instant preview CSS. You can now preview the approximate effect of the article without the Build site. In addition to customize the site preview CSS is very simple, please see the detailed introduction below.
    • New can be dragged to change the order of the document. Use the following method: Right-click the parent category----and then set order by to: Custom--and then you can use drag-and-drop to adjust the order of the documents in the parent category.
    • New can be dragged to change the order of the classification.
Correction
    • Build site flashback issue, which is why this release was released.
    • Preview site has no effect problem.
    • Editor Minor fix.
How to generate a PDF with a catalog

Install wkhtmltopdf First, URL: http://wkhtmltopdf.org/.
The export as HTML is then exported to HTML to generate the contents of the PDF with the catalog. I am here to select the entire coder for art website. Is the case of exporting to the Tocpdf folder.
??????????????

Select the Tocpdf folder and CMD+C Copy, open the Terminal tool (Terminal), hit cd (note the CD with a space after it), and then CMD+V Enter.
And then execute the following command

wkhtmltopdf toc index.html CoderForArt.pdf

? Execute the resulting PDF
??????????????

In general, where there is code, if too long will be cut off, you can add the following CSS

.hljs{overflow: visible; word-wrap: break-word;}

Would not have been cut.
??????????????

customizing preview CSS

To copy the theme of the Web site to customize the entire folder to the preview CSS folder under the Layout folder, is I want to customize the Greyshade theme preview CSS:

????????????????

Then leave only the asset folder under the Layout/greyshade folder and any of the two. html files, and all the others are deleted. Rename the two. html files that were left to: demo.html and index.html.

Use build Site--and Preview site--to go to any single article page--View the original code--copy and paste it onto the demo.html. Now you can open demo.html directly to see the effect. When you adjust the demo.html to the appropriate preview effect, paste all the contents of the demo.html onto the index.html.

The title of the Index.html page is {{title}} replaced, the content is {{content}} replaced, and in addition {{head}} , generally add in front.

, add an empty file named Greyshade.css to the folder in the preview CSS.
???????????????

Note that the name of the Greyshade.css file Greyshade and the Greyshade folder under the Layout folder are the same. Then if you refer to the CSS with media="screen, projection" such a qualification, please delete, otherwise mweb in the Export PDF function will not have a style. And if you're using the Highlightjs code to highlight a plugin, export a PDF, or generate a picture, the code is cut off, you can force a newline with the following CSS:

.hljs{overflow: visible; word-wrap: break-word;}

MWeb Version 1.2 update description and generate PDF with Wkhtmltopdf and custom preview CSS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.