Programmatically modify stamp collection

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
dougk@bbsoft.com.au
User
Posts: 2
Joined: Thu Jan 01, 1970 12:00 am

Programmatically modify stamp collection

Post by dougk@bbsoft.com.au »

Is it possible to perform the following programmatically from a c# application:
1) Add a new PDF file (which has the stamp) to a custom stamp collection
2) Replace an existing PDF file (which has a replacement stamp) to the same stamp collection

The reason I am trying to replace the stamp is that information on it has to change each time.
I can recreate the PDF stamp with this changed information (date, unique number, etc.) and utilise this as the stamp.

Any sample code would be greatly appreciated.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Programmatically modify stamp collection

Post by Vasyl-Tracker Dev Team »

Hi,

I'm afraid but you have no possibility to manage programmatically the stamp collections using our Viewer SDK. Such features are available for you in our new Editor SDK only.

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
dougk@bbsoft.com.au
User
Posts: 2
Joined: Thu Jan 01, 1970 12:00 am

Re: Programmatically modify stamp collection

Post by dougk@bbsoft.com.au »

Okay. Would you have any samples on how this is done using the Editor SDK.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Programmatically modify stamp collection

Post by Sasha - Tracker Dev Team »

Hello dougk@bbsoft.com.au,

Here's a small code snippet that I had on this matter:

Code: Select all

PDFXEdit.IPXC_StampsCollection SC = pxcInst.StampsManager.CreateEmptyCollection("MyStamps");
PDFXEdit.IAFS_Name name = fsInst.DefaultFileSys.StringToName(@"C:\Program Files\Tracker Software\PDF Editor\Stamps\ENU\DynamicDate.pdf");
PDFXEdit.IAFS_File file = fsInst.DefaultFileSys.OpenFile(name, (int)PDFXEdit.AFS_OpenFileFlags.AFS_OpenFile_Read | (int)PDFXEdit.AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
SC.AddStamp(file, "Red", 0);
file = fsInst.DefaultFileSys.OpenFile(name, (int)PDFXEdit.AFS_OpenFileFlags.AFS_OpenFile_Read | (int)PDFXEdit.AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
SC.AddStamp(file, "Blue", 1);
Also, there is a IPXC_StampsCollection::RemoveStamp method that allows removing the stamp from the stamps collection.
Also, check out this interface - it is used to work with Stamp Collections:
https://sdkhelp.pdf-xchange.com/vie ... mpsManager

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply