Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, October 10, 2010 11:09:12 PM(UTC)

datamex  
datamex

Groups: Registered
Posts: 9


Hi,

I have a pdf file and i want to write a number to it. I can't find how to do this. I'm using V17.

thanks for helping!
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, October 11, 2010 5:32:33 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

This depends on how exactly do you want the result PDF. Do you want it to be searchable PDF or Raster PDF?

In general, there are at least 2 ways to do it:
1) Draw the text on an image and save it as raster (bitmap image) PDF using our PDF plug-in.
2) Create a document page and have the text saved in PDF format as searchable text using our Document Writer.

The details of this depend on the programming interface you are using. Which LEADTOOLS programming interface (Main OCX, .NET classes, DLL API, C++ Classes, etc.) are you using?
 
#3 Posted : Thursday, October 14, 2010 10:47:54 PM(UTC)

datamex  
datamex

Groups: Registered
Posts: 9


Sorry for my late reaction. Im using C# .NET. What i want to do is the following thing:

Open the image pdf file (from a scan), add text to it (just a simple number to recognize the PDF afterwards) and save it as searchable PDF.
 
#4 Posted : Sunday, October 17, 2010 3:58:36 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

The best approach would be to load the PDF using our PDF read plug-in into a RasterImage, draw the text on the RasterImage using .NET Graphics methods (such as Graphics.DrawString), perform Optical Character Recognition (OCR) on the loaded image using our OCR Module, and then save the recognition result as searchable PDF using our DocumentWriter features.
To get you started, download the main free evaluation version of LEADTOOLS toolkits from our website, and check the OCR Main Demo from the following start menu item:

LEADTOOLS 17 =>.NET Class Libraries => .NET Framework => 02 Document => 03 OCR - ICR - OMR => 01 Main Demo
 
#5 Posted : Sunday, October 17, 2010 9:43:43 PM(UTC)

datamex  
datamex

Groups: Registered
Posts: 9


We already bought the leadtools toolkit. But I can't find how to draw a string on a RasterImage. How should I create a graphics object from the RasterImage?
 
#6 Posted : Monday, October 18, 2010 5:41:21 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

Regarding drawing text on a RasterImage, you can check the code in the following forum post:
http://support.leadtools.com/SupportPortal/CS/forums/3432/ShowPost.aspx#3432

I want to clarify one thing about your requirements. Do you want the text in the scanned image (PDF) to be recognized so both the new added text and the original image are searchable, or do you only want the added text to be searchable?

 
#7 Posted : Monday, October 18, 2010 6:07:09 AM(UTC)

datamex  
datamex

Groups: Registered
Posts: 9


Hi!

I tried this, but i dont have the CreateGdiPlusGraphics() on my rasterimage object. Which dll contains this function, cause maybe i'm just missing some references?

I want the whole text of the pdf to be searchable. I've found how to do this, the only thing im facing is that sometimes (not even always) I'm getting an exception on the "ocrDocument.Pages.AutoZone" function. I can't handle this error (it's in a try catch block) and the process just gets killed.

Thanks for your help!
 
#8 Posted : Tuesday, October 19, 2010 5:44:31 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

What is the build number (file version info) of the Leadtools.dll and Leadtools.Winforms.dll?

Regarding the exception with AutoZone function, please create a separate forum thread or send an email to support@leadtools.com regarding this issue and provide more details.
 
#9 Posted : Tuesday, October 19, 2010 5:52:14 AM(UTC)

datamex  
datamex

Groups: Registered
Posts: 9


the file version info is 17.0.0.10 for Leadtools.dll and 17.0.0.3 for Leadtools.Winforms.dll
 
#10 Posted : Wednesday, October 20, 2010 2:24:55 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

The sample in the forum post is for older LEADTOOLS version. The rest of the code should be similar but in LEADTOOLS version 17, the RasterImage.CreateGdiPlusGraphics method has been replaced with the Leadtools.Drawing.RasterImageGdiPlusGraphicsContainer(RasterImage) method.
Please see the following help topics:
- 'RasterImageGdiPlusGraphicsContainer Class'
- 'Leadtools Assembly Changes'
 
#11 Posted : Wednesday, October 20, 2010 2:49:21 AM(UTC)

datamex  
datamex

Groups: Registered
Posts: 9


That was the method i was searching for. It works fine now. Thanks for your help!
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.215 seconds.