COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Is there an easy way to put two single pdf pages side by side in a single pdf page?

• Email
• Follow

I have a number of pairs of pdf pages. The pdf pages in each pair are
of the same height or same width. I want to combine them into a single
pdf file side by side (without spacing in between) (left-right if they
are of the same height, and top-bottom if they are of the same width).

I could includegraphics in latex to have two pdf pages in a single pdf
pages. But the adjustment of the page margin and final pdf page size
may not be straightforward.

Could you please let me know what is the easiest way to put two pdf
pages in side by side in a single page?

 0
Reply pengyu.ut (763) 4/11/2010 8:00:21 PM

See related articles to this posting

Le 11/04/2010 22:00, Peng Yu a �crit :
> I have a number of pairs of pdf pages. The pdf pages in each pair are
> of the same height or same width. I want to combine them into a single
> pdf file side by side (without spacing in between) (left-right if they
> are of the same height, and top-bottom if they are of the same width).
>
> I could includegraphics in latex to have two pdf pages in a single pdf
> pages. But the adjustment of the page margin and final pdf page size
> may not be straightforward.
>
> Could you please let me know what is the easiest way to put two pdf
> pages in side by side in a single page?

There is the pdfpages package with something like that :

\includepdf[
pages={-},     % s�lectionne toutes les pages
frame=true,    % trace un cadre pour controle
%   noautoscale,      % pas de mise � l'�chelle
nup=2,         % nb page d'origine par page
% imprim�es
%   signature=4,      % imposition des pages,
% 32 pour gros volume ?
%   booklet=true,     % true : imposition de
% l'ensemble des pages
%   landscape,     % pour format d'origine
% portrait
]{\pdffilename}

Excuse me it's late, and I drunk some (and pretty much) wine at dinner...

But pdfpages allows to do "booklets" (2 pages on one, with rearrangement
of pages in order to fold them together like a book).

anyway, pdfpages is your friend if you have to include, one way or
another, full pages from another pdf file. \includegraphics can do that,
but \includepdf is easier...

Regards

 0

GL <gouailles@gmail.com> writes:

> Le 11/04/2010 22:00, Peng Yu a écrit :
> There is the pdfpages package with something like that :
>
> \includepdf[
>    pages={-},     % sélectionne toutes les pages
>    frame=true,    % trace un cadre pour controle
> %   noautoscale,      % pas de mise à l'échelle
>    nup=2,         % nb page d'origine par page
>             % imprimées
> %   signature=4,      % imposition des pages,
>             % 32 pour gros volume ?
> %   booklet=true,     % true : imposition de
>             % l'ensemble des pages
> %   landscape,     % pour format d'origine
>             % portrait
>    ]{\pdffilename}
>
>
> But pdfpages allows to do "booklets" (2 pages on one, with
> rearrangement of pages in order to fold them together like a book).
>
> anyway, pdfpages is your friend if you have to include, one way or
> another, full pages from another pdf file. \includegraphics can do
> that, but \includepdf is easier...

Sorry to jump into the thread.

I'm very interested in this pdfpages package, because so far I always
used the long way to create imposed pdfs: .tex => (Xe)LaTeX => .pdf =>
(via pdftops from poppler) => .ps => psutils (psbook & psnup) => .pdf (via
ghostscript). This process is obviously slow and kind of CPU-killer.

Now, I've tried the pdfpages packages, but it looks like the logical
pages on the even physical pages are rotated by 180°. This perhaps it's
not a problem for printing (or maybe welcome on some printers), but I
found it strange because it's not the default behaviour of psbook. I did
read the manual, but I couldn't find a option to change this behaviour.

Am I missing something or exist some better solution to avoid
the pdf => ps => pdf chain to impose the pdf?

The desired layout (produced by the above descripted chain) is

http://theanarchistlibrary.org/pdfs/a4_imposed/John_Clark__A_Social_Ecology_a4_imposed.pdf

While if I rely on pdfpages I get

http://theanarchistlibrary.org/docs/test_imposed_pdfpages.pdf

which is way faster but not optimal for various reasons.

Source used:

\documentclass[a4paper,final]{minimal}
\usepackage{pdfpages}
\begin{document}
\includepdf[%
pages=-,%
frame=true,%
nup=1x2,%
booklet=true,
landscape,turn=true]{prova.pdf}
\end{document}

Where prova.pdf was a a5 compiled with XeLaTeX

Regards

--
Marco

 0

Marco Pessotto <melmothx@gmail.com> writes:

