Question:I would like to parse a given PDF and add a circle when I find a certain text occurrence. Highlighting would be even better. I read it is not possible with iTextSharp. So I want to know that is there a solution on VeryPDF? Do you know any library I could use ?
Answer: According to your needs, maybe you can have a free trial of software VeryPDF PDF Editor Toolkit, by which you can highlight PDF, add circle to PDF, merge PDF and split PDF. And this is software toolkit, you can call it together with programming languages like C++, VB, Delphi, ASP, and .NET. And when you finish editing, by this software, you can also protect created PDF with 48 or 128-bit encryption. It supports both user password and owner password. Please check more related information of this software on homepage, in the following part, let us check how to use this software.
- There are two version of this software, normal version and professional version. Here I will take the professional version for example. By the professional version, you can add stamp to PDF, encrypt existing PDF, remove owner password of PDF and others.
- When downloading finishes, there will be a zip file. Please extract it to some folder then you can check code template, help documents and others.
Step 2. Mark PDF
- When you need to or highlight PDF, please refer to the following parameter introduction and usage.
long VeryAddCircle(very_id id, long sx, long sy, long radius, long side_width, long side_color,
long flagFill, long fill_color)
Description –> Draw a circle.
Parameters –> Id
Returned by VeryCreate or VeryOpen function.
sx --> Start x-coordinate.
sy—> Start y-coordinate.
radius –>Specify the radius of the circle.
side_width—>Specifies the line width in pixel.
Side_color—> Specifies the color of the text as an RGB color value.
flagFIll—> Whether fill this rectangle or not.
fill_color—>The color used to fill the rectangle, in RGB format.
Nonzero if it is successful; otherwise, it is zero
And when you need to encrypt PDF, this toolkit also can help you. Please refer to the following information:
long WINAPI VeryEncryptPDF(const char * inFileName, const char *outFileName, long EnctyptLen, long permission, const char *OwnerPassword, const char *UserPassword)
Input pdf filename
Output pdf filename
The encryption level, MUST equal 40 or 128
Set permission to a pdf document; include printing, copying and
changing and enable form fields.
0: no printing, no copying and no changing
4: allow printing
16: allow copying
8: allow changing
32: allow AcroFormFields
For example, if you want allow printing, copying and changing, the
permission value should be 4+16+8 = 28