如何在镜像的一页中重复 PDF 内容

发布于 2025-01-03 10:53:04 字数 244 浏览 0 评论 0 原文

我想将 pdf 页面复制 4 次,并生成包含 4 个迷你页面的单个(较大)页面。有一个名为 AutoPagex 的 Acrobat 插件,它可以重复页面内容并用它们生成另一个页面,但我需要这样,下面的 2 页应该颠倒(见图)。有人可以帮助我吗?哪个应用程序可以做到这一点?

如果我可以将两个页面合并为一个页面,那就太好了...

镜像内容复制

I would like to multiplicate a pdf page 4 times and produce one single (larger) page that contains that 4 mini page. There is an Acrobat plugin called AutoPagex which can repeat page content and produce an other page with them, but I need in that way that the 2 page bellow should be upside down (see the image). Can somebody help me? Which application can do that?

It will be also good if I could merge two pages into one...

Mirrored content duplication

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泅渡 2025-01-10 10:53:04

多价

您可以做到这一点

java -cp path....to/Multivalent.jar tool.pdf.Impose -dim 2x2 -paper 2widhtx2heightin -layout 1,1,1u,1u file.pdf

单个 pdf 页重复并镜像 2 次

说明:

如果您的 Multivalent.jar 副本位于 /mnt/home/ 那么你的路径将是 java -cp /mnt/home/Multivalent.jar

-paper 参数表示包含 4 倍原始 pdf 页面的页面的宽度高度,因此,其尺寸需要为
计算出原始页面大小的两倍宽度和高度

in = 英寸[其他允许的单位为 pt(点)或 cm(厘米)]

注意:此工作流程旨在在以下情况下工作:您有一个单一来源的 pdf 页面。
如果你有一个多页源 pdf,那么执行此技巧的方法会有所不同;请向我们提供有关此案例的更多详细信息,

例如

对于多页源pdf,您需要每页重复4次**(旋转180度2次同一个页面,...使用依赖于 pdfinfoMultivalent.jar 的脚本:

#!/bin/sh
# a dingo's script to repeat one same page 4 times in another page (once rotated by 0 degrees, and  twice, at bottom, rotated by 180 degrees)
# usage (it asks for 3 arguments):
#
# nameofscript file.pdf number of pages Multivalent.jar path
#
#example: rotatepdfpage4times file.pdf 16 /mnt/home
#
pdfname=$1
pages=$2
multivalentpath=$3
xfactor=x
ptunit=pt
u="u"
rep="$(for ((a=1, b=1; a <= $pages; a++, b++)); do echo -n "$a $b $a$u $b$u "; done |xargs | tr ' ' ',')"
origsizewidth="$(pdfinfo -box 1.pdf| grep MediaBox | cut -d : -f2 | awk '{print x  $3 FS $4}' | tr ' ' 'x' | cut -d x -f1 | cut -d . -f1)"
origsizeheight="$(pdfinfo -box 1.pdf| grep MediaBox | cut -d : -f2 | awk '{print x  $3 FS $4}' | tr ' ' 'x' | cut -d x -f2 | cut -d . -f1)"
doublewidth="`let MULTIPLICATION=$origsizewidth*2; echo $MULTIPLICATION`"
doubleheight="`let MULTIPLICATION=$origsizeheight*2; echo $MULTIPLICATION`"
echo $pdfname
echo $pages
echo $rep
echo $doublewidth
echo $doubleheight
echo "$doublewidth$xfactor$doubleheight$ptunit"
java -cp $multivalentpath/Multivalent.jar tool.pdf.Impose  -dim 2x2 -paper "$doublewidth$xfactor"$doubleheight$ptunit -layout "$rep" "$pdfname"
exit 0

http://ifile.it/m7tr4g0 (sample source pdf file - A5 size - 595x841 pt)

http://ifile.it/rscpoxi(同源 pdf 强加 4 次 - 纸张 1190x1682pt,一页)

with

Multivalent

you can do the trick

java -cp path....to/Multivalent.jar tool.pdf.Impose -dim 2x2 -paper 2widhtx2heightin -layout 1,1,1u,1u file.pdf

single pdf page repeated and 2 times mirrored

explanations:

if your copy of Multivalent.jar resides in /mnt/home/ then your path will be java -cp /mnt/home/Multivalent.jar

-paper parameter indicates the width and height of page containing 4 times your original pdf page, so, its dimensions, need to be
calculated doubling width and height of your original page size

in = inches [other allowed units are pt (points) or cm (centimeters)]

notes: this work flow is intended to be working if you have a single source pdf page.
If you have a multipage source pdf, then the way to do this trick is different; please, give to us further details in this case

e.g.

for multipage source pdf whose you need to repeat every page 4 times ** ( 2 times rotated by 180 degrees) one same PAGE, ...use this script that relies on pdfinfo and Multivalent.jar:

#!/bin/sh
# a dingo's script to repeat one same page 4 times in another page (once rotated by 0 degrees, and  twice, at bottom, rotated by 180 degrees)
# usage (it asks for 3 arguments):
#
# nameofscript file.pdf number of pages Multivalent.jar path
#
#example: rotatepdfpage4times file.pdf 16 /mnt/home
#
pdfname=$1
pages=$2
multivalentpath=$3
xfactor=x
ptunit=pt
u="u"
rep="$(for ((a=1, b=1; a <= $pages; a++, b++)); do echo -n "$a $b $a$u $b$u "; done |xargs | tr ' ' ',')"
origsizewidth="$(pdfinfo -box 1.pdf| grep MediaBox | cut -d : -f2 | awk '{print x  $3 FS $4}' | tr ' ' 'x' | cut -d x -f1 | cut -d . -f1)"
origsizeheight="$(pdfinfo -box 1.pdf| grep MediaBox | cut -d : -f2 | awk '{print x  $3 FS $4}' | tr ' ' 'x' | cut -d x -f2 | cut -d . -f1)"
doublewidth="`let MULTIPLICATION=$origsizewidth*2; echo $MULTIPLICATION`"
doubleheight="`let MULTIPLICATION=$origsizeheight*2; echo $MULTIPLICATION`"
echo $pdfname
echo $pages
echo $rep
echo $doublewidth
echo $doubleheight
echo "$doublewidth$xfactor$doubleheight$ptunit"
java -cp $multivalentpath/Multivalent.jar tool.pdf.Impose  -dim 2x2 -paper "$doublewidth$xfactor"$doubleheight$ptunit -layout "$rep" "$pdfname"
exit 0

http://ifile.it/m7tr4g0 (sample source pdf file - A5 size - 595x841 pt)

http://ifile.it/rscpoxi (same source pdf imposed 4 times -paper 1190x1682pt, in one page)

欢烬 2025-01-10 10:53:04

这应该可以通过 pdfjampodofoimpose

This should be doable with pdfjam or podofoimpose.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文