PrinterParamStr and PrinterParamInt

The PrinterParamStr and PrinterParamInt properties are used to set or read custom printer parameters. The printer parameters depend on each type of Document Converter Printer and can be either in string or long integer format.

 

The SetPrinterParamStr, SetPrinterParamInt, GetPrinterParamStr, GetPrinterParamInt methods were added in version 2.5 of CDIntf as their equivalent properties are not available from certain environments such as .NET.

 

Syntax

ActiveX:

System.String GetPrinterParamStr(System.String PrinterParam);
System.Int32 GetPrinterParamInt(System.String PrinterParam);

 

void SetPrinterParamStr(System.String PrinterParam, System.String Value)
void SetPrinterParamInt(System.String PrinterParam, System.Int32  Value)

DLL:

int SetPrinterParamStr( HANDLE hPrinter, LPCSTR szParam, LPCSTR szValue )
int SetPrinterParamStrW( HANDLE hPrinter, LPCSTR szParam, LPCWSTR szValue )
int GetPrinterParamStr( HANDLE hPrinter, LPCSTR szParam, LPSTR szValue, int nLen )

 

int SetPrinterParamInt(HANDLE hPrinter, LPCSTR szParam, long nValue)
long GetPrinterParamInt(HANDLE hPrinter, LPCSTR szParam)

 

Parameters

PrinterParamStr

[in, out] String value of the parameter if the parameter is of type string.

PrinterParamInt

[in, out] Long integer value of the parameter if the parameter is of type integer.

PrinterParam, szParam

Name of parameter to change. The comments section contains a list of valid names.

Value, szValue

[in, out] String value of the parameter if the parameter is of type string.  It should be an Ansi string for SetPrinterParamStr or a Unicode string for SetPrinterParamStrW.

hPrinter

Handle to printer returned by any of the DriverInit function calls.

nLen

Size of the szValue buffer where the string value should be returned.

nValue

Long integer value of the parameter if the parameter is of type integer.

 

Return Value

SetPrinterParamStr  and SetPrinterParamInt return 1 if successful, 0 otherwise.  The error could be because it cannot access the registry, the first parameter is invalid, the DriverInit was not called or just failed to access the printer.

 

GetPrinterParamStr and GetPrinterParamInt return the value of the parameter.

 

Remarks

Member of CDIntfEx.CDIntfEx.

 

Example

Activation PostProcessing

 

<Flags()>

Public Enum acFileNameOptions As Integer

    NoPrompt = &H1

    UseFileName = &H2

    Concatenate = &H4

    DisableCompression = &H8

    EmbedFonts = &H10

    BroadcastMessages = &H20

    PrintWatermark = &H40

    MultilingualSupport = &H80

    EncryptDocument = &H100

    FullEmbed = &H200

    UseTcpIpServer = &H400

    SendByEmail = &H800

    ConfirmOverwrite = &H1000

    AppendExisting = &H2000

    AddDateTime = &H3000

    AddIdNumber = &H4000

    LinearizeForWeb = &H8000

    PostProcessing = &H10000

End Enum

 

Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Tells Amyuni PDF Converter to Call a viewer after printing

    Dim viewerExe As String = "C:\Temp\PDFCreactiveDoc.Exe"

    PDF.SetPrinterParamStr("PostProcessing", viewerExe)

 

    ' Enable PostProcessing

    PDF.FileNameOptionsEx = acFileNameOptions.PostProcessing

End Sub

[Flags]

public enum acFileNameOptions

{

    NoPrompt = 0x00000001,

    UseFileName = 0x00000002,

    Concatenate = 0x00000004,

    DisableCompression = 0x00000008,

    EmbedFonts = 0x00000010,

    BroadcastMessages = 0x00000020,

    PrintWatermark = 0x00000040,

    MultilingualSupport = 0x00000080,

    EncryptDocument = 0x00000100,

    FullEmbed = 0x00000200,

    UseTcpIpServer = 0x00000400,

    SendByEmail = 0x00000800,

    ConfirmOverwrite = 0x00001000,

    AppendExisting = 0x00002000,

    AddDateTime = 0x00003000,