> GL <gouailles@gmail.com> writes:
>
>> Le 11/04/2010 22:00, Peng Yu a écrit :
>> There is the pdfpages package with something like that :
>>
>> \includepdf[
>>    pages={-},     % sélectionne toutes les pages
>>    frame=true,    % trace un cadre pour controle
>> %   noautoscale,      % pas de mise à l'échelle
>>    nup=2,         % nb page d'origine par page
>>             % imprimées
>> %   signature=4,      % imposition des pages,
>>             % 32 pour gros volume ?
>> %   booklet=true,     % true : imposition de
>>             % l'ensemble des pages
>> %   landscape,     % pour format d'origine
>>             % portrait
>>    ]{\pdffilename}
>>
>>
>> But pdfpages allows to do "booklets" (2 pages on one, with
>> rearrangement of pages in order to fold them together like a book).
>>
>> anyway, pdfpages is your friend if you have to include, one way or
>> another, full pages from another pdf file. \includegraphics can do
>> that, but \includepdf is easier...
>
> Am I missing something or exist some better solution to avoid
> the pdf => ps => pdf chain to impose the pdf?
>
> The desired layout (produced by the above descripted chain) is
> http://theanarchistlibrary.org/pdfs/a4_imposed/John_Clark__A_Social_Ecology_a4_imposed.pdf
>
> While if I rely on pdfpages I get
>
> http://theanarchistlibrary.org/docs/test_imposed_pdfpages.pdf
>

It looks like that the answer to my own question is pdfjam (tested with
version 2.01).

Something like:
pdfjam --vanilla --suffix book \
--signature <signature> --landscape --paper a4paper \
pdffile.pdf

But the odd pages are displayed upside-down in the new pdf (because it's
a frontend for pdfpages).

Now, the question is: is there a way to change the layout of the odd
pages?

If not, does a similar layout can be easy printed on printers
with duplexing  capabilities? (The poor men will just care how to turn
the print job).

--
Marco

 0

I asked the maintainer of pdfpages to answer some questions I previously
posted here. This is the reply, which I think is quite interesting. Huge
thanks to Andreas Matthias.

Hello Marco,

Marco Pessotto wrote:

> I'm trying to impose a large archive of +1000 pdfs. So far I used the
> chain pdftops => psbook => ps2pdf. Now that I found pdfpages (probably
> late, my bad), I'd like to use it for imposing (which is for sure
> superior, faster and preserve quality). But the "booklets" of the
> output appears with odd pages upside down. I don't know if this is the
> right thing to do. For sure this behaviour isn't the same as psbook
> and I'm somehow reclutant to change the appearence of the pdfs.

Pdfpages imposes the pages such that they should be turned over
the long edge (while printing), whereas with psnup they should be
turned over the short edge. In Postscript this is called /Tumble
which can be set to true or false.

Today all duplex printer should be able to do printing in short
edge mode as well as long edge mode. So this shouldn't be a
big issue.

However, if you like short edge printing more you can direct
pdftex (xetex) to rotate every second page. Here's an example:

\documentclass[a4paper,final]{article}
\usepackage{pdfpages}
\usepackage{ifpdf,ifxetex}
\makeatletter
\ifpdf
\EveryShipout{\ifodd\c@page\else\pdfpageattr{/Rotate 180}\fi}%
\fi
\ifxetex
\EveryShipout{\ifodd\c@page\special{pdf: put @thispage << /Rotate 180 >>}%
\fi
}
\fi
\makeatother

\begin{document}
\includepdf[pages=-, nup=1x2, booklet=true, landscape]{a5.pdf}
\end{document}

> If you think the behaviour of pdfpages is the correct one and the one
> of psbook is the wrong one (thinking about duplexing printing), please
> let me know.

It's just a question of short edge' vs. long edge' printing.
There's no right or wrong behaviour.

Ciao
Andreas

--
Marco

 0

Heiko Oberdiek <heiko.oberdiek@googlemail.com> writes:

> Marco Pessotto <melmothx@gmail.com> wrote:
>
>>   \EveryShipout{\ifodd\c@page\else\pdfpageattr{/Rotate 180}\fi}%
>
> Then you should load the package you need:
> \usepackage{everyshi}
>
> eso-pic and that package now uses package atbegshi instead).

Good to know, thanks!

--
Marco

 0

Marco Pessotto <melmothx@gmail.com> wrote:

>   \EveryShipout{\ifodd\c@page\else\pdfpageattr{/Rotate 180}\fi}%

Then you should load the package you need:
\usepackage{everyshi}

eso-pic and that package now uses package atbegshi instead).

