I am evaluating the PDF Converter 3.0 product and am having some difficulty trying to get a couple things to work and have a general question. Perhaps I should have posted these as separate questions, but I thought this would be easier. The issues I have run into are as follows:
1) Unable to get a Watermark produced or Linearization to work using the following initialization (C# code):
Code: Select all
private static IntPtr m_converter = CDintfDll.DriverInit
("Amyuni PDF Converter");
...
CDintfDll.EnablePrinter(m_converter,
"Evaluation Version Developer Pro",
"07EF ... BA20") <- Real key truncated posting
CDintfDll.SetWatermark(m_converter, " D R A F T ", "Verdana", 48,
450, 0xFF00FF, 120, -120, true);
CDIntfDllInterOp.SetOwnerPassword(m_converter, "Owner");
CDIntfDllInterOp.SetUserPassword(m_converter, "User");
CDIntfDllInterOpm.SetPermissions(m_converter, 0xFFFFFFC0 | 0x4);
CDIntfDllInterOp.SetPrinterConfig(m_converter, 2);
int options = 0x40 | // Print watermark
0x100 | // Encrypt
0x8000; // Linearize for Web
status = CDIntfDllInterOp.SetFileNameOptions(m_converter,
options);
2) Wanted to also try producing a TIFF output using the following code, but I instead get a popup (after the following code is executed, so I presume it is the print driver issuing the popup) saying the evaluation has expired and when I hit Esc key to cancel that the print fails. This is odd because I can create a PDF fine without an evaluation expiration message.
Code: Select all
private static IntPtr m_converter = CDintfDll.PDFDriverInit(
"Amyuni TIFF Converter");
...
CDintfDll.EnablePrinter(m_converter,
"Evaluation Version Developer Pro",
"07EF ... BA20") <- Real key truncated posting
// Copied the following for another forum posting, but
// documentation on the "TIFF Options" would be useful.
CDIntfDllInterOp.SetPrinterParamInt(m_converter,
"TIFF Options", 16);
CDIntfDllInterOp.SetPrinterParamInt(m_converter,
"TIFF Resolution", 300);
CDIntfDllInterOp.SetFileNameOptions(m_converter, 0); <- Not sure this is needed or correct
CDintfDll.SetDefaultConfig(m_converter);
The other question I have is:
- I am trying to decide whether it is better to use the DLL (CDintfDll) interface or the ActiveX interface. When I look at the SetOwnerPassowrd/SetUserPassword functions of the DLL I see that the string parameters are delared as 'LPCSTR', which is decorated as ANSI. The ActiveX OwnerPassword/UserPassword methods use 'String' parameters. My question is whether these ActiveX methods just call the same DLL entry points and thus result in the Unicode strings from my C# application being converted to ANSI strings or whether they call entry points that indeed support Unicode characters. My concern is international clients who will be using multi-byte character sets and want to use a password other something restricted to ANSI.
Any help or advice would be greatly appreciated.
Thanks,
Darrel