Scale, merge, and split PDF files using the command line in Ubuntu

Source: Internet
Author: User

Install software:

Sudo aptitude install ghostscript

Then run the following command:

GS-dnopause-dbatch-sdevice = write-dcompatibilitylevel = 1.4-d1_settings =/screen -soutputfile1_new_file1_original_file1 _
Parameter description:/screen-output with the lowest precision, because the accuracy required for screen display is very low.
/Ebook-Medium-precision output
/Printer and/Prepress-both indicate high-precision output. Because printing requires high accuracy, the file size is also the largest, or even exceeds the size of the original file.

A large amount of log information is generated during the conversion process. To keep the screen quiet, use the "-Q" parameter.

Use the following command to merge two PDF files:

GS-Q-dnopause-dbatch-sdevice = paiwrite -soutputfile?foo=- F foo1.pdf foo2.pdf

Use the following command to split the PDF file:

GS-Q-dnopause-dbatch-sdevice = paiwrite -soutputfile?foo=- dfirstpage = 2-dlastpage = 3 input #

Only the second to third pages are split.

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.