--
Heiko Oberdiek

 0

> There is the pdfpages package with something like that :
>
> \includepdf[
> =A0 =A0 pages=3D{-}, =A0 =A0 % s=E9lectionne toutes les pages
> =A0 =A0 frame=3Dtrue, =A0 =A0% trace un cadre pour controle
> % =A0 noautoscale, =A0 =A0 =A0% pas de mise =E0 l'=E9chelle
> =A0 =A0 nup=3D2, =A0 =A0 =A0 =A0 % nb page d'origine par page
> =A0 =A0 =A0 =A0 =A0 =A0 =A0% imprim=E9es
> % =A0 signature=3D4, =A0 =A0 =A0% imposition des pages,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0% 32 pour gros volume ?
> % =A0 booklet=3Dtrue, =A0 =A0 % true : imposition de
> =A0 =A0 =A0 =A0 =A0 =A0 =A0% l'ensemble des pages
> % =A0 landscape, =A0 =A0 % pour format d'origine
> =A0 =A0 =A0 =A0 =A0 =A0 =A0% portrait
> =A0 =A0 ]{\pdffilename}
>
> Excuse me it's late, and I drunk some (and pretty much) wine at dinner...
>
> But pdfpages allows to do "booklets" (2 pages on one, with rearrangement
> of pages in order to fold them together like a book).
>
> anyway, pdfpages is your friend if you have to include, one way or
> another, full pages from another pdf file. \includegraphics can do that,
> but \includepdf is easier...
>
> Regards

It is not exactly what I am looking for. Please see the example in the

http://rapidshare.com/files/388564121/018.tar.bz2

There is a wide space in between the two figures if I use the
following command.

\documentclass{article}
\usepackage[final]{pdfpages}

\begin{document}
\includepdfmerge[noautoscale,nup=3D1x2]{018T.pdf,018B.pdf}
\end{document}

The following commands will result in a very tiny space in between the
two figures. And I don't know how to get rid of it. Would you please
let me know how to get rid of the extra space?

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\parbox{\linewidth}{
\includegraphics[scale=3D.5]{018T.pdf}\par
\includegraphics[scale=3D.5]{018B.pdf}
}
\end{document}

The above commands will result in white spaces on boundaries. I want
to automatically determine paper size from the figure size. Also I
want to combine 4 figures in the following layout. Could you please
let me know if there is a convenient way in latex? Or there is some
way in other tools other than latex?

+--------------+--------------------+
|                  |                          |
|                  |                          |
|                  |                          |
|                  +--------------------+
|                  |                          |
+--------------+                         |
|                  |                          |
|                  |                          |
|                  |                          |
|                  |                          |
|                  |                          |
+--------------+--------------------+

Regards,
Peng

 0

7 Replies
1392 Views

Similar Articles

12/13/2013 1:05:02 PM
page loaded in 43606 ms. (0)

Similar Artilces:

Extract page size from a single-page pdf
Hi all, I'm using PHP (on Windows) to extract data from a bunch of single-page PDFs. They are created as such and never subsequently edited (so they were never, for instance, multipage PDFs from which pages were then deleted). What's the simplest way of extracting the page size from these files? (I'm not particularly fussed about page orientation.) At present, I'm using a combination of XPDF and pdftk to extract other information from these files. On Mar 4, 9:59=A0am, strawberry <zac.ca...@gmail.com> wrote: > Hi all, > > I'm using PHP (on Windows) to extr...

Append PDF's as objects into single page PDF
Hello all, I have to dynamically build a PDF report based on different assumptions. The idea is to generate multiple PDFs through Forms (FDF) then append them into one single PDF. Which PDFs will be merged together depends on values of the first form. What I've done so far is generate all the relevant PDFs (some are just one-line text field) and append them into a single PDF using a cool little tool (pdftk <http://www.accesspdf.com/index.php?topic=pdftk>). I've found numerous tools like this one that let you append pages into the final PDF. My problem is that I'd like to ...

i'm sure this has been asked before - but how do i go about writing a program that reads pdf file. i plan to render the file within my app. In article <TopWc.105826\$4h7.15043798@twister.nyc.rr.com>, goahead@hehe.com says... > i'm sure this has been asked before - but how > do i go about writing a program that reads pdf > file. > > i plan to render the file within my app. 1) Read and understand the complete PDF Reference manual, currently at version 1.5. By the time you complete this task it will almost certainly be at 1.6, so read that too. 2) Write code ...