    AddIdNumber = 0x00004000,

    LinearizeForWeb = 0x00008000,

    PostProcessing = 0x00010000

}

 

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Tells Amyuni PDF Converter to Call a viewer after printing

    string viewerExe = "C:\temp\\PDFCreactiveDoc.Exe";

    PDF.SetPrinterParamStr("PostProcessing", viewerExe);

 

    // Enable PostProcessing

    PDF.FileNameOptionsEx = (int)acFileNameOptions.PostProcessing;

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

    // Constants for Activation codes

#define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Tells Amyuni PDF Converter to Call a viewer after printing

    LPCSTR viewerExe = "C:\temp\\PDFCreactiveDoc.Exe";

    SetPrinterParamStr(PDF, "PostProcessing", viewerExe);

 

    // Enable PostProcessing

    SetFileNameOptions(PDF, PostProcessing);

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

import com.jacob.com.Variant;

 

public class PrinterParam {

 

    public enum acFileNameOptions

    {

        NoPrompt(0x00000001),

        UseFileName(0x00000002),

        Concatenate(0x00000004),

        DisableCompression(0x00000008),

        EmbedFonts(0x00000010),

        BroadcastMessages(0x00000020),

        PrintWatermark(0x00000040),

        MultilingualSupport(0x00000080),

        EncryptDocument(0x00000100),

        FullEmbed(0x00000200),

        UseTcpIpServer(0x00000400),

        SendByEmail(0x00000800),

        ConfirmOverwrite(0x00001000),

        AppendExisting(0x00002000),

        AddDateTime(0x00003000),

        AddIdNumber(0x00004000),

        LinearizeForWeb(0x00008000),

        PostProcessing(0x00010000);

        public int value;

        public acFileNameOptions(int value)

        {

            this.value = value;

        }

        public Object value(){

            return value;

        }        

        }

 

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Tells Amyuni PDF Converter to Call a viewer after printing

        string viewerExe = "C:\temp\\PDFCreactiveDoc.Exe";

        Dispatch.put(pdf, "SetPrinterParamStr", "PostProcessing", viewerExe);

 

        // Enable PostProcessing

        Dispatch.put(pdf,"FileNameOptionsEx", acFileNameOptions.PostProcessing.value);

 

        // Destroy the pdf object

        PDF = null;

 

    }

}

$acFileNameOptions = @{

    NoPrompt = 0x00000001

    UseFileName = 0x00000002

    Concatenate = 0x00000004

    DisableCompression = 0x00000008

    EmbedFonts = 0x00000010

    BroadcastMessages = 0x00000020

    PrintWatermark = 0x00000040

    MultilingualSupport = 0x00000080

    EncryptDocument = 0x00000100

    FullEmbed = 0x00000200

    UseTcpIpServer = 0x00000400

    SendByEmail = 0x00000800

    ConfirmOverwrite = 0x00001000

    AppendExisting = 0x00002000

    AddDateTime = 0x00003000

    AddIdNumber = 0x00004000

    LinearizeForWeb = 0x00008000

    PostProcessing = 0x00010000

}

 

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Tells Amyuni PDF Converter to Call a viewer after printing

$viewerExe = "C:\Temp\PDFCreactiveDoc.Exe"

[System.__ComObject].InvokeMember('SetPrinterParamStr', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, @("PostProcessing", $viewerExe)) 

 

#Enable PostProcessing

[System.__ComObject].InvokeMember('FileNameOptionsEx', [System.Reflection.BindingFlags]::SetProperty,$null,$PDF,$acFileNameOptions::PostProcessing)

 

#Destroy the pdfCreator object

$PDF = $null

' FileNameOptions constants

Const NoPrompt = &H1

Const UseFileName = &H2

Const Concatenate = &H4

Const DisableCompression = &H8

Const EmbedFonts = &H10

Const BroadcastMessages = &H20

Const PrintWatermark = &H40

Const MultilingualSupport = &H80

Const EncryptDocument = &H100

Const FullEmbed = &H200

Const UseTcpIpServer = &H400

Const SendByEmail = &H800

