Your message dated Sun, 05 Feb 2012 22:03:19 +0000
with message-id <[email protected]>
and subject line Bug#646298: fixed in gscan2pdf 1.0.1-1
has caused the Debian Bug report #646298,
regarding [gscan2pdf] pdf-exports of ocropus texts are slow, big, have a big 
unalloc problem
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
646298: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646298
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gscan2pdf
Version: 1.0.0-1
Severity: important
Tags: patch

when you try to export a ocropus ocr-text into a pdf
the result is a very slow export, very large document,
very large memory consumption during and after the export.

That's because fonts are added multiple times to the document.
:-(

Just add the fonts only one time at the beginning of the
export like the added patch. Improves 50 page doc
speed 30 times, size more than 10 times, no noticeable
memory problem (but I guess still existing).

--- /usr/share/perl5/Gscan2pdf.pm  2011-08-27 07:00:41.000000000 +0200
+++ /usr/share/perl5/Gscan2pdf.pm  2011-10-22 23:56:43.420286711 +0200
@@ -434,11 +434,15 @@
  my ( $self, $path, $list_of_pages, $metadata, $options, $pidfile ) = @_;
 
  my $page = 0;
+ my %fonthash = ();
 
  # Create PDF with PDF::API2
  $self->{message} = $d->get('Setting up PDF');
  my $pdf = PDF::API2->new( -file => $path );
  $pdf->info($metadata) if defined($metadata);
+ 
+ $fonthash{ $options->{font} } = $pdf->ttfont( $options->{font}, -unicodemap 
=> 1 );
+ $fonthash{ 'Times-Roman' } = $pdf->corefont('Times-Roman');
 
  foreach my $pagedata ( @{$list_of_pages} ) {
   ++$page;
@@ -578,10 +582,10 @@
    for my $box ( $pagedata->boxes ) {
     my ( $x1, $y1, $x2, $y2, $txt ) = @$box;
     if ( $txt =~ /[[:^ascii:]]/ and defined( $options->{font} ) ) {
-     $font = $pdf->ttfont( $options->{font}, -unicodemap => 1 );
+     $font = $fonthash{ $options->{font} };
     }
     else {
-     $font = $pdf->corefont('Times-Roman');
+     $font = $fonthash{'Times-Roman'};
     }
     ( $x2, $y2 ) = ( $w * $resolution, $h * $resolution )
       if ( $x1 == 0 and $y1 == 0 and not defined($x2) );



--- End Message ---
--- Begin Message ---
Source: gscan2pdf
Source-Version: 1.0.1-1

We believe that the bug you reported is fixed in the latest version of
gscan2pdf, which is due to be installed in the Debian FTP archive:

gscan2pdf_1.0.1-1.diff.gz
  to main/g/gscan2pdf/gscan2pdf_1.0.1-1.diff.gz
gscan2pdf_1.0.1-1.dsc
  to main/g/gscan2pdf/gscan2pdf_1.0.1-1.dsc
gscan2pdf_1.0.1-1_all.deb
  to main/g/gscan2pdf/gscan2pdf_1.0.1-1_all.deb
gscan2pdf_1.0.1.orig.tar.gz
  to main/g/gscan2pdf/gscan2pdf_1.0.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jeffrey Ratcliffe <[email protected]> (supplier of updated gscan2pdf package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 05 Feb 2012 22:13:28 +0100
Source: gscan2pdf
Binary: gscan2pdf
Architecture: source all
Version: 1.0.1-1
Distribution: unstable
Urgency: low
Maintainer: Jeffrey Ratcliffe <[email protected]>
Changed-By: Jeffrey Ratcliffe <[email protected]>
Description: 
 gscan2pdf  - GUI to produce PDFs or DjVus from scanned documents
Closes: 645322 645323 646246 646298 651666 653918
Changes: 
 gscan2pdf (1.0.1-1) unstable; urgency=low
 .
   * New upstream release
     Closes: #653918 (gscan2pdf doesn't save metadata anymore)
     Closes: #646298 (pdf-exports of ocropus texts are slow, big)
     Closes: #646246 (gscan2pdf ignores html-entities returned by ocropus
                      documents)
     Closes: #651666 (ability to preview saved files)
     Closes: #645322 (No lock after recovery can result in data loss)
     Closes: #645323 (Imported pages have no thumbnails)
   * Bumped standards to 3.9.2 (no changes required)
Checksums-Sha1: 
 9db05246989584b638e178d6e41d8d58c3bc171f 1232 gscan2pdf_1.0.1-1.dsc
 5abb8076123049d5a99b7d1844b7fe7aacf31928 512247 gscan2pdf_1.0.1.orig.tar.gz
 949000401c877281d18aa441ab333fb61de31a6f 182 gscan2pdf_1.0.1-1.diff.gz
 4f6d4a36caf7babe02327e206bf00c1e09fba694 393096 gscan2pdf_1.0.1-1_all.deb
Checksums-Sha256: 
 80cb392407740ac6197b1be391311454846b18099178139336196e4f84e405b3 1232 
gscan2pdf_1.0.1-1.dsc
 7aed20aba66942f391733b0466ad24fdf0ba8a6b7d3f4139bd42d2b8cb9206bf 512247 
gscan2pdf_1.0.1.orig.tar.gz
 4f4f47b37f1e9599a6a19ad12c2f0d6ae6bf4302edd157fb9294e0fec0e614e1 182 
gscan2pdf_1.0.1-1.diff.gz
 ea2dd7107c2f6b32a9f2cc735c36b3e870d2878e64eddcca7e4a7ac1897afe50 393096 
gscan2pdf_1.0.1-1_all.deb
Files: 
 2c12041e6efd36e0469ad9a124248f73 1232 utils optional gscan2pdf_1.0.1-1.dsc
 6c47db579e74290227406501b5cf240e 512247 utils optional 
gscan2pdf_1.0.1.orig.tar.gz
 c4d51f29c082e5a61104c4d94532532a 182 utils optional gscan2pdf_1.0.1-1.diff.gz
 41486298c7eb12f96d3269ea13aac65d 393096 utils optional 
gscan2pdf_1.0.1-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk8u99oACgkQVDAgnE3XzJP8owCfbLFB7YcNBhrl4YWoLShrmtvK
hagAoJILDz5F//YcT4IvNFDVFpoD+5rK
=pHsQ
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to