Package Details: pdfsandwich 0.1.7-1

Git Clone URL: https://aur.archlinux.org/pdfsandwich.git (read-only, click to copy)
Package Base: pdfsandwich
Description: Wrapper for tesseract OCR and hocr2pdf to generate pdf files with the recognized text put behind the image (sandwich pdfs).
Upstream URL: http://sourceforge.net/projects/pdfsandwich/
Licenses: GPL2
Submitter: petRUShka
Maintainer: petRUShka (whnr)
Last Packager: whnr
Votes: 16
Popularity: 0.000006
First Submitted: 2016-11-17 16:52 (UTC)
Last Updated: 2018-09-23 15:00 (UTC)

Dependencies (7)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

allexj commented on 2022-05-07 08:46 (UTC)

If you have the error:

I/O Error: Couldn't open file '/tmp/pdfsandwich_tmpcaa21c/pdfsandwich2ca1bb.pdf': Too many open files. Syntax Error: Could not merge damaged documents ('/tmp/pdfsandwich_tmpcaa21c/pdfsandwich2ca1bb.pdf')

during pdfunite command, you have to increase the max number of open files. It's easy.

More info here: https://www.mariogiannini.com/2018/11/03/too-many-files-open/ or https://unix.stackexchange.com/questions/85457/how-to-circumvent-too-many-open-files-in-debian or https://subvisual.com/blog/posts/2020-06-06-fixing-too-many-open-files

whnr commented on 2022-04-16 14:12 (UTC) (edited on 2022-04-16 14:15 (UTC) by whnr)

Yes! Something is broken with unpaper. If you already have decent scanned input, you can convert it by skipping that component with the -nopreproc option.

If this functionality is needed you can try this workaround: https://github.com/Ra-Na/pdfsandwich-without-unpaper

Danyright commented on 2022-04-13 14:15 (UTC) (edited on 2022-04-13 14:15 (UTC) by Danyright)

With a recent system update I did, pdfsandwich now generates an (almost) completely black PDF. I tested with multiple pdf files with multiple images as source, but I can't get it to work properly. I tested on two different computers with similar issues.

Anyone experiencing the same problems? Does anyone have a solution ?

Thanks for the help, D

petRUShka commented on 2018-09-21 09:19 (UTC)

Please welcome whnr as our new maintainer.

Thanks to all for your help and notices!

whnr commented on 2018-09-19 17:07 (UTC) (edited on 2018-09-19 17:10 (UTC) by whnr)

Here is a patch to update the PKGBUILD to 0.1.7. Ghostscript is now optional. I'll also email petRUShka directly.

commit 19a72a0823aa97f18335c63cd456b549fbeb4c49
Author: Florian Wehner <florian@whnr.de>
Date:   Wed Sep 19 09:56:00 2018 +0200

    Upgraded to 0.1.7. Ghostscript now optional