Const ConfirmOverwrite = &H1000

Const AppendExisting = &H2000

Const AddDateTime = &H3000

Const AddIdNumber = &H4000

Const LinearizeForWeb = &H8000

Const PostProcessing = &H10000

 

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Tells Amyuni PDF Converter to Call a viewer after printing

Dim viewerExe

viewerExe= "C:\Temp\PDFCreactiveDoc.Exe"

PDF.SetPrinterParamStr "PostProcessing", viewerExe

 

' Enable PostProcessing

 

PDF.FileNameOptionsEx = PostProcessing

 

' destroy pdf object

Set PDF = Nothing

 

Converter-Related Parameters

RTF:

Custom parameters for the RTF Converter

Parameter

Type

Description

Values

RTF Format

Integer

Option for formatting the RTF output.

0: Advanced RTF.

1: Full RTF.

2: Formatted Text.

3: Non-formatted Text Only.

RTF Optimization

Integer

Option for formatting the RTF output.

0: No optimization.

1: Line optimization (Recommended).

2: Paragraph optimization.

RTF UseTab

Integer

Option to replace tabs by spaces.

0: Do not replace.

1: Replace.

 

Member of CDIntfEx.CDIntfEx.

 

Example

Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Read the Parameters

    Dim param1 As Integer = PDF.GetPrinterParamInt("RTF Format")

    Console.WriteLine("RTF Format: " + param1.ToString)

 

    Dim param2 As Integer = PDF.GetPrinterParamInt("RTF Optimization")

    Console.WriteLine("RTF Optimization: " + param2.ToString)

 

    Dim param3 As Integer = PDF.GetPrinterParamInt("RTF UseTab")

    Console.WriteLine("Use Tabs: " + param3.ToString)

 

    ' Destroy PDF object

    PDF = Nothing

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = PDF.GetPrinterParamInt("RTF Format");

    Console.WriteLine("RTF Format: " + param1.ToString());

 

    int param2 = PDF.GetPrinterParamInt("RTF Optimization");

    Console.WriteLine("RTF Optimization: " + param2.ToString());

 

    int param3 = PDF.GetPrinterParamInt("RTF UseTab");

    Console.WriteLine("Use Tabs: " + param3.ToString());

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = GetPrinterParamInt(PDF, "RTF Format");

    cout << "RTF Format: " << param1 << endl;

 

    int param2 = GetPrinterParamInt(PDF, "RTF Optimization");

    cout << "RTF Optimization: " << param2 << endl;

 

    int param3 = GetPrinterParamInt(PDF, "RTF UseTab");

    cout << "Use Tabs: " << param3 << endl;

 

    // Destroy PDF object

    PDF = NULL;    

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

import com.jacob.com.Variant;

 

public class PrinterParam {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Read the Parameters

        Variant param1 = Dispatch.call(pdf, "GetPrinterParamInt", "RTF Format");

        System.out.println("RTF Format: " + param1.toString());

 

        Variant param2 = Dispatch.call(pdf, "GetPrinterParamInt", "RTF Optimization");

        System.out.println("RTF Optimization: " + param2.toString());

 

        Variant param3 = Dispatch.call(pdf, "GetPrinterParamInt", "RTF UseTab");

        System.out.println("RTF UseTab: " + param3.toString());

 

        // Destroy PDF object

        pdf = null;        

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Read the Parameters

echo "RTF Format:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "RTF Format") 

 

echo "RTF Optimization:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "RTF Optimization") 

 

echo "RTF UseTab:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "RTF UseTab") 

 

#Destroy PDF object

$PDF = $null

 

        ' Constants for Activation codes

        Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

        ' Declare a new cdintfex object

        Dim PDF

        Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

        ' Get a reference to the installed printer.

        ' This will fail if the printer name passed to the DriverInit method is

        ' not found in the printer’s folder

        PDF.DriverInit AMYUNIPRINTERNAME

 

        ' Read the Parameters

        Dim param1

        param1 = PDF.GetPrinterParamInt("RTF Format")

        WScript.Echo("RTF Format: " & param1)

 

        Dim param2

        param2 = PDF.GetPrinterParamInt("RTF Optimization")

