Hello:
I have a 8.5" x 11" PNG at 600 DPI (5100x6600 pixels).
When I write to PDF, it comes out 70.83" x 91.67" for some reason.
How do I get a 8.5" x 11" PDF file output??
In searching I have seen others with this issue, but not really a solution.
Thank you for your help as always!
PNG to PDF comes out very large!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PNG to PDF comes out very large!
A simple conversion works fine for me, with v6.9.5-3:
The input and output are the same size, in inches.
To help you, we need more information. What version of IM? Exactly what (Perl?) commands did you use? What software says the output is 70.83" x 91.67"? Please tell us what "identify -verbose" says about the "Resolution", "Print size" and "Units", of input and output.
Code: Select all
convert t.png t.pdf
To help you, we need more information. What version of IM? Exactly what (Perl?) commands did you use? What software says the output is 70.83" x 91.67"? Please tell us what "identify -verbose" says about the "Resolution", "Print size" and "Units", of input and output.
snibgo's IM pages: im.snibgo.com
Re: PNG to PDF comes out very large!
Hello:
I am working in Perl with:
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-05-26 http://www.imagemagick.org
I am not using command line like your convert example, as I work strictly in Perl.
Create new image:
Then text is added to the image using standard perl imagemagick scripting like the following:
And then output:
PNG output is the correct size 5100 x 6600 pixels
PNG size is 70.83" x 91.67" as read by Adobe Acrobat Pro DC Version 2017.009.20044
I can not respond to your other questions, as you assumed I am using the command line. I am not and have never used the command line, that is why I posted in the PerlMagick sub-forum.
I am working in Perl with:
Code: Select all
use Image::Magick;
I am not using command line like your convert example, as I work strictly in Perl.
Create new image:
Code: Select all
my $image = Image::Magick->new;
$image->Set(size=>'5100x6600');
Code: Select all
$image_next_hour_title = Image::Magick->new;
$image_next_hour_title->Set(
background => $caption_box_color,
fill => $fontcolor5,
gravity => 'west',
font => "$font4",
pointsize => 48,
size => '600x65'
);
$image_next_hour_title->Read("caption:$translations{'NextHour'}->{$language}:");
Code: Select all
$image->Composite( geometry => '+100+670', image => $image_next_24_title );
Code: Select all
$image->Write(filename => '/var/www/html/test0629/testoutput.png' );
$image->Write(filename => '/var/www/html/test0629/testoutput.pdf' );
PNG size is 70.83" x 91.67" as read by Adobe Acrobat Pro DC Version 2017.009.20044
I can not respond to your other questions, as you assumed I am using the command line. I am not and have never used the command line, that is why I posted in the PerlMagick sub-forum.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PNG to PDF comes out very large!
I can't see where you set the density (resolution) to 600 dpi.
You can check the resolution and physical size of the PNG with exiftool or Gimp and probably with PerlMagick.
Perhaps you mean "PDF size is ..." If that really is the PNG size, then that's why the PDF is that size.johnfl68 wrote:PNG size is 70.83" x 91.67" as read by Adobe Acrobat Pro DC Version 2017.009.20044
You can check the resolution and physical size of the PNG with exiftool or Gimp and probably with PerlMagick.
snibgo's IM pages: im.snibgo.com