diff --git a/.SRCINFO b/.SRCINFO
index [`41c5559`](https://aur.archlinux.org/cgit/aur.git/commit/?h=pdfsandwich&id=41c5559)..24c9963 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = pdfsandwich
    pkgdesc = Wrapper for tesseract OCR and hocr2pdf to generate pdf files with the recognized text put behind the image (sandwich pdfs).
-   pkgver = 0.1.6
+   pkgver = 0.1.7
    pkgrel = 1
    url = <http://sourceforge.net/projects/pdfsandwich/>
    arch = x86_64
@@ -10,12 +10,12 @@ pkgbase = pdfsandwich
    makedepends = gawk
    depends = tesseract
    depends = exact-image
-   depends = ghostscript
    depends = unpaper
    depends = imagemagick
    depends = poppler
-   source = <http://downloads.sourceforge.net/sourceforge/pdfsandwich/pdfsandwich-0.1.6.tar.bz2>
-   sha512sums = fa122bb2cac678555a7abe9b3c720baf608197d60593b8fdaaf7009837228b30d5ab74fac1c51c68e0e75ae155b0a774077745e5eb157b951c634529fe6146f9
+   optdepends = ghostscript: Ghostscript is only needed for resizing pdf pages, if the respective command line option is given.
+   source = <http://downloads.sourceforge.net/sourceforge/pdfsandwich/pdfsandwich-0.1.7.tar.bz2>
+   sha512sums = ac315aeba2cc753fddc380e2522d0c41d65ea80372a23c2cd5371ebc239ac104ab5a5a1386378b9e026b2935a767128224f7617a5eb8f5ef9d6874cc18ef83ff

 pkgname = pdfsandwich

diff --git a/PKGBUILD b/PKGBUILD
index [`41c4615`](https://aur.archlinux.org/cgit/aur.git/commit/?h=pdfsandwich&id=41c4615)..d6cf2cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,19 @@
 # Maintainer: petRUShka petrushkin at yandex dot ru
 # Contributor: Max Roder <maxroder@web.de>
+# COntributor: Florian Wehner <florian@whnr.de>

 pkgname=pdfsandwich
-pkgver=0.1.6
+pkgver=0.1.7
 pkgrel=1
 pkgdesc="Wrapper for tesseract OCR and hocr2pdf to generate pdf files with the recognized text put behind the image (sandwich pdfs)."
 url="<http://sourceforge.net/projects/pdfsandwich/>"
 arch=('x86_64' 'i686')
 license=('GPL2')
-depends=('tesseract' 'exact-image' 'ghostscript' 'unpaper' 'imagemagick' 'poppler')
+depends=('tesseract' 'exact-image' 'unpaper' 'imagemagick' 'poppler')
+optdepends=('ghostscript: Ghostscript is only needed for resizing pdf pages, if the respective command line option is given.')
 makedepends=('ocaml' 'gawk')
 source=("<http://downloads.sourceforge.net/sourceforge/>${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-sha512sums=('fa122bb2cac678555a7abe9b3c720baf608197d60593b8fdaaf7009837228b30d5ab74fac1c51c68e0e75ae155b0a774077745e5eb157b951c634529fe6146f9')
+sha512sums=('ac315aeba2cc753fddc380e2522d0c41d65ea80372a23c2cd5371ebc239ac104ab5a5a1386378b9e026b2935a767128224f7617a5eb8f5ef9d6874cc18ef83ff')

 build() {
    cd "${srcdir}/${pkgname}-${pkgver}"

Maxr commented on 2018-08-14 10:28 (UTC)

Now it is, 0.1.7 was just released, see https://sourceforge.net/projects/pdfsandwich/files/

benoliver999 commented on 2018-02-12 16:43 (UTC)

I agree, this package is not out of date.

seifferth commented on 2018-01-28 00:16 (UTC)

HaoZeke: I encountered the same error when building exact-image. Note however, that this error occurs when compiling exact-image, not when compiling pdfsandwich. Out of curiosity I modified the PKGBUILD and simply removed the exact-image dependency, which caused pdfsandwich to build, install and (preliminary testing suggests) also work without problems.

Which leads to the following question: Why is exact-image included as a dependency? Since it doesn't seem to be vital I'd suggest to rather include it as an optional dependency:

optdepends=('exact-image')

That way the problems exact-image is having wouldn't directly effect this package.

Also: From what I can see this package is up to date with upstream, so it shouldn't be flagged out of date.

Best Regards and thanks to petRUShka for the package.

HaoZeke commented on 2018-01-18 17:30 (UTC)

Somehow broken currently..

Log:

error: ‘imageDrawText’ was not declared in this scope
     imageDrawText(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
     ^~~~~~~~~~~~~
objdir/api/perl/api-perl-wrap.cc:6262:5: note: suggested alternative: ‘imageDrawLine’
     imageDrawText(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
     ^~~~~~~~~~~~~
     imageDrawLine
objdir/api/perl/api-perl-wrap.cc: In function ‘void _wrap_imageDrawText__SWIG_1(PerlInterpreter*, CV*)’:
objdir/api/perl/api-perl-wrap.cc:6332:5: error: ‘imageDrawText’ was not declared in this scope
     imageDrawText(arg1,arg2,arg3,arg4,arg5);
     ^~~~~~~~~~~~~
objdir/api/perl/api-perl-wrap.cc:6332:5: note: suggested alternative: ‘imageDrawLine’
     imageDrawText(arg1,arg2,arg3,arg4,arg5);
     ^~~~~~~~~~~~~
     imageDrawLine
objdir/api/perl/api-perl-wrap.cc: In function ‘void _wrap_imageDrawTextOnPath__SWIG_0(PerlInterpreter*, CV*)’:
objdir/api/perl/api-perl-wrap.cc:6547:5: error: ‘imageDrawTextOnPath’ was not declared in this scope
     imageDrawTextOnPath(arg1,arg2,arg3,arg4,(char const *)arg5);
     ^~~~~~~~~~~~~~~~~~~
objdir/api/perl/api-perl-wrap.cc:6547:5: note: suggested alternative: ‘imageDrawRectangle’
     imageDrawTextOnPath(arg1,arg2,arg3,arg4,(char const *)arg5);
     ^~~~~~~~~~~~~~~~~~~
     imageDrawRectangle
objdir/api/perl/api-perl-wrap.cc: In function ‘void _wrap_imageDrawTextOnPath__SWIG_1(PerlInterpreter*, CV*)’:
objdir/api/perl/api-perl-wrap.cc:6607:5: error: ‘imageDrawTextOnPath’ was not declared in this scope
     imageDrawTextOnPath(arg1,arg2,arg3,arg4);
     ^~~~~~~~~~~~~~~~~~~
objdir/api/perl/api-perl-wrap.cc:6607:5: note: suggested alternative: ‘imageDrawRectangle’
     imageDrawTextOnPath(arg1,arg2,arg3,arg4);
     ^~~~~~~~~~~~~~~~~~~
     imageDrawRectangle
make: *** [build/bottom.make:76: objdir/api/perl/ExactImage.so] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
:: Unable to build exact-image - makepkg exited with code: 2

petRUShka commented on 2017-03-09 18:36 (UTC)

Upgraded