        WScript.Echo("RTF Optimization: " & param2)

 

        Dim param3

        param3 = PDF.GetPrinterParamInt("RTF UseTab")

        WScript.Echo("Use Tabs: " & param3)

 

        ' destroy pdf object

        Set PDF = Nothing

 

 

 

HTML:

Custom parameters for the DHTML Converter

Parameter

Type

Description

Values

HTML MultiPage

Integer

Option for formatting the HTML output.

1: Use Layers.

2: Single Page HTML.

3: Multiple HTML files.

HTML Optimization

Integer

Option for formatting the HTML output.

0: No optimization.

1: Line optimization (Recommended).

2: Paragraph optimization.

Example

Public Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Read the Parameters

    Dim param1 As Integer = PDF.GetPrinterParamInt("HTML MultiPage")

    Console.WriteLine("HTML MultiPage: " + param1.ToString)

 

    Dim param2 As Integer = PDF.GetPrinterParamInt("HTML Optimization")

    Console.WriteLine("HTML Optimization: " + param2.ToString)

 

    ' Destroy the pdf object

    PDF = Nothing

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = PDF.GetPrinterParamInt("HTML MultiPage");

    Console.WriteLine("HTML MultiPage: " + param1.ToString());

 

    int param2 = PDF.GetPrinterParamInt("HTML Optimization");

    Console.WriteLine("HTML Optimization: " + param2.ToString());

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = GetPrinterParamInt(PDF, "HTML MultiPage");

    cout << "HTML MultiPage: " << param1 << endl;

 

    int param2 = GetPrinterParamInt(PDF, "HTML Optimization");

    cout << "HTML Optimization: " << param2 << endl;

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

 

public class Sample {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Read the Parameters

        Variant param1 = Dispatch.call(pdf, "GetPrinterParamInt", "HTML MultiPage");

        System.out.println("HTML MultiPage: " + param1.toString());

 

        Variant param2 = Dispatch.call(pdf, "GetPrinterParamInt", "HTML Optimization");

        System.out.println("HTML Optimization: " + param2.toString());

 

        // Destroy pdfCreator Object

        pdf = null;

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Read the Parameters

echo "HTML MultiPage:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "HTML MultiPage") 

 

echo "HTML Optimization:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "HTML Optimization")

 

#Destroy the pdfCreator object

$PDF = $null

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Read the Parameters

Dim param1

param1 = PDF.GetPrinterParamInt("HTML MultiPage")

WScript.Echo("HTML MultiPage: " & param1)

 

Dim param2

param2 = PDF.GetPrinterParamInt("HTML Optimization")

WScript.Echo("HTML Optimization: " & param2)

 

' destroy pdf object

Set Set PDF = Nothing

 

 

JPEG:

Custom parameters for the JPEG Converter

Parameter

Type

Description

Values

JPEG Resolution

Integer

Image resolution at which the document is converted to JPeg.

0: 75 DPI.

1: 150 DPI.

2: 300 DPI.

3: 600 DPI.

JPEG Optimization

Integer

Option for formatting the JPeg output.

0: No optimization.

1: Line optimization (Recommended).

2: Paragraph optimization.

JPEG Compression

Integer

JPeg compression level. The higher the level, the better the quality and larger the file size.

1 to 9

Example

Public Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Read the Parameters

    Dim param1 As Integer = PDF.GetPrinterParamInt("JPEG Resolution")

    Console.WriteLine("JPEG Resolution: " + param1.ToString)

 

    Dim param2 As Integer = PDF.GetPrinterParamInt("JPEG Optimization")

    Console.WriteLine("JPEG Optimization: " + param2.ToString)

 

    Dim param3 As Integer = PDF.GetPrinterParamInt("JPEG Compression")

    Console.WriteLine("JPEG Compression: " + param3.ToString)

 

    ' Destroy the pdf object

    PDF = Nothing

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = PDF.GetPrinterParamInt("JPEG Resolution");

    Console.WriteLine("JPEG Resolution: " + param1.ToString());

 

    int param2 = PDF.GetPrinterParamInt("JPEG Optimization");

