Answers.Body: <p>There is a program called jPdftweak which will let you scale pdf pages to whatever size you would want. You can set the parameters for the conversion to the larger page size and jPdftweak will scale all the pages in the file in accordance with the settings you have made. jPdftweak is a cross-platform, free Java program. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-17T19:26:46.037Z
Answers.Text: Can you use this Java program and still pre-flight the PDF afterwards for commercial print quality production?
Answers.UserDisplayName: maxwell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-19T04:03:08.557Z
Answers.Text: I have done so but your mileage may vary.
Answers.UserDisplayName: user26732
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-17T01:32:12.283Z
Answers.LastActivityDate: 2014-10-17T01:32:12.283Z
Answers.UserDisplayName: user26732
Answers.Body: <p>If your ebook reader supports EPUB you might be better of extracting the images from the PDF and DjVu files and creating EPUB files from the resized images. </p>
  
  <p>This of course depends on the handling of larger-then-screen images on your reader, if that is different for EPUB than for images embedded in PDF, then of course you should target the better supported format (with regards to zooming and panning). A series of images in an EPUB file are easier to extract than the corresponding images from a PDF stream. So the handling on your ebook reader should be faster. At least on the systems I tested that is the case ( Sony PRS-700, Sony PRS-T1, Cybook Odyssey HD).</p>
  
  <p>For the actual extraction, scaling and recombination I use a Python based program on Linux that drives standard tools like <a href="https://en.wikipedia.org/wiki/Pdfimages" rel="nofollow"><code>pdfimages</code></a> and <a href="http://djvu.sourceforge.net/doc/man/ddjvu.html" rel="nofollow"><code>ddjvu</code></a> for the extraction, <a href="http://www.imagemagick.org/" rel="nofollow"><code>imagemagick</code></a> for the scaling/conversion, and does the recombination into EPUB itself.</p>
  
  <p>Of course the last step could easily be changed to the recombination into a PDF file using <a href="http://www.reportlab.com/software/opensource/" rel="nofollow">reportlab</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-06T20:48:13.567Z
Answers.Text: Thank you for the suggestions, but I did say what ereader I have (Kobo Touch, for the record), which doesn't allow panning in EPUBs, and doesn't support DJVU at all, so I'm stuck with PDF. I will check out your links to see if they acomplish what I'm looking for.
Answers.UserDisplayName: andrepd
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-06T21:32:26.947Z
Answers.Text: @andrepd Sorry I have overlooked that. I am not familiar with the Kobo. I am used to not being able to pan the images in an epub, unless you zoom in (standard they images are fitted, and for panning they have to be larger than screen size). If you try one by hand and get it to work then automating things by calling the programs from Python (or some other scripting language you know) should not be difficult.
Answers.UserDisplayName: Anthon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-05T18:36:08.933Z
Answers.LastActivityDate: 2014-10-17T05:58:06.817Z
Answers.LastEditDate: 2014-10-17T05:58:06.817Z
Answers.UserDisplayName: Anthon
Body: <p>I have a couple of PDFs and DJVU documents that I want to read on an ereader (namely, Kobo Touch). However, the size of the pages differ, between cover and actual content, and even between two different content pages, and what my ereader does is use the size of the first page as the "template" for the viewport size for all my documents. It means that if the first page is smaller, it will display only a small part of the next (bigger) pages, corresponding to the size of the first page. If the first pages is larger, then the other smaller pages will be tiny on a corner of the screen.</p>
  
  <p>In other words, how can I scale all pages in a PDF/DJVU document to the same size (preferably the largest size among the pages in the document)?</p>
  
  <p>PS: The files are mainly scanned scientific papers, in DJVU format, though I have to convert them to PDF in order to read them in my ereader.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-03T15:57:27.470Z
Comments.Text: This question is similar to [Reading PDFs on Kindle device](http://ebooks.stackexchange.com/questions/15/reading-pdfs-on-kindle-device).  The most popular answer to that question ([k2pdfopt](http://willus.com/k2pdfopt)) will work here, too.
Comments.UserDisplayName: willus
Tags: <ebook-readers><pdf><kobo><djvu>
Title: Scaling all pages in a PDF or DJVU file to the same size
UserDisplayName: andrepd
ThreadText: # Scaling all pages in a PDF or DJVU file to the same size
  
  (Asked by: username_0 on 2014-03-05)
  
  I have a couple of PDFs and DJVU documents that I want to read on an ereader (namely, Kobo Touch). However, the size of the pages differ, between cover and actual content, and even between two different content pages, and what my ereader does is use the size of the first page as the "template" for the viewport size for all my documents. It means that if the first page is smaller, it will display only a small part of the next (bigger) pages, corresponding to the size of the first page. If the first pages is larger, then the other smaller pages will be tiny on a corner of the screen.
  
  In other words, how can I scale all pages in a PDF/DJVU document to the same size (preferably the largest size among the pages in the document)?
  
  PS: The files are mainly scanned scientific papers, in DJVU format, though I have to convert them to PDF in order to read them in my ereader.
  
  **Tags:** ebook-readers, pdf, kobo, djvu
  
  > **Comments:**
  > **username_1**: This question is similar to [Reading PDFs on Kindle device](http://ebooks.stackexchange.com/questions/15/reading-pdfs-on-kindle-device).  The most popular answer to that question ([k2pdfopt](http://username_1.com/k2pdfopt)) will work here, too.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-10-17. Score: 2
  
  There is a program called jPdftweak which will let you scale pdf pages to whatever size you would want. You can set the parameters for the conversion to the larger page size and jPdftweak will scale all the pages in the file in accordance with the settings you have made. jPdftweak is a cross-platform, free Java program.
  
  > **Comments:**
  > **username_3**: Can you use this Java program and still pre-flight the PDF afterwards for commercial print quality production?  
  > **username_2**: I have done so but your mileage may vary.  
  
  ---
  
  ### Answer by username_4 on 2014-03-05. Score: 1
  
  If your ebook reader supports EPUB you might be better of extracting the images from the PDF and DjVu files and creating EPUB files from the resized images.
  
  This of course depends on the handling of larger-then-screen images on your reader, if that is different for EPUB than for images embedded in PDF, then of course you should target the better supported format (with regards to zooming and panning). A series of images in an EPUB file are easier to extract than the corresponding images from a PDF stream. So the handling on your ebook reader should be faster. At least on the systems I tested that is the case ( Sony PRS-700, Sony PRS-T1, Cybook Odyssey HD).
  
  For the actual extraction, scaling and recombination I use a Python based program on Linux that drives standard tools like [`pdfimages`](https://en.wikipedia.org/wiki/Pdfimages) and [`ddjvu`](http://djvu.sourceforge.net/doc/man/ddjvu.html) for the extraction, [`imagemagick`](http://www.imagemagick.org/) for the scaling/conversion, and does the recombination into EPUB itself.
  
  Of course the last step could easily be changed to the recombination into a PDF file using [reportlab](http://www.reportlab.com/software/opensource/).
  
  > **Comments:**
  > **username_0**: Thank you for the suggestions, but I did say what ereader I have (Kobo Touch, for the record), which doesn't allow panning in EPUBs, and doesn't support DJVU at all, so I'm stuck with PDF. I will check out your links to see if they acomplish what I'm looking for.  
  > **username_4**: @username_0 Sorry I have overlooked that. I am not familiar with the Kobo. I am used to not being able to pan the images in an epub, unless you zoom in (standard they images are fitted, and for panning they have to be larger than screen size). If you try one by hand and get it to work then automating things by calling the programs from Python (or some other scripting language you know) should not be difficult.  
  
  ---
  
  