Sample Programm doesn't produce searchable pdf file
Sample Programm doesn't produce searchable pdf file
I tried to convert a pdf file to an pdf ocr file using the sample from GdPicture.Net "PDF to PDF-OCR".
I was able to produce a file, but the file isn't searchable for text. Do I have to modify the sample program to make it work?
Thanks for your help.
I was able to produce a file, but the file isn't searchable for text. Do I have to modify the sample program to make it work?
Thanks for your help.
Re: Sample Programm doesn't produce searchable pdf file
Hi,
Please send the resulting PDF to https://www.gdpicture.com/support/getting-support-from-our-team for investigation.
If you provided the good dictionary path, the program should works.
Kind regards,
Loïc
Please send the resulting PDF to https://www.gdpicture.com/support/getting-support-from-our-team for investigation.
If you provided the good dictionary path, the program should works.
Kind regards,
Loïc
Re: Sample Programm doesn't produce searchable pdf file
I used the standard dictionary path C:\Programme\GdPicture.NET\Redist\Commons\OCR
Re: Sample Programm doesn't produce searchable pdf file
OK. Please send the produced PDF for investigation purpose.
- ryancole11
- Posts: 21
- Joined: Fri May 21, 2010 7:19 pm
Re: Sample Programm doesn't produce searchable pdf file
Can you please keep me informed about this? I am currently trying to use that example code to turn a non-searchable PDF into an OCR'd searchable PDF, also. The example code is not producing a searchable PDF. The example code only produces a PDF/A but does not have any embedded text. I know that it is at least performing the OCR operations with the dictionary files because each page takes a couple of seconds to process. There is no need for an example PDF because this does not work for any PDF that I test it with.
I am using C# and the .NET version of GdPicture Pro and Tesseract. Here's my code:
http://dpaste.org/uLWu/
I am using C# and the .NET version of GdPicture Pro and Tesseract. Here's my code:
http://dpaste.org/uLWu/
Code: Select all
String dictionaries = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\dictionaries";
// open the new pdf in the viewer
viewer.DisplayFromFile(out_file);
for (int x = 1; x <= viewer.PageCount; x++)
{
Console.WriteLine("Performing image twain on page {0}", x);
viewer.DisplayFrame(x);
Int32 rasterized_page = viewer.GetNativeImage();
if (x == 1)
imaging.TwainPdfOCRStartEx(String.Format("{0}.ocr.pdf", out_file), "", "", "", "", "", PdfEncryption.PdfEncryptionNone, PdfRight.PdfRightCanModify);
imaging.TwainAddGdPictureImageToPdfOCR(rasterized_page, TesseractDictionary.TesseractDictionaryEnglish, dictionaries);
}
// close the twaining
imaging.TwainPdfOCRStop();
viewer.CloseImage();
Re: Sample Programm doesn't produce searchable pdf file
Hi,
Please send a standalone application reproducing the issue + input and output PDF to https://www.gdpicture.com/support/getting-support-from-our-team
Kind regards,
Loïc
Please send a standalone application reproducing the issue + input and output PDF to https://www.gdpicture.com/support/getting-support-from-our-team
Kind regards,
Loïc
- ryancole11
- Posts: 21
- Joined: Fri May 21, 2010 7:19 pm
Re: Sample Programm doesn't produce searchable pdf file
Alright, give me about 30 minutes. I'm in the middle of something, at the moment.
Who is online
Users browsing this forum: No registered users and 1 guest