Code: Select all
'convert -density 240x240 -compress Group4 -scene 15 test.pdf testp%04d.tif'
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
use Image::Magick;
# Cleanup results of prior runs
unlink (glob("*.tif"));
my $image = Image::Magick->new;
my $filename = "test.pdf";
$image->Read($filename);
# Check scene for Debugging
my $p = $image->Get('scene');
print "\n\nScene1: $p\n";
#Set scene number to desired starting page
$image->Set(scene=>15);
# Check scene for Debugging again
$p = $image->Get('scene');
print "Scene2: $p\n\n";
# Write the files.
$image->Write(filename=>"testp%04d.tif",
compression=>'Group4',
density=>"240x240");
I've also tried the following variants:
Variant 1:
Code: Select all
$image->Read($filename);
$image->[0]->Set(scene=>15);
$image->Write(filename=>"testp%04d.tif",
compression=>'Group4',
density=>"240x240");
Code: Select all
$image->Read($filename);
$image->Write(filename=>"testp%04d.tif",
compression=>'Group4',
density=>"240x240",
scene=>15);
Variant 3:
Code: Select all
$image->Read($filename);
$image->Write(scene=>15,
filename=>"testp%04d.tif",
compression=>'Group4',
density=>"240x240");