从A4页面获取两个A6完整的小册子序列 [英] getting two A6 complete booklet sequences from an A4 page

查看:365
本文介绍了从A4页面获取两个A6完整的小册子序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一本a6 pdf书籍.我想将其转换为a4 pdf,以便在打印时可以将a4页切成两部分(上下两面的内容相同,因此我将得到这本书的两份副本),并且将页面放在一起时,可以按顺序阅读(我认为这称为拼版)

I have an a6 pdf book. I'd like to convert it to an a4 pdf so that when I print it, I can cut the a4 page in two (upside and downside will have the same content, so I'll end up with two copies of the book) and when putting together the pages, they can be read in sequence (I think this is called impose)

假设A,B,C,D是这本书的4页.我希望生成的文件是:

Supose A,B,C,D are 4 pages of the book. I want the resulting file to be:

DA
DA

CD
CD

我清除了吗?

对不起,如果我使用的术语不正确.

Sorry if I'm not using the correct terminology.

推荐答案

如所建议的那样,强大的多价工具是解决方案,但需要将其与我附加的脚本结合起来以执行任务你想要

as suggested, the mighty Multivalent tools are the solution, but they need to be combined with my Script I attach to perform the task you desire

2copiesinA4 filename.pdf multivalent relative path

它需要指定2个参数:

  • 1个参数是扩展名为 pdf 的文件名
  • 2自变量是多价相对路径
  • 1 argument is the filename with the pdf extension,
  • 2 argument is the multivalent relative path

例如,如果您在/mnt/home/中具有 Multivalent.jar ,则此 将是您需要传递给脚本的相对路径.

for instance, if you have Multivalent.jar in /mnt/home/, this will be the relative path you need to pass to script.

#!/bin/bash
file=$1
multivalentpath=$2
pages="`pdftk $file dump_data | grep NumberOfPages | cut -d : -f2`"
echo $pages
halfpages="`echo -n $(( $pages / 2 ))`"
echo $halfpages
h="$(pdfinfo $file | grep "Page size" | cut -d x -f1 | tr 'Page size:' ' ' | xargs)"
w="$(pdfinfo $file | grep "Page size" | cut -d x -f2  | tr 'pts' ' ' | xargs)"
echo $h
echo $w
doubleheight="`let MULTIPLICATION=$h*2; echo $MULTIPLICATION`"
doublewidth="`let MULTIPLICATION=$w*2; echo $MULTIPLICATION`" 
echo $doubleheight
echo $doublewidth
sequence="`for ((x=$pages, y=1;x>=$halfpages, y<=$halfpages;x--, y++)); do echo "$x $y "; done | awk 'NR %2==1 {print $1, $2, $1, $2 } NR % 2==0 { print $2, $1, $2, $1 }' | xargs | tr " " ","`"
echo $sequence
java -cp "$multivalentpath"Multivalent.jar tool.pdf.Impose -verbose -dim 2x2 -paper "$doubleheight"x"$doublewidth"pt -page "$sequence" $file
exit 0

多价

  • http://minhateca.com.br/cixey/Documentos/Multivalent,584888318.jar(executable)
  • http://ge.tt/6fVll5H
  • http://dingodog.minus.com/mjhNX8Eiu (latest free version with tools included, current has no tools in itself)

将其放在磁盘上的某个位置,请记住其相对路径

put it somewhere on disk, take in mind its relative path

重要提示:请仔细检查您的PDF是否有许多页面*整数倍数为4 **(例如4,8、12、16 ...等等)

我上传了一些示例文件

  • http://ge.tt/92slb5Q/v/2 a pdf in A6 format, 16 pages long
  • http://ge.tt/92slb5Q/v/3 the resulting pdf output imposed with help of script above

生成的 IMPOSED 文件看起来像这样的(请参阅gif动画

the resulting IMPOSED file looks like this (see gif animation

打印完成后,您将拥有最后一页,成为您打印的大量单页纸的第一页

once printing finished, you will have the last page that becomes the FIRST of mass of sheet papers you printed

您将在** A4长边**上的纸张中心(14.8厘米)处将其裁切一次,以将构成书的2份的两个区块分开

you will cut this papers once in center of paper (at 14.8 cm) on ** A4 long edge** to separate the two block forming the 2 copies of book

,然后再次切开两个工作表纸块,以便能够将每个生成的子锁关闭在另一个子锁上,以使书具有按顺序排列的页面

and then cut again the two sheet papers blocks to be able to close every resulting sublock on another to have the book with the sequential pages order

这是通常为了获得所谓的小册子(一本A5肖像书,在A4风景纸上打印两页纸)而进行的工作的重复.情况下,对于打算印在A4上的A6图书,可以这样做,以获取整本书的2份副本,并用相同的逻辑修改某些内容

this is a REDUPLICATION of work normally done to get a so-called booklet (an A5 portrait book, printed 2 pages for sheet on an A4 landscape paper) Obviously, as in our case, the same can be done for an A6 book intended to be printed on A4 to get 2 copies of whole same book, modifying some thing but with the same logic

拼版顺序,需要的页面顺序如下:

imposition sequence, needs that sequence of pages will be this:

最后一个-第一,第二个-倒数第二个,倒数第二个-第三个...依此类推...

对于一本16页的书,拼版顺序为:

for a 16 pages book, the imposition sequence will be:

16 1,2 15,14 3,4 13,12 5,6 11,10 7,8 9

在我们的案例中,由于我们希望在A4纸上获得同一本书的两张完整副本,因此我们在同一张纸上两次重复了该顺序

in our case, since we want get TWO COMPLETE COPIES of same book on an A4 paper, we repeated this sequence two times in same sheet

我还开发了一种方法,可以根据个人需要在A4纸上获取一本 A6小册子,如果您需要一本一本A6副本使用A4纸打印

I also developed a way to get ONE SINGLE A6 booklet copy, for my personal needs, on an A4 paper, if you need ONLY ONE A6 copy of your book printed using A4 sheet papers

这篇关于从A4页面获取两个A6完整的小册子序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