How can I resize a PDF and keep a right blank margin

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
michellux
Posts: 18
Joined: 2014-12-03T08:07:28-07:00
Authentication code: 6789

Re: How can I resize a PDF and keep a right blank margin

Post by michellux »

Ok I understood how to do.
When I just make the same example as you, it works fine, and I get the red page with margin on top, bottom and right.
But when I take my file it does not work, I have no margin ...
michellux
Posts: 18
Joined: 2014-12-03T08:07:28-07:00
Authentication code: 6789

Re: How can I resize a PDF and keep a right blank margin

Post by michellux »

The problem is on the temporary file. Even I mention exactly as you the dimensions 6300x8420 for the file, after creating this one, it has only 5950x8420 (?!)
michellux
Posts: 18
Joined: 2014-12-03T08:07:28-07:00
Authentication code: 6789

Re: How can I resize a PDF and keep a right blank margin

Post by michellux »

Here are the properties of my temporary file ...
Image
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: How can I resize a PDF and keep a right blank margin

Post by pipitas »

michellux wrote:Why should I do Phase 1 "Creating demo.pdf" if in phase 2 I use my pdf file ?
Of course, I only created a simple demo PDF file for myself, because you didn't provide one to play with.... :)
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: How can I resize a PDF and keep a right blank margin

Post by pipitas »

michellux wrote:The problem is on the temporary file. Even I mention exactly as you the dimensions 6300x8420 for the file, after creating this one, it has only 5950x8420 (?!)
Can you post (a link to) a sample PDF file of yours?
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: How can I resize a PDF and keep a right blank margin

Post by pipitas »

michellux wrote:The problem is on the temporary file. Even I mention exactly as you the dimensions 6300x8420 for the file, after creating this one, it has only 5950x8420 (?!)
The 6300x8420 (as I explained in my post) are the pixels. Ghostscript by default works with a resolution 720 PPI when creating PDF files. That means that the output PDF dimensions are 630x842 points, where

Code: Select all

1 inch == 72 points
michellux
Posts: 18
Joined: 2014-12-03T08:07:28-07:00
Authentication code: 6789

Re: How can I resize a PDF and keep a right blank margin

Post by michellux »

Here is my PDF file

http://cjoint.com/?0Lph6DaevYb
Post Reply