Auto Extract single page from pdf's
I have many thousands of 10-50 page pdf files. I need to extract page 7 of every pdf. I cant seem to locate any utilities to do this. Any ideas? MIke wrote: > I have many thousands of 10-50 page pdf files. > > I need to extract page 7 of every pdf. > > I cant seem to locate any utilities to do this. Any ideas? The PDFTK (http://www.accesspdf.com/pdftk) free command-line utility will do that easily. Just put it in a batch file and you're ready to go... For example, to extract page 7, put the following command in a loop: pdftk input.pdf cat 7 output output.pdf ...

Can you print some PDF-pages on a single A4-sheet?
Dear PDF-expert, Some PDF-files contain only small pages (on A6-format for example). When you have an A4-printer you can only print those small pages on the relatively large A4-format. A lot of unprinted paper will be wasted. Is there a possiblility to print for example two landscape A6-format pages on a A4 sheet (think about the handout-opportunity like PPT-files)? Thanks in advance! Sure, just use itext toolbox. It has a plugin to convert your pdf files to handouts. http://www.lowagie.com/iText/itext.jnlp Best regards, Carsten nieuwsberichtontvangst schrieb: > Dear PDF-expert,...

Seperate a single 150 Page PDF into 150 seperate documents
Hello, I thought this would be simple, but I'm having problems finding a solution. I have a 150 page PDF and I simply need to convert it into 150 seperate pages. I do have full Adobe Professional running on Windows XP Pro, but short of doing Document > Pages > Split Page 150 times I've found no auto way of doing this. I've also downloaded PDFTK but I've not seen any example showing what I'm trying to do, and reading the help hasn't given me any good starting point. Any ideas? I don't plan on spending money on a tool to do this though I know several exist,...

Splitting 2 pages/page landscape postscript file into two single page portrait pages
Hi, I am a newbie. I have a book.ps file which has all the pages, having two facing pages per portrait page like this: +---------------+--------------+ | | | | | | +---------------+--------------+ I want to split the two pages. I dont want to scan the pages and then make bulky images out of compact pdf file. The file was generated from a dvi and latex that are no longer available. The author has died. The ps was made to save the number of printed pages in an era before pdf. So there are two problems: (1) split the ps into single p...

Combining two pdf files each of which contains one side of a double sided document
I am aware of the feature of acrobat that allows scanning of two sided documents and automatically merges them into one, however in my case the documents are already scanned and in two different pdf files. pdf file no. 1 contains pages 1, 3, 5, 7, 9, etc pdf file no. 2 contains pages 2, 4, 6, 8, 10, etc Does anyone know of any software or feature within Acrobat Professional 6.0 that would allow me to automatically combine these two prescanned files containing each side of a document into one ? SA wrote: > I am aware of the feature of acrobat that allows scanning of two sided > docu...

Two Sided PDF?
I downloaded a PDF of accounting ledger paper. i want to use a color dual sided printer to run off about ten double sided sheets of it - but the PDF is only one side. Rather than feed the paper in twice, I would like to have the one PDF have two pages of the exact same thing. From there I can enable duplex printing and run off ten copies. Simple. I have PDF writer and our graphics guy has Acrobat. Is there a way I can do it with just PDF writer? Acurajustin1978@hotmail.com wrote: > I downloaded a PDF of accounting ledger paper. i want to use a color > dual sided printer to run of...

how to split pdf page into two
Hi I have a book form pdf document which was originally created with 2 up format (2 pages on one side of a sheet in landscape layout). The font is too small for our needs. I need to split the documents so that it print one page per sheet (as it will normally do) I cannot find any option on Acrobat that addresses this issue. Does someone have any clue. thanks. Aamir. aamirghanchi@yahoo.com wrote: >Hi I have a book form pdf document which was originally created with 2 >up format (2 pages on one side of a sheet in landscape layout). The >font is too small for our needs. I need to s...

jpg to pdf, and how to make two pages beside each other?
I've scanned a book, and now I want to create a pdf from all the pages. I've found some software that could successfully do this ('image2PDF') but it formed a long file with the pages placed one on top of the next. This is certainly 'OK', but I think I'd prefer it if I had them arranged two-by-two, eg: 1,2 3,4 5,6 Anyone know of software that would let me create the pdf in this format? Or is there software that can let me edit what i've already made? Thanks very much! Charlie (ps. expensive software not an option, eg. Acrobat) Hi, On 7 Aug 2005 04:48:...

Concatenating two different document-class files in a single PDF
Dear all, I would like to obtain a single PDF file with the concatenation of two sources: 1. A first page of letter document class. 2. Several pages in an article class. For information I am on a Debian GNU/Linux system with the teTeX distribution 2.0.2 I have tried the following solutions: A) Just concatenating the LaTeX code. LaTeX only typesets the first documentclass envrionment and ignores the second. B) Generate separate PS files and use psmerge command. I do the process: 1. latex letter.tex --> dvips letter.dvi --> obtaining letter.ps 2. latex ar...

