Digital signature and timestamp

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

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

Post Reply
atheohar
User
Posts: 1
Joined: Fri May 18, 2012 10:57 am

Digital signature and timestamp

Post by atheohar » Fri May 18, 2012 11:05 am

Hello,
I am trying to utilise the digital signature together with a TSA server timestamp.
I got these signatures from you
The function signatures for setting the time stamp server are:

PXCPRO40_API HRESULT XCPAPI PXCp_SetTSAServerA(PDFDocument* pdf, LPCSTR lpszServerURL, LPCSTR lpszUser, LPCSTR lpszPassword);

PXCPRO40_API HRESULT XCPAPI PXCp_SetTSAServerW(PDFDocument* pdf, LPCWSTR lpszServerURL, LPCWSTR lpszUser, LPCWSTR lpszPassword);

and I ve tried it with two different ways in my code
// Sign the document
[DllImport(@"C:\Program Files (x86)\Zetadocs Server\Document Converter\xcpro40.dll")]
public static extern int PXCp_SignDocumentUsingPFXW(int pdfHandle, [MarshalAs(UnmanagedType.LPWStr)] string pwFileName,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszPFXPassword,
int pageIndex,
ref PXC_RectF rect,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszReason,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszLocation,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszContactInfo,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszImageFile,
int dwFlags
);

[DllImport(@"C:\Program Files (x86)\Zetadocs Server\Document Converter\xcpro40.dll")]
public static extern int PXCp_SetTSAServerW(
ref IntPtr pdf,
[MarshalAs(UnmanagedType.LPWStr)] string serverURL,
[MarshalAs(UnmanagedType.LPWStr)] string user,
[MarshalAs(UnmanagedType.LPWStr)] string password);

and

// Sign the document
[DllImport(@"C:\Program Files (x86)\Zetadocs Server\Document Converter\xcpro40.dll")]
public static extern int PXCp_SignDocumentUsingPFXW(int pdfHandle, [MarshalAs(UnmanagedType.LPWStr)] string pwFileName,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszPFXPassword,
int pageIndex,
ref PXC_RectF rect,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszReason,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszLocation,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszContactInfo,
[MarshalAs(UnmanagedType.LPWStr)] string lpwszImageFile,
int dwFlags
);

[DllImport(@"C:\Program Files (x86)\Zetadocs Server\Document Converter\xcpro40.dll")]
public static extern int PXCp_SetTSAServerW(
int pdfHandle,
[MarshalAs(UnmanagedType.LPWStr)] string serverURL,
[MarshalAs(UnmanagedType.LPWStr)] string user,
[MarshalAs(UnmanagedType.LPWStr)] string password);

The PXCp_SignDocumentUsingPFXW method works perfectly but when I try to use the PXCp_SetTSAServerW call i get the following error
Unable to find an entry point named 'PXCp_SetTSAServerW' in DLL 'C:\Program Files (x86)\Zetadocs Server\Document Converter\xcpro40.dll'.
Do I have to get a specific xcpro40.dll that contains this function? I ve downloaded your latest version and it seems it does not include this function in the documentation either.
Thank you in advance,
Antonis

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13309
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Digital signature and timestamp

Post by Tracker Supp-Stefan » Fri May 18, 2012 12:24 pm

Hello Antonis,

Could you please make sure that you are using the latest build of our SDK, and that all the files you use are also for build 201?

Best,
Stefan

Post Reply