Subject | Re: AW: [IBO] Re: Storing PDF into Firebird Blobs |
---|---|
Author | Geoff Worboys |
Post date | 2012-05-23T03:20:02Z |
Terry Black wrote:
deal with the PDFs internally to your application. A quick
Google shows this option: http://www.quickpdflibrary.com/
that includes a Delphi library. (I've never used it, I don't
know how good it is or anything like that - you may want to hunt
more widely there may be better options.) It is not clear
from their site whether they allow reading directly from memory
or whether you would have to save to file, but the point is
that even if you have to save to a temporary file, you remain
in control of the viewer and so know when it goes away and so
can remove the temporary file when it's done.
Another option you may want to consider... IF you are not
attempting to OCR the scanned documents - if they are really
just images inside a PDF - then why not save them as images?
Using database features you could see implement multi-page
support via JPG, or you could save in PNG or other format
that supports multi-page directly. Cut out the middle man
and be able to display the pages directly using built-in
components.
I realise that there are practicalities here: most scanners
offer easy to-PDF scanning, but many also offer scanning to
images. Even if you ended up scanning to multi-page TIFF
you could soon automate conversion to compressed image via
something like ImageMagick (or even batch features of
Irfanview or similar).
It's obvious you've already gone through lots of this sort
of thing for yourself, just offering some ideas that I've
considered in the past.
--
Geoff Worboys
Telesis Computing Pty Ltd
> One of the applications I am looking at is to scan in as PDFsFor this sort of thing I would be seriously looking at a way to
> just about everything I can get my hands on at home as I can
> never find anything. For this application I would like to try
> having the PDF contents inside the database inside a blob.
> The PDFs are very small usually one page and I think that the
> table size will be managable (I hope).
deal with the PDFs internally to your application. A quick
Google shows this option: http://www.quickpdflibrary.com/
that includes a Delphi library. (I've never used it, I don't
know how good it is or anything like that - you may want to hunt
more widely there may be better options.) It is not clear
from their site whether they allow reading directly from memory
or whether you would have to save to file, but the point is
that even if you have to save to a temporary file, you remain
in control of the viewer and so know when it goes away and so
can remove the temporary file when it's done.
Another option you may want to consider... IF you are not
attempting to OCR the scanned documents - if they are really
just images inside a PDF - then why not save them as images?
Using database features you could see implement multi-page
support via JPG, or you could save in PNG or other format
that supports multi-page directly. Cut out the middle man
and be able to display the pages directly using built-in
components.
I realise that there are practicalities here: most scanners
offer easy to-PDF scanning, but many also offer scanning to
images. Even if you ended up scanning to multi-page TIFF
you could soon automate conversion to compressed image via
something like ImageMagick (or even batch features of
Irfanview or similar).
It's obvious you've already gone through lots of this sort
of thing for yourself, just offering some ideas that I've
considered in the past.
--
Geoff Worboys
Telesis Computing Pty Ltd