    Console.WriteLine("JPEG Optimization: " + param2.ToString());

 

    int param3 = PDF.GetPrinterParamInt("JPEG Compression");

    Console.WriteLine("JPEG Compression: " + param3.ToString());

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = GetPrinterParamInt(PDF, "JPEG Resolution");

    cout << "JPEG Resolution: " << param1 << endl;

 

    int param2 = GetPrinterParamInt(PDF, "JPEG Optimization");

    cout << "JPEG Optimization: " << param2 << endl;

 

    int param3 = GetPrinterParamInt(PDF, "JPEG Compression");

    cout << "JPEG Compression: " << param3 << endl;

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

 

public class Sample {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Read the Parameters

        Variant param1 = Dispatch.call(pdf, "GetPrinterParamInt", "JPEG Resolution");

        System.out.println("JPEG Resolution: " + param1.toString());

 

        Variant param2 = Dispatch.call(pdf, "GetPrinterParamInt", "JPEG Optimization");

        System.out.println("JPEG Optimization: " + param2.toString());

 

        Variant param3 = Dispatch.call(pdf, "GetPrinterParamInt", "JPEG Compression");

        System.out.println("JPEG Compression: " + param3.toString());

 

        // Destroy pdfCreator Object

        pdf = null;

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Read the Parameters

echo "JPEG Resolution:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "JPEG Resolution") 

 

echo "JPEG Optimization:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "JPEG Optimization") 

 

echo "JPEG Compression:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "JPEG Compression") 

 

#Destroy the pdfCreator object

$PDF = $null

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Read the Parameters

Dim param1

param1 = PDF.GetPrinterParamInt("JPEG Resolution")

WScript.Echo("JPEG Resolution: " & param1)

 

Dim param2

param2 = PDF.GetPrinterParamInt("JPEG Optimization")

WScript.Echo("JPEG Optimization: " & param2)

 

Dim param3

param2 = PDF.GetPrinterParamInt("JPEG Compression")

WScript.Echo("JPEG Compression: " & param3)

 

' destroy pdf object

Set PDF = Nothing

 

TIFF:

Custom parameters for the TIFF Converter

Parameter

Type

Description

Values

TIFF Optimization

Integer

Option for formatting the TIFF output.

0: No optimization.

1: Line optimization (Recommended).

2: Paragraph optimization.

TIFF Resolution

Integer

Image resolution at which the documents converted to TIFF.

0: 75 DPI.

1: 150 DPI.

2: 300 DPI.

3: 600 DPI.

TIFF Options

Integer

TIFF compression level.

0: No TIFF Output.

16: TIFF output, BMP format, No compression.

17: TIFF output, 256 Colors with LZW compression.

19: TIFF output, JPEG Low Compression.

23: TIFF output, JPEG Medium Compression.

25: TIFF output, JPEG High Compression.

26: TIFF output, with CCITT Fax Compression.

All other values reserved for future use.

Example

Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Read the Parameters

    Dim param1 As Integer = PDF.GetPrinterParamInt("TIFF Optimization")

    Console.WriteLine("TIFF Optimization: " + param1.ToString)

 

    Dim param2 As Integer = PDF.GetPrinterParamInt("TIFF Resolution")

    Console.WriteLine("TIFF Resolution: " + param2.ToString)

 

    Dim param3 As Integer = PDF.GetPrinterParamInt("TIFF Options")

    Console.WriteLine("TIFF Options: " + param3.ToString)

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = PDF.GetPrinterParamInt("TIFF Optimization");

    Console.WriteLine("TIFF Optimization: " + param1.ToString());

 

    int param2 = PDF.GetPrinterParamInt("TIFF Resolution");

    Console.WriteLine("TIFF Resolution: " + param2.ToString());

 

    int param3 = PDF.GetPrinterParamInt("TIFF Options");

    Console.WriteLine("TIFF Options: " + param3.ToString());

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = GetPrinterParamInt(PDF, "TIFF Optimization");

    cout << "TIFF Optimization: " << param1 << endl;

 

    int param2 = GetPrinterParamInt(PDF, "TIFF Resolution");

