Publish several PDF gadgets

Source: Internet
Author: User

The book "LINUX multi-thread Server programming-using the muduo C ++ network library" is based on latex and has accumulated some gadgets during the typographical process. Today I have released several of them. These tools are directly based on the Open Source itext library and can be downloaded from http://itextpdf.com.

Download

Groovy version in https://github.com/chenshuo/typeset/tree/master/tools

Java version in https://github.com/chenshuo/recipes/tree/master/java/pdf

The output sample for each tool is located in the http://vdisk.weibo.com/s/kT4fL

Crop (CROP)

In order to make full use of the screen space and facilitate reading and Proofreading on the electronic reader (iPad and Kindle), I usually cut the PDF into a moderator. For example, the picture on the left is the original PDF, which is the size of the paper. The picture on the right is the heart of the cut.

The cut tool is crop. Groovy. After classpath is set, it can be run directly in the command line. The core is to calculate the left and left of the lower left corner Based on the layout and paper size, and then cut each page. This tool, regardless of the PDF content, can be used to crop the PDF Based on the page content, heiko oberdiek's javascrop tool.

Http://www.ctan.org/tex-archive/support/pdfcrop

Http://code.google.com/p/pdfcrop2/

Imposition (two-up)

Sometimes I want to read the books on both the left and right pages at the same time on the wide screen. In addition to the multi-page display function of the PDF reader, I often do two-up myself ). In this way, the PDF file can be printed, which saves both the paper size and the size of the source file is. The generated PDF is as follows.

Twoup. Groovy is a two-in-one tool. Its core is to calculate the starting coordinates of the left and right pages on the page.

Booklet (Booklet)

Sometimes I print out the contents of a chapter and combine them into a booklet, so that I can read the book. To save on paper, you need to make a imposition before printing, so that four pages can be printed on both sides of a piece of paper. For example, the 8-page content can be printed on two A4 sheets:

Book this booklet to use riding seam to book, can rotate stapler (http://www.amazon.cn/dp/B0080AF0FM,http://product.dangdang.com/product.aspx? Product_id = 1141537002 ). A booklet should generally be controlled at around 10 pages, that is, 40 pages, and cannot be customized after being thick.

Comparison of PDF content (diff)

After a book is published, some page numbers may be revised during each printing. You can use the diffpdf. Sh tool to find out which pages have been modified. The idea of this tool is to render a PDF file into multiple PNG files, and then use diff to compare whether the files are the same.

In addition, sumatrapdf is a very good pdf reader, which can automatically refresh the content after updating the PDF file without reload.

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.