“Place” Letter Sized PDF to Larger pdf at specific position
Clash Royale CLAN TAG#URR8PPP
Lulu is a print on-demand service. Part of the creation process is to upload a cover. The "cover" is 1 page that has the dimensions 17.25 inches wide by 11.25 inches high. There is a 0.125 "bleed area" on all edges that will be cut off after printing. Excluding the bleed, the left 8.5 inches is the back cover and the right 8.5 inches is the front cover. See the image below for a visual aide.
I have a 1 page pdf called cover-page.pdf
on letter paper that I want to use as the front cover.
$ pdfinfo cover-page.pdf | grep Size
Page size: 612 x 792 pts (letter)
Using only open source command line tools, I want to create a new file, cover.pdf
, from cover-page.pdf
per the specification above by "placing" it in the right side of cover template.
I have investigated using pdftk, ImageMagick, and ghostscript. After reading the commands available for pdftk, that appears to be the wrong tool. I tried using ImageMagick and crafted the following:
convert cover-page.pdf
-background white -gravity SouthEast -extent 1233x801
-background white -gravity None -extent 1242x810
cover.pdf
This worked, but it uses raster transformations.
The last thing I looked into was Ghostscript. I am the least confident in my ghostscript abilities, but I did make some progress. I managed to create a blank pdf with the correct dimensions using gs -sDEVICE=pdfwrite -o cover.pdf -dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
. However, as soon as I add -dPDFFitPage -f cover-page.pdf
to process the file, the page size becomes 810 x 1048.24
and the page rotates. I assume this is to "fit" the aspect ratio of cover-page.pdf
. So, my final (unsuccessful) command is:
gs
-sDEVICE=pdfwrite -o cover.pdf
-dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
-dPDFFitPage -f cover-page.pdf
pdf ghostscript pdftk postscript
add a comment |
Lulu is a print on-demand service. Part of the creation process is to upload a cover. The "cover" is 1 page that has the dimensions 17.25 inches wide by 11.25 inches high. There is a 0.125 "bleed area" on all edges that will be cut off after printing. Excluding the bleed, the left 8.5 inches is the back cover and the right 8.5 inches is the front cover. See the image below for a visual aide.
I have a 1 page pdf called cover-page.pdf
on letter paper that I want to use as the front cover.
$ pdfinfo cover-page.pdf | grep Size
Page size: 612 x 792 pts (letter)
Using only open source command line tools, I want to create a new file, cover.pdf
, from cover-page.pdf
per the specification above by "placing" it in the right side of cover template.
I have investigated using pdftk, ImageMagick, and ghostscript. After reading the commands available for pdftk, that appears to be the wrong tool. I tried using ImageMagick and crafted the following:
convert cover-page.pdf
-background white -gravity SouthEast -extent 1233x801
-background white -gravity None -extent 1242x810
cover.pdf
This worked, but it uses raster transformations.
The last thing I looked into was Ghostscript. I am the least confident in my ghostscript abilities, but I did make some progress. I managed to create a blank pdf with the correct dimensions using gs -sDEVICE=pdfwrite -o cover.pdf -dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
. However, as soon as I add -dPDFFitPage -f cover-page.pdf
to process the file, the page size becomes 810 x 1048.24
and the page rotates. I assume this is to "fit" the aspect ratio of cover-page.pdf
. So, my final (unsuccessful) command is:
gs
-sDEVICE=pdfwrite -o cover.pdf
-dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
-dPDFFitPage -f cover-page.pdf
pdf ghostscript pdftk postscript
add a comment |
Lulu is a print on-demand service. Part of the creation process is to upload a cover. The "cover" is 1 page that has the dimensions 17.25 inches wide by 11.25 inches high. There is a 0.125 "bleed area" on all edges that will be cut off after printing. Excluding the bleed, the left 8.5 inches is the back cover and the right 8.5 inches is the front cover. See the image below for a visual aide.
I have a 1 page pdf called cover-page.pdf
on letter paper that I want to use as the front cover.
$ pdfinfo cover-page.pdf | grep Size
Page size: 612 x 792 pts (letter)
Using only open source command line tools, I want to create a new file, cover.pdf
, from cover-page.pdf
per the specification above by "placing" it in the right side of cover template.
I have investigated using pdftk, ImageMagick, and ghostscript. After reading the commands available for pdftk, that appears to be the wrong tool. I tried using ImageMagick and crafted the following:
convert cover-page.pdf
-background white -gravity SouthEast -extent 1233x801
-background white -gravity None -extent 1242x810
cover.pdf
This worked, but it uses raster transformations.
The last thing I looked into was Ghostscript. I am the least confident in my ghostscript abilities, but I did make some progress. I managed to create a blank pdf with the correct dimensions using gs -sDEVICE=pdfwrite -o cover.pdf -dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
. However, as soon as I add -dPDFFitPage -f cover-page.pdf
to process the file, the page size becomes 810 x 1048.24
and the page rotates. I assume this is to "fit" the aspect ratio of cover-page.pdf
. So, my final (unsuccessful) command is:
gs
-sDEVICE=pdfwrite -o cover.pdf
-dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
-dPDFFitPage -f cover-page.pdf
pdf ghostscript pdftk postscript
Lulu is a print on-demand service. Part of the creation process is to upload a cover. The "cover" is 1 page that has the dimensions 17.25 inches wide by 11.25 inches high. There is a 0.125 "bleed area" on all edges that will be cut off after printing. Excluding the bleed, the left 8.5 inches is the back cover and the right 8.5 inches is the front cover. See the image below for a visual aide.
I have a 1 page pdf called cover-page.pdf
on letter paper that I want to use as the front cover.
$ pdfinfo cover-page.pdf | grep Size
Page size: 612 x 792 pts (letter)
Using only open source command line tools, I want to create a new file, cover.pdf
, from cover-page.pdf
per the specification above by "placing" it in the right side of cover template.
I have investigated using pdftk, ImageMagick, and ghostscript. After reading the commands available for pdftk, that appears to be the wrong tool. I tried using ImageMagick and crafted the following:
convert cover-page.pdf
-background white -gravity SouthEast -extent 1233x801
-background white -gravity None -extent 1242x810
cover.pdf
This worked, but it uses raster transformations.
The last thing I looked into was Ghostscript. I am the least confident in my ghostscript abilities, but I did make some progress. I managed to create a blank pdf with the correct dimensions using gs -sDEVICE=pdfwrite -o cover.pdf -dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
. However, as soon as I add -dPDFFitPage -f cover-page.pdf
to process the file, the page size becomes 810 x 1048.24
and the page rotates. I assume this is to "fit" the aspect ratio of cover-page.pdf
. So, my final (unsuccessful) command is:
gs
-sDEVICE=pdfwrite -o cover.pdf
-dDEVICEWIDTHPOINTS=1242 -dDEVICEHEIGHTPOINTS=810
-dPDFFitPage -f cover-page.pdf
pdf ghostscript pdftk postscript
pdf ghostscript pdftk postscript
edited Jan 18 at 7:41
Ra is dead
asked Jan 15 at 8:54
Ra is deadRa is dead
637
637
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
pdfjam
, a tool that comes in TeX distributions like Texlive, will do the trick. The command will be
pdfjam -o cover.pdf --papersize '17.25in,11.25in' --noautoscale true --nup 2x1 cover-page.pdf ',1'
pdfjam
relies on the LaTeX pdfpages
package. By default it puts one input page per output page, scales input to fit the paper, and centers it. Here, --nup 2x1
instructs to put two input pages per output page, and --noautoscale true
, not to scale (as you may have guessed!). As input pages I used a blank page () and the first page of the input document (
1
); by default no spacing is added between input pages.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494556%2fplace-letter-sized-pdf-to-larger-pdf-at-specific-position%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
pdfjam
, a tool that comes in TeX distributions like Texlive, will do the trick. The command will be
pdfjam -o cover.pdf --papersize '17.25in,11.25in' --noautoscale true --nup 2x1 cover-page.pdf ',1'
pdfjam
relies on the LaTeX pdfpages
package. By default it puts one input page per output page, scales input to fit the paper, and centers it. Here, --nup 2x1
instructs to put two input pages per output page, and --noautoscale true
, not to scale (as you may have guessed!). As input pages I used a blank page () and the first page of the input document (
1
); by default no spacing is added between input pages.
add a comment |
pdfjam
, a tool that comes in TeX distributions like Texlive, will do the trick. The command will be
pdfjam -o cover.pdf --papersize '17.25in,11.25in' --noautoscale true --nup 2x1 cover-page.pdf ',1'
pdfjam
relies on the LaTeX pdfpages
package. By default it puts one input page per output page, scales input to fit the paper, and centers it. Here, --nup 2x1
instructs to put two input pages per output page, and --noautoscale true
, not to scale (as you may have guessed!). As input pages I used a blank page () and the first page of the input document (
1
); by default no spacing is added between input pages.
add a comment |
pdfjam
, a tool that comes in TeX distributions like Texlive, will do the trick. The command will be
pdfjam -o cover.pdf --papersize '17.25in,11.25in' --noautoscale true --nup 2x1 cover-page.pdf ',1'
pdfjam
relies on the LaTeX pdfpages
package. By default it puts one input page per output page, scales input to fit the paper, and centers it. Here, --nup 2x1
instructs to put two input pages per output page, and --noautoscale true
, not to scale (as you may have guessed!). As input pages I used a blank page () and the first page of the input document (
1
); by default no spacing is added between input pages.
pdfjam
, a tool that comes in TeX distributions like Texlive, will do the trick. The command will be
pdfjam -o cover.pdf --papersize '17.25in,11.25in' --noautoscale true --nup 2x1 cover-page.pdf ',1'
pdfjam
relies on the LaTeX pdfpages
package. By default it puts one input page per output page, scales input to fit the paper, and centers it. Here, --nup 2x1
instructs to put two input pages per output page, and --noautoscale true
, not to scale (as you may have guessed!). As input pages I used a blank page () and the first page of the input document (
1
); by default no spacing is added between input pages.
answered Jan 24 at 21:15
L. LevrelL. Levrel
1,304412
1,304412
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494556%2fplace-letter-sized-pdf-to-larger-pdf-at-specific-position%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown