PDFBeads — Convert Scanned Images to a Single PDF File
Moderator: peterZ
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Thanks!
BTW, I've posted a thread over at RubyForge (http://rubyforge.org/forum/forum.php?th ... m_id=31710) but no response thus far.
Cheers.
BTW, I've posted a thread over at RubyForge (http://rubyforge.org/forum/forum.php?th ... m_id=31710) but no response thus far.
Cheers.
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Tried adding "require 'rubygems'" to pdfbeads.rb as suggested here (http://rubyonwindows.blogspot.com/2009/ ... tchas.html). Now it doesn't complain during compilation, but the resulting .exe still doesn't work.
Note: On another machine, had to copy these DLLs first...
Any help would be appreciated.
Cheers.
Code: Select all
C:/Users/LOYUKF~1/AppData/Local/Temp/ocrE651.tmp/lib/ruby/site_ruby/1.8/rubygems
/custom_require.rb:29:in `gem_original_require': no such file to load -- imagein
spector (LoadError)
from C:/Users/LOYUKF~1/AppData/Local/Temp/ocrE651.tmp/lib/ruby/site_ruby
/1.8/rubygems/custom_require.rb:29:in `require'
from C:/Users/LOYUKF~1/AppData/Local/Temp/ocrE651.tmp/lib/ruby/gems/1.8/
gems/PDFBEA~1.3-C/lib/pdfbeads.rb:88
Code: Select all
CORE_RL_bzlib_.dll
CORE_RL_lcms_.dll
CORE_RL_magick_.dll
CORE_RL_ttf_.dll
CORE_RL_zlib_.dll
X11.dll
Cheers.
Last edited by loyukfai on 05 Jul 2011, 05:57, edited 1 time in total.
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Tried another executable maker - exerb (http://exerb.sourceforge.jp/index.en.html)
Unfortunately, the .exe wouldn't run at all and complains...
Google searches on the above give some results, but mostly in Japanese.
Also tried this, exerb-mingw (http://vert.igino.us/2011/01/05/exerb-1 ... with-ruby/), which managed to build an executable that runs and doesn't complain. However, the resulting pdf is 0-byte. (BTW, libiconv2.dll is required)
Cheers.
Unfortunately, the .exe wouldn't run at all and complains...
Code: Select all
rbconfig.rb:7: ruby lib version (1.8.7) doesn't match executable version (1.8.6)
(RuntimeError)
Also tried this, exerb-mingw (http://vert.igino.us/2011/01/05/exerb-1 ... with-ruby/), which managed to build an executable that runs and doesn't complain. However, the resulting pdf is 0-byte. (BTW, libiconv2.dll is required)
Cheers.
Re: PDFBeads — Convert Scanned Images to a Single PDF File
The "no such file to load" error is making me wonder - do you have ImageMagick set up on the system on which you're trying to run this on? The Windows version of RMagick distributed on their website includes an ImageMagick installer, and they suggest using that specific version of it.
exerb 4.2.0 uses Ruby 1.8.6. The compiled version of RMagick is also built for 1.8.6. What is the version of Ruby you have installed? 1.8.7? If so, you should remove it and install 1.8.6 from the installer at the RubyInstaller site.
While I understand you prefer portable apps, all this trouble you're going to is making me wonder whether it would just be easier to install the appropriate software on the computer you want to use it on. The Ruby installation is very lightweight on Windows; it all goes in one folder.
exerb 4.2.0 uses Ruby 1.8.6. The compiled version of RMagick is also built for 1.8.6. What is the version of Ruby you have installed? 1.8.7? If so, you should remove it and install 1.8.6 from the installer at the RubyInstaller site.
While I understand you prefer portable apps, all this trouble you're going to is making me wonder whether it would just be easier to install the appropriate software on the computer you want to use it on. The Ruby installation is very lightweight on Windows; it all goes in one folder.
The opinions expressed in this post are my own and do not necessarily represent those of the Canadian Museum for Human Rights.
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Sure, or else how did PDFBeads successfully run on it.Misty wrote:The "no such file to load" error is making me wonder - do you have ImageMagick set up on the system on which you're trying to run this on? The Windows version of RMagick distributed on their website includes an ImageMagick installer, and they suggest using that specific version of it.
I did manage to build an executable with exerb without that error, but that executable doesn't work at all.Misty wrote:exerb 4.2.0 uses Ruby 1.8.6. The compiled version of RMagick is also built for 1.8.6. What is the version of Ruby you have installed? 1.8.7? If so, you should remove it and install 1.8.6 from the installer at the RubyInstaller site.
Tinkering with another's PC is a tricky issue, you know...Misty wrote:While I understand you prefer portable apps, all this trouble you're going to is making me wonder whether it would just be easier to install the appropriate software on the computer you want to use it on. The Ruby installation is very lightweight on Windows; it all goes in one folder.
-
- Posts: 11
- Joined: 18 Jun 2011, 21:47
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Did you deleted the formula because I'm getting an error:Misty wrote: Edit: Just found a trick I was not familiar with. To install jbig2enc without waiting for Homebrew to officially add it, use the following command:Code: Select all
brew install https://raw.github.com/mistydemeo/homebrew/0c3427ee1e9be6aaaed5a15f8d0d6e63d610d2f1/Library/Formula/jbig2enc.rb
Code: Select all
curl: (22) The requested URL returned error: 404
Error: Failure while executing: /usr/bin/curl -f#LA Homebrew\ 0.8\ (Ruby\ 1.8.7-249;\ Mac\ OS\ X\ 10.7) https://raw.github.com/mistydemeo/homebrew/0c3427ee1e9be6aaaed5a15f8d0d6e63d610d2f1/Library/Formula/jbig2enc.rb -o /Users/tristank/Library/Caches/Homebrew/Formula/jbig2enc.rb
https://raw.github.com/mistydemeo/homeb ... big2enc.rb
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Sorry about that. I didn't realize that commit went away. I'll update the URL.
jbig2enc is still pending in Homebrew, but hopefully will make it in sometime.
jbig2enc is still pending in Homebrew, but hopefully will make it in sometime.
The opinions expressed in this post are my own and do not necessarily represent those of the Canadian Museum for Human Rights.
-
- Posts: 6
- Joined: 28 Apr 2011, 04:39
Re: PDFBeads — Convert Scanned Images to a Single PDF File
I'm looking for an open source, free or cheapware way to do this, so I can appreciate the importance of this program, but I have to say, I don't really get how this is done. I downloaded and installed most of the programs (I think), but not being familiar with Ruby and being on a windows machine, I don't really understand what one is meant to do. Maybe I missed something?
Anyway, I wish success for the person trying to make an .exe! Or maybe I'll have to just break down and buy adobe acrobat pro...
Anyway, I wish success for the person trying to make an .exe! Or maybe I'll have to just break down and buy adobe acrobat pro...
-
- Posts: 11
- Joined: 18 Jun 2011, 21:47
Re: PDFBeads — Convert Scanned Images to a Single PDF File
I think I've discovered some kind of bug in pdfbeads. I tested it under Mac OS X Lion (10.7.0) and Ubuntu 10.4 LTS with the same errors. Basically I tried to convert the 156 tif-files of a ScanTailor output into a single hocr pdf. I think it must have something to do with the quantity of the tif-files, because when I run pdfbeads on a single file it works.
The Script:
Mac OS X:
Ubuntu:
The Script:
Code: Select all
#! /bin/bash
for i in *tif; do tesseract $i $i -l deu hocr; done
echo Tesseract done
for i in *.tif.html; do mv "$i" "`basename $i .tif.html`.html"; done
echo file-renaming done
pdfbeads -b JP2 *.tif > out_pdfbeads.pdf
Code: Select all
/Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:399:in `initialize': wrong number of arguments (1 for 2) (ArgumentError)
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:430:in `[]'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:430:in `getEncoding'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:429:in `each'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:429:in `getEncoding'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:515:in `addFont'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:302:in `process'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:301:in `each'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:301:in `process'
from /Library/Ruby/Gems/1.8/gems/pdfbeads-1.0.3/bin/pdfbeads:198
from /usr/bin/pdfbeads:19:in `load'
from /usr/bin/pdfbeads:19
Code: Select all
/var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:400:in `sprintf': can't convert nil into Integer (TypeError)
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:400:in `block in initialize'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:430:in `[]'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:430:in `block in getEncoding'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:429:in `each'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdffont.rb:429:in `getEncoding'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:515:in `addFont'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:302:in `block in process'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:301:in `each'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/lib/pdfbeads/pdfbuilder.rb:301:in `process'
from /var/lib/gems/1.9.1/gems/pdfbeads-1.0.3/bin/pdfbeads:198:in `<top (required)>'
from /var/lib/gems/1.9.1/bin/pdfbeads:19:in `load'
from /var/lib/gems/1.9.1/bin/pdfbeads:19:in `<main>'
Re: PDFBeads — Convert Scanned Images to a Single PDF File
Can you tell me what steps you've done so far?lorenzodow wrote:I'm looking for an open source, free or cheapware way to do this, so I can appreciate the importance of this program, but I have to say, I don't really get how this is done. I downloaded and installed most of the programs (I think), but not being familiar with Ruby and being on a windows machine, I don't really understand what one is meant to do. Maybe I missed something?
Anyway, I wish success for the person trying to make an .exe! Or maybe I'll have to just break down and buy adobe acrobat pro...
Yeah, it seems to be a lot harder to get running on Windows. I'm working on a solution to make it a lot easier on everyone, but no ETA at this time.
La_Tristesse: Hmmm, that def. looks like a bug in PDFBeads. Lazy_Kent, any ideas?
The opinions expressed in this post are my own and do not necessarily represent those of the Canadian Museum for Human Rights.