any posiblle of giving two request in single html page in netscape browser
hi friends, Im working javascript, In a page , i need to give multiple xmlhttp request in a single page sequencely, In case of IE browser it working fine, But incase of Netscape browser, first xmlhttp request is going and im getting the response for that request, and im sending the second request but it is not going. can u tell me , is there any thing like that balakrishnan.dinesh@gmail.com wrote: > hi friends, > Im working javascript, > In a page , i need to give multiple xmlhttp request in a single > page sequencely, > In case of IE brows...

[GS] Slightly different page size leads to two times bigger PDF?
I apologize if this has been discussed before. I can't understand what's going on here. The input file is a 150 MB EPS, 850x1133 points bounding box. I want to convert it to PDF. Using GhostView, I try to create the PDF. In the first case, I set the media size in GhostView to A3. The resulting PDF is about 600KB in size. In the second case, I set the media size to a user defined one of 850x1133 pts. The PDF becomes two times bigger - about 1400KB. It doesn't really matter which page matching option in GhostView I select, the results are the same. Here are the two option files Ghost...

Printing a single page document twice on the same page
I have a single page PDF document that I would like to print twice on the same page. Example: a small one page flyer that could be printed off twice on the same page and cut in half to save paper. This is failrly easy to do with a two page document (just print 2-up). I'd rather not have to double the size of the pdf by recreating the single page and making a two page document with duplicate data. Any ideas? ...

How to do Single page/double page on Duplex Printer.
I know it must be possible, but Ive never seen example Postscript code on how to do the equivalent of 'showpage' to generate only a single sided page on a DUPLEX printer. (actually I want to switch back an forth inside the document, doing some pages duplex, and a few single sided). For reference, this is a Level 2 printer. Reg.Clemens reg@dwf.com On 2008-04-11, Reg Clemens <clemens@dwf.com> wrote: > I know it must be possible, but Ive never seen example Postscript code > on how to do the equivalent of 'showpage' to generate only a single > sided pag...

breaking side-by-side lstlistings across pages
Hi, I would like to break long listings across pages. Normally, lstlistings (from the listings package) allow for that (see the first listing below). But I would like to have two listsings side by side and break across pages. I tried putting them in minipages, but a minipage does not break, see the other listings below. Does anyone know a solution to this? BTW, listings also has a parameter `linewidth' to specify the width of a listing, but I fail to get these listings sides by side. Thanks in advance, -Hendri. -------------------------------------------------------------------- \docu...

How to add the word "page" above the column of page numbers on the right hand side in all pages such as TOC, LOT, LOF
Hi, I am creating Table of Contents (TOC), List of Tables(LOT) and List of Figures (LOF). My graduate school wants me to add the page in every single page of these pages where the following Page title1.................. 11 title2.................. 20 title3.................. 31 title4.................. 42 .. .. .. will appear in any of the pages. I need to essentially add the word "page" above the column of page numbers on the right hand side in all pages. Any help or suggestion in this regards as early as possible would be of great help to my desperate e...

Mergin Background pdf with another multi pages pdf
Hi NG, in an office program i can only print black on white, so only Text. By printing out with a printer i have normal ofice paper with our company logo. But, i also want to send some documents by mail. (pdf) To make a pdf File i use an PDF Printer. PowerPDF Creator (www.sourceforge.net) and it is doing its job verry fine. But here i also only got black on white pdf files. But how to merge our Company LetterBackground to the pdf files? Thnx for help Jan Schmidt Jan Schmidt <histery@gmx.net>: > in an office program i can only print black on white, so only Text. > By pri...

How print a pdf file on both sides of a paper(Duplexing for pdf files)
Hi All, Please let me know how to print a pdf file on both sides of a papers. Thanks in advance. krishnapalvadi@gmail.com wrote: > Hi All, > Please let me know how to print a pdf file on both sides of a > papers. > Thanks in advance. > Do you have a duplex printer? krishnapalvadi@gmail.com wrote: > Hi All, > Please let me know how to print a pdf file on both sides of a > papers. > Thanks in advance. The same way that you would print any other document on both sides of the paper. You select duplex output in your printer driver properties. Presuma...