I try to convert a multiple page PDF (4 pages) in single PNG files.
Code: Select all
my $var_src = shift; # PDF Path
my $var_dst = shift; # PNG Path
my $var_res = shift || "72";
my $var_image = Image::Magick->new;
$status = $var_image->Read($var_src);
$status = $var_image->Set(density=>"$var_res");
$status = $var_image->Set(units=>'PixelsPerInch');
$status = $var_image->Write($var_dst);
undef $var_image;
- 489823-0.png
489823-1.png
489823-2.png
489823-3.png
Is there any option to limit the number of output images an change the output filenames with PerlMagick?