Thanks for the report. This fixes things for me. I'll release it next week.
Regards Jeff
diff --git a/bin/gscan2pdf b/bin/gscan2pdf
index f2e8d492..d81a12d3 100755
--- a/bin/gscan2pdf
+++ b/bin/gscan2pdf
@@ -2757,6 +2757,7 @@ sub save_button_clicked_callback {
}
when ('ps') {
$SETTING{ps_backend} = $windowi->get('ps-backend');
+ $logger->info("Selected '$SETTING{ps_backend}' as ps backend");
# cd back to cwd to save
chdir $SETTING{cwd};
diff --git a/lib/Gscan2pdf/Dialog/Save.pm b/lib/Gscan2pdf/Dialog/Save.pm
index 5ae26a31..c72cdb0d 100644
--- a/lib/Gscan2pdf/Dialog/Save.pm
+++ b/lib/Gscan2pdf/Dialog/Save.pm
@@ -580,7 +580,18 @@ sub add_image_type {
my @ps_backend =
@{ filter_table( \@backends, @{ $self->get('ps-backends') } ) };
my $combops = Gscan2pdf::ComboBoxText->new_from_array(@ps_backend);
- $combops->set_active_index( $self->get('ps-backend') );
+ $combops->signal_connect(
+ changed => sub {
+ my $ps_backend = $combops->get_active_index;
+ $self->set( 'ps-backend', $ps_backend );
+ }
+ );
+
+ # FIXME: this is defaulting to undef, despite the default being defined in
+ # the subclassing call
+ my $ps_backend = $self->get('ps-backend');
+ if ( not defined $ps_backend ) { $ps_backend = 'pdftops' }
+ $combops->set_active_index($ps_backend);
$hboxps->pack_end( $combops, TRUE, TRUE, 0 );
my @tiff_compression = (
diff --git a/lib/Gscan2pdf/Document.pm b/lib/Gscan2pdf/Document.pm
index 515c5164..47093ef2 100644
--- a/lib/Gscan2pdf/Document.pm
+++ b/lib/Gscan2pdf/Document.pm
@@ -3297,13 +3297,13 @@ sub _thread_save_pdf {
_thread_throw_error(
$self, $options{uuid}, $options{page}{uuid},
'Save file', sprintf __('Caught error creating PDF %s: %s'),
- $filename, $_
+ $filename, $_
);
$error = TRUE;
};
if ($error) { return 1 }
- if ( defined $options{metadata} ) {
+ if ( defined $options{metadata} and not defined $options{options}{ps} ) {
my $metadata = prepare_output_metadata( 'PDF', $options{metadata} );
$pdf->info( %{$metadata} );
}
@@ -3357,8 +3357,9 @@ sub _thread_save_pdf {
return if _encrypt_pdf( $self, $filename, %options );
}
- if ( defined $options{options}{set_timestamp}
- and $options{options}{set_timestamp} )
+ if ( defined $options{options}{set_timestamp}
+ and $options{options}{set_timestamp}
+ and not defined $options{options}{ps} )
{
_set_timestamp( $self, $filename, $options{uuid},
%{ $options{metadata} } );
@@ -4183,16 +4184,10 @@ sub _thread_save_tiff {
}
if ( defined $options{options}{ps} ) {
$self->{message} = __('Converting to PS');
-
- # Note: -a option causes tiff2ps to generate multiple output
- # pages, one for each page in the input TIFF file. Without it, it
- # only generates output for the first page.
- @cmd =
- ( 'tiff2ps', '-a', $options{path}, '-O', $options{options}{ps} );
+ @cmd = ( 'tiff2ps', '-1', $options{path}, '-O', $options{options}{ps} );
( $status, undef, $error ) = exec_command( \@cmd, $options{pidfile} );
if ( $status or $error ) {
$logger->info($error);
#########################
--
2.26.2
signature.asc
Description: OpenPGP digital signature

