save in memory as searchable pdf

Discussions about Tesseract OCR integration in GdPicture.
Post Reply
epastor
Posts: 3
Joined: Fri Mar 16, 2012 3:11 pm

save in memory as searchable pdf

Post by epastor » Mon Jul 21, 2014 11:43 am

I'm scanning a document (single or multipage).
I need save it in memory as searchable pdf.

'acquires image from scanner
gdpi_ima = pGdPicture.TwainAcquireToGdPictureImage(Handle)
.....
.....
'save page as byte array (without ocr)
pGdPicture.SaveAsByteArray(ImageID, b, b_read, GdPicture10.DocumentFormat.DocumentFormatTIFF, cCompresionTIFF)


How can i save it in MEMORY as a searchable pdf??
I need it with ocr.

thanks in advance

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: save in memory as searchable pdf

Post by SamiKharma » Sun Aug 03, 2014 11:04 am

Hi,

You need to:
1. create a GdPicturePDF object using GdPicturePDF.New()
2. Add your images one by one to the GdPicturePDF you created (please see Tiff to PDF sample demo for the code).
3. Finally, you can save the resulting PDF to memory using any of the SaveToStream overloads of the GdPicturePDF instance.

I hope this helps,
Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests