VB Code to Find/Replace text in a PDF
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
VB Code to Find/Replace text in a PDF
What I suggest is:
1) Download the CoreAPI application and see the samples presented there (especially content ones) as the CoreAPI is the inside part of the EditorSDK
2) Download the FullDemo application and try adding menu items (plenty info on forums for those tasks) and try using content operations - for adding and removing it.
3) The easiest way of doing that task would be:
a) Finding the text on the Core level
b) Finding the content items that hold all of that text
c) Saving the coordinates and style of that text
d) Remove that text entirely
e) Add new text
The attached zipped vb code, I believe gets me as far as step c)? Unfortunately, on running the following line of code, I get the attached error messsage.
Set res = objContent.Items.Item(i).Text_SetDataSA(retv2, ts)
Now it may be a limitation of VB or that I have completely misunderstood how to replace text and the code is nonsense!
Some guidance would be very much appreciated.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: VB Code to Find/Replace text in a PDF
Hello drtn,
Here's a C# sample that I have on the method that also uses Safe Array (SA):
Cheers,
Alex
Here's a C# sample that I have on the method that also uses Safe Array (SA):
Code: Select all
IPXC_ContentItem item = content.Items[i];
if (item.Type != PXC_CIType.CIT_Path)
continue;
Array aCmds, aPts;
item.Path_GetDataSA(out aCmds, out aPts);
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