    cout << "TIFF Resolution: " << param2 << endl;

 

    int param3 = GetPrinterParamInt(PDF, "TIFF Options");

    cout << "TIFF Options: " << param3 << endl;

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

 

public class Sample {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Read the Parameters

        Variant param1 = Dispatch.call(pdf, "GetPrinterParamInt", "TIFF Optimization");

        System.out.println("TIFF Optimization: " + param1.toString());

 

        Variant param2 = Dispatch.call(pdf, "GetPrinterParamInt", "TIFF Resolution");

        System.out.println("TIFF Resolution: " + param2.toString());

 

        Variant param3 = Dispatch.call(pdf, "GetPrinterParamInt", "TIFF Options");

        System.out.println("TIFF Options: " + param3.toString());

 

        // Destroy pdfCreator Object

        pdf = null;

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Read the Parameters

echo "TIFF Optimization:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "TIFF Optimization") 

 

echo "TIFF Resolution:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "TIFF Resolution") 

 

echo "TIFF Options:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "TIFF Options")

 

#Destroy the pdfCreator object

$PDF = $null

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Read the Parameters

Dim param1

param1 = PDF.GetPrinterParamInt("TIFF Resolution")

WScript.Echo("TIFF Resolution: " & param1)

 

Dim param2

param2 = PDF.GetPrinterParamInt("TIFF Optimization")

WScript.Echo("TIFF Optimization: " & param2)

 

Dim param3

param2 = PDF.GetPrinterParamInt("TIFF Options")

WScript.Echo("TIFF Options: " & param3)

 

' destroy pdf object

Set PDF = Nothing

EXCEL:

Custom parameters for the Excel Converter

Parameter

Type

Description

Values

EXCEL MultiSheets

Integer

Excel output option

0: No Excel output.

16: All document pages on a single sheet.

17: One excel sheet per document page.

EXCEL Optimization

Integer

Option for formatting the EXCEL output.

0: No optimization.

1: Line optimization (Recommended).

2: Paragraph optimization.

Example

Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Read the Parameters

    Dim param1 As Integer = PDF.GetPrinterParamInt("EXCEL MultiSheets")

    Console.WriteLine("EXCEL MultiSheets: " + param1.ToString)

 

    Dim param2 As Integer = PDF.GetPrinterParamInt("EXCEL Optimization")

    Console.WriteLine("EXCEL Optimization: " + param2.ToString)

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = PDF.GetPrinterParamInt("EXCEL MultiSheets");

    Console.WriteLine("EXCEL MultiSheets: " + param1.ToString());

 

    int param2 = PDF.GetPrinterParamInt("EXCEL Optimization");

    Console.WriteLine("EXCEL Optimization: " + param2.ToString());

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = GetPrinterParamInt(PDF, "EXCEL MultiSheets");

    cout << "EXCEL MultiSheets: " << param1 << endl;

 

    int param2 = GetPrinterParamInt(PDF, "EXCEL Optimizationn");

    cout << "EXCEL Optimization: " << param2 << endl;

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

 

public class Sample {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Read the Parameters

        Variant param1 = Dispatch.call(pdf, "GetPrinterParamInt", "EXCEL MultiSheets");

        System.out.println("EXCEL MultiSheets: " + param1.toString());

 

        Variant param2 = Dispatch.call(pdf, "GetPrinterParamInt", "EXCEL Optimizationn");

        System.out.println("EXCEL Optimization: " + param2.toString());

 

        // Destroy pdfCreator Object

        pdf = null;

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Read the Parameters

echo "EXCEL MultiSheets:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "EXCEL MultiSheets") 

 

echo "EXCEL Optimization:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "EXCEL Optimization")

 

#Destroy the pdfCreator object

$PDF = $null

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Read the Parameters

Dim param1

param1 = PDF.GetPrinterParamInt("EXCEL MultiSheets")

WScript.Echo("EXCEL MultiSheets: " & param1)

 

Dim param2

param2 = PDF.GetPrinterParamInt("EXCEL Optimization")

WScript.Echo("EXCEL Optimization: " & param2)

 

' destroy pdf object

Set PDF = Nothing

 

FONT EMBEDDING:

Custom parameters for font embedding

Parameter

Type

Description

Values

Fonts

String

Controls font embedding

See description below

PrinterParamStr("Fonts", "FontName1=Value1|FontName1=Value2|...")

The format for the Fonts string is as follows:

