Prerequisites Step 1: Install the AD RMS Services Client To run this SDK, you must have the latest version of the AD RMS client installed. If you have an existing older version of the AD RMS client installed, you will need to uninstall it first and then download and install the latest version of the AD RMS client (http://www.microsoft.com/en-us/download/details.aspx?id=38396).
“Foxit RMS PDF Protection Tool(SDK)\tools\ isvtier5appsigningprivkey.dat” “Foxit RMS PDF Protection Tool(SDK)\tools\ isvtier5appsigningpubkey.dat” “Foxit RMS PDF Protection Tool(SDK)\tools\ isvtier5appsignsdk_client.xml” “Foxit RMS PDF Protection Tool(SDK)\tools\< YourAppName >.bat” “Foxit RMS PDF Protection Tool(SDK)\tools\< YourAppName >.mcf” < YourAppName >.exe Note: If it's the pre-production environment, please copy the files “isvtier5appsigningprivkey.dat”, “isvtier5appsigningpubkey.
Note: If the program YourAppName.exe has been modified, you should regenerate the file < YourAppName >.exe.man. 5. Copy the following files to your RMS server: < YourAppName >.exe < YourAppName >.exe.man FPDFRMS.dll 6. Run your application. You can run the application from any directory, but your generated manifest (.exe.man and FPDFRMS.dll) must be in the same directory as < YourAppName >.exe How to build your application 1.
{ FRMSProtector_Release(hProtector); } . NOTE: If failing to call the function, 1. ensure you have called the function FRMS_UnlockLibrary successfully. 2. check whether the AD RMS environment has been set up correctly if the function FRMS_UnlockLibrary is returned successfully. 3. Sets the source to be protected. It can be a folder containing PDF files or can be a PDF file path. Example: //Set the PDF file path wchar_t wsSource[20] = L"C:\\test.
{ DisplayFRMSError(hr); goto Exit; } lpwsIssuer = new wchar_t[nLen]; memset(lpwsIssuer, 0, sizeof(wchar_t)*nLen); //Gets the issuer name by index hr = FRMSProtector_GetIssuer(hProtector, i, this->GetSafeHwnd(), lpwsIssuer, &nLen); if(hr != FRMS_HRESULT_OK) { DisplayFRMSError(hr); delete [] lpwsIssuer; goto Exit; } } 5. Get the number of Rights Poilcy Template. Example: int nTemplateCount = 0; //Gets the count of RMS rights policy templates of the specified issuer.
goto Exit; } lpwsName = new wchar_t[nLen]; memset(lpwsName, 0, sizeof(wchar_t)*nLen); // Gets the name of RMS rights policy template by specified index. hr = FRMSProtector_GetTemplateName(hProtector, j, lpwsIssuer, this->GetSafeHwnd(), lpwsName, &nLen); if(hr != FRMS_HRESULT_OK) { DisplayFRMSError(hr); delete [] lpwsName; delete [] lpwsIssuer; goto Exit; } } 7. Set the template which is used to encrypt documents, and ensure this template can be retrieved on the AD RMS server.
{ LPWSTR lpwsText = NULL; int nLen = 0; FRMS_HRESULT hrGet = FRMS_GetErrorMessage(hr, 1033, lpwsText, &nLen); if(hrGet == FRMS_HRESULT_OK) { lpwsText = new wchar_t[nLen]; memset(lpwsText, 0, sizeof(wchar_t)*nLen); hrGet = FRMS_GetErrorMessage(hr, 1033, lpwsText, &nLen); wprintf(L"%s\r\n", lpwsText); delete [] lpwsText; } } Add Security Dynamic Watermark to the File Encrypted by RMS 1. Unzip the installation package on RMS server. 2. Run the file “Foxit Security Watermark Configuration Tool.
alignment. Note: you can only set text as watermark. v.Choose the Dynamic Text. When any PDF reader opens the file, the watermark will show the current document information dynamically and you can use multiple text at the same time. Document Title: shows the current document title. Author: shows the author of current document. Current User: shows the current user who is reading the document. Date: shows the current system date when opening the document.
i.Open the Security Watermark Management and select a watermark you want to edit. ii.Click Edit to open the Create Security Watermark dialog box. iii.Begin editing the watermark, please refer to “Adding Watermark”. iv.Click OK to finish the operation. Deleting a Watermark Open the Security Watermark Management and select a watermark you want to delete. Click Delete to remove the selected watermark. Exporting a Watermark xi.Open the Security Watermark Management and select a watermark you want to export.
4. Set the debugging breakpoint behind AfxMessageBox. When you close the dialog box AfxMessageBox, the breakpoint will be activated. For VC6.0: 1. Open regedit.exe and navigate to HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/WindowsNT/CurrentVersion/AeDebug 2. Change the following key values: Key :Auto Value: 0 Key: Debugger Value: C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\msdev.exe" -p %ld -e %ld NOTE: Ensure that “YourAppName.exe” is consistent with the actual msdev.exe.
6. Open Windows Task Manager. 7. Right-click on your application and choose Debug. VC6.0 will be started automatically. i. Open the debug file and set the debugging breakpoint behind AfxMessageBox. When you close the dialog box AfxMessageBox, the breakpoint will be activated. How to understand common error conditions and solutions 1.
Action required to fix the error: Please choose the option Start without debugging under the menu Debug of the Visual Studio to debug and run your program. Quick Start for Using Windows Azure AD Right Management Enable Windows Azure AD Rights Management for your organization: Download the Windows Azure AD Rights Management administration module (WindowsAzureADRightsManagementAdministration.exe) for Windows PowerShell from here.
Contact Us Feel free to contact Foxit should you need any information or have any problems with our products. We are always here, ready to serve you better. Office Address: Foxit Corporation 42840 Christy Street. Suite 201 Fremont CA 94538 USA Mailing Address: Foxit Corporation 42840 Christy Street. Suite 201 Fremont CA 94538 USA Sales: 1-866-680-3668 (24/7) Support: 1-866-MYFOXIT or 1-866-693-6948 (24/7) Fax: 530-535-9288 Website: www.foxitsoftware.