  • FontName is the font name without any style. "Verdana" will affect all of Verdana, Verdana Bold, Verdana Italic, etc.

  • Value can be 0, 1 or 2  (0 = No Embed, 1 = Partial Embed, 2 = Full Embed).

The values set in the "Fonts" attribute override any other font embedding setting at the printer level, except for Multi Lingual support.

Example

If at the printer level, we have Partial font embedding, Embed standard and licensed fonts, then we set:

Fonts="Verdana=0|Arial=1|Tahoma=2"

Verdana will not be embedded, Arial will be partially embed and Tahoma will be fully embedded, the other fonts behave as before.

 

If at the printer level, we have Multi-Language support, Partial font embedding, Do not Embed standard or licensed fonts, then we set:

Fonts="Verdana=0|Arial=1|Tahoma=2"

Verdana will not be embedded but will be in Multi-Language mode, Arial will be partially embedded and Tahoma will be also be partially embedded, the other fonts behave as before. Tahoma is partially embedded because for this version full font embedding is not compatible with multi-language support.

Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Read the Parameters

    Dim param1 As Integer = PDF.GetPrinterParamInt("EXCEL MultiSheets")

    Console.WriteLine("EXCEL MultiSheets: " + param1.ToString)

 

    Dim param2 As Integer = PDF.GetPrinterParamInt("EXCEL Optimization")

    Console.WriteLine("EXCEL Optimization: " + param2.ToString)

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = PDF.GetPrinterParamInt("EXCEL MultiSheets");

    Console.WriteLine("EXCEL MultiSheets: " + param1.ToString());

 

    int param2 = PDF.GetPrinterParamInt("EXCEL Optimization");

    Console.WriteLine("EXCEL Optimization: " + param2.ToString());

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Read the Parameters

    int param1 = GetPrinterParamInt(PDF, "EXCEL MultiSheets");

    cout << "EXCEL MultiSheets: " << param1 << endl;

 

    int param2 = GetPrinterParamInt(PDF, "EXCEL Optimizationn");

    cout << "EXCEL Optimization: " << param2 << endl;

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

 

public class Sample {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Read the Parameters

        Variant param1 = Dispatch.call(pdf, "GetPrinterParamInt", "EXCEL MultiSheets");

        System.out.println("EXCEL MultiSheets: " + param1.toString());

 

        Variant param2 = Dispatch.call(pdf, "GetPrinterParamInt", "EXCEL Optimizationn");

        System.out.println("EXCEL Optimization: " + param2.toString());

 

        // Destroy pdfCreator Object

        pdf = null;

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Read the Parameters

echo "EXCEL MultiSheets:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "EXCEL MultiSheets") 

 

echo "EXCEL Optimization:"

[System.__ComObject].InvokeMember('GetPrinterParamInt', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "EXCEL Optimization")

 

#Destroy the pdfCreator object

$PDF = $null

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Read the Parameters

Dim param1

param1 = PDF.GetPrinterParamInt("EXCEL MultiSheets")

WScript.Echo("EXCEL MultiSheets: " & param1)

 

Dim param2

param2 = PDF.GetPrinterParamInt("EXCEL Optimization")

WScript.Echo("EXCEL Optimization: " & param2)

 

' destroy pdf object

Set PDF = Nothing

 

 

ACTIVATION ERROR REPORTING:

Custom parameters for Activation Error Reporting

Parameter

Type

Description

Values

Activation Error Title

String

Custom title of the message box upon an activation error.

Any String

Activation Error Text

String

Custom text of the message box upon an activation error.

Any String

Example

Sub Sample()

    ' Constants for Activation codes

    Const AMYUNIPRINTERNAME As String = "Amyuni PDF Converter"

 

    ' Declare a new cdintfex object if it does not exist in the form.

    Dim PDF As New CDIntfEx.CDIntfEx

 

    ' Get a reference to the installed printer.

    ' This will fail if the printer name passed to the DriverInit method is 

    ' not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME)

 

    ' Set the Parameters

    PDF.SetPrinterParamStr("Activation Error Title", "Your error title here")

    PDF.SetPrinterParamStr("Activation Error Text", "Your error message here")

End Sub

static void Sample()

{

    // Constants for Activation codes

    const string AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

    // Declare a new cdintfex object if it does not exist in the form.

    CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfEx();

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    PDF.DriverInit(AMYUNIPRINTERNAME);

 

    // Set the Parameters

    PDF.SetPrinterParamStr("Activation Error Title", "Your error title here");

    PDF.SetPrinterParamStr("Activation Error Text", "Your error message here");

 

 

}

// PDF Converter Cpp.cpp : Defines the entry point for the console application.

 

#include <Windows.h>

#include <string>

#include <iostream>

#include "CdIntf.h"

#pragma comment (lib, "CDIntf.lib")

 

using namespace std;

int main()

{

     // Constants for Activation codes

    #define AMYUNIPRINTERNAME "Amyuni PDF Converter"

 

    // Get a reference to the installed printer.

    // This will fail if the printer name passed to the DriverInit method is 

    // not found in the printer’s folder

    HANDLE PDF = DriverInit(AMYUNIPRINTERNAME);

 

    // Set the Parameters

    SetPrinterParamStr(PDF, "Activation Error Title", "Your error title here");

    SetPrinterParamStr(PDF, "Activation Error Text", "Your error message here");

 

    // destroy pdf object

    PDF = NULL;

 

    return 0;

}

package Example;

 

import com.jacob.activeX.ActiveXComponent;

import com.jacob.com.Dispatch;

 

public class Sample {

    public static void main(String[] args)

    {

        // Constants for Activation codes

        String AMYUNIPRINTERNAME = "Amyuni PDF Converter";

 

        // Declare a new cdintfex object if it does not exist in the form.

        ActiveXComponent pdf = new ActiveXComponent("CDIntfEx.CDIntfEx.6.5"); 

 

        // Get a reference to the installed printer.

        // This will fail if the printer name passed to the DriverInit method is 

        // not found in the printer’s folder

        Dispatch.call(pdf,"DriverInit", AMYUNIPRINTERNAME);

 

        // Set the Parameters

        Dispatch.call(pdf, "SetPrinterParamStr", "Activation Error Title", "Your error title here");

        Dispatch.call(pdf, "SetPrinterParamStr", "Activation Error Text", "Your error message here");

 

        // Destroy pdfCreator Object

        pdf = null;

    }

}

# Constants for Activation codes

$AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

#Declare a new cdintfex object if it does not exist in the form.

$PDF = New-Object -ComObject CDIntfEx.CDIntfEx.6.5

 

#Get a reference to the installed printer.

#This will fail if the printer name passed to the DriverInit method is 

#not found in the printer’s folder

[System.__ComObject].InvokeMember('DriverInit', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$AMYUNIPRINTERNAME) 

 

#Set the Parameters

[System.__ComObject].InvokeMember('SetPrinterParamStr', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, @("Activation Error Title", "Your error title here")) 

[System.__ComObject].InvokeMember('SetPrinterParamStr', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, @("Activation Error Text", "Your error message here"))

 

#Destroy the pdfCreator object

$PDF = $null

' Constants for Activation codes

Const AMYUNIPRINTERNAME = "Amyuni PDF Converter"

 

' Declare a new cdintfex object

Dim PDF

Set PDF = CreateObject("CDIntfEx.CDIntfEx.6.5")

 

' Get a reference to the installed printer.

' This will fail if the printer name passed to the DriverInit method is

' not found in the printer’s folder

PDF.DriverInit AMYUNIPRINTERNAME

 

' Set up the Parameters

PDF.SetPrinterParamStr "Activation Error Title", "Your error title here"

PDF.SetPrinterParamStr "Activation Error Text", "Your error message here"

 

' destroy pdf object

Set PDF = Nothing