The PrinterLanguage property can be used to modify or read the language used in the user interface of the printer.
System.Int32 PrinterLanguage
long GetPrinterLanguage(HANDLE hPrinter)
void SetPrinterLanguage(HANDLE hPrinter, long nNewValue)
PrinterLanguage, nNewValue
[in, out] User-interface language Id. nLang can be one of the following values:
Value |
Language |
---|---|
0 |
Default language set by the license key. |
1 |
English |
2 |
French |
3 |
German |
4 |
Portuguese |
5 |
Swedish |
6 |
Italian |
7 |
Spanish |
8 |
Japanese |
9 |
Chinese |
10 |
Korean |
11 |
Polish |
12 |
Russian |
13 |
Turkish |
hPrinter
Handle to printer returned by any of the DriverInit function calls.
SetPrinterLanguage returns 1 if successful, 0 otherwise; PrinterLanguage and GetPrinterLanguage return the value language of the printer.
The license key provided with the product contains the default user-interface language that will be used after installing the product. PrinterLanguage can be used to modify the default value. The language can also be modified by the user from the printer configuration dialog-box.
Member of CDIntfEx.CDIntfEx.
<Flags()>
Public Enum LANGUAGES As Integer
SPL_DEFAULT = 0
_EN = 1 ' English
_FR = 2 ' French
_DE = 3 ' German
_PT = 4 ' Portuguese
_SV = 5 ' Swedish
_IT = 6 ' Italian
_SP = 7 ' Spanish
_JA = 8 ' Japanese
_CH = 9 ' Chinese
_KO = 10 ' Korean
_PL = 11 ' Polish
_RU = 12 ' Russian
_TR = 13 ' Turkish
End Enum
<Flags()>
Public Enum acFileNameOptions As Integer
' Please check FileNameOptions for the complete flags version
NoPrompt = &H1
UseFileName = &H2
Concatenate = &H4
DisableCompression = &H8
EmbedFonts = &H10
BroadcastMessages = &H20
PrintWatermark = &H40
End Enum
Public Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Converter Evaluation"
Const strActivationCode As String = "07EFCDAB0100010025AFF1801CB9441306C5739F7D452154D8833B9CECBA2ADE79E3762A69FFC354528A5F4A5811BE3204A0A439F5BA"
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)
' The SetDefaultPrinter function sets the system default printer to the one
' initialized by the DriverInit functions.
PDF.SetDefaultPrinter()
' The EnablePrinter() method needs to be called right before each print job.
' and before the configuration
' Calling the EnablePrinter() method will start a 20 second time-out value
PDF.EnablePrinter(strLicenseTo, strActivationCode)
' Resulting PDF document stored here
PDF.DefaultDirectory = "C:\Temp"
' Set Printer options
PDF.FileNameOptionsEx = acFileNameOptions.NoPrompt
' Set the language used in the user interface of the printer.
PDF.PrinterLanguage = LANGUAGES._FR
' The BatchConvert method converts a number of files to PDF.
PDF.BatchConvert("C:\Temp\*.docx")
' The RestoreDefaultPrinter function resets the system default printer
' to the printer that was the default before the call to SetDefaultPrinter.
PDF.RestoreDefaultPrinter()
' This function will simply detach from an existing printer because the handle was created using DriverInit
PDF.DriverEnd()
' Destroy PDF object
PDF = Nothing
End Sub
[Flags]
public enum LANGUAGES
{
_EN = 1, // English
_FR = 2, // French
_DE = 3, // German
_PT = 4, // Portuguese
_SV = 5, // Swedish
_IT = 6, // Italian
_SP = 7, // Spanish
_JA = 8, // Japanese
_CH = 9, // Chinese
_KO = 10, // Korean
_PL = 11, // Polish
_RU = 12, // Russian
_TR = 13 // Turkish
}
[Flags]
public enum acFileNameOptions
{
// Please check FileNameOptions for the complete flags version
NoPrompt = 0x00000001,
UseFileName = 0x00000002,
Concatenate = 0x00000004,
DisableCompression = 0x00000008,
EmbedFonts = 0x00000010,
BroadcastMessages = 0x00000020,
PrintWatermark = 0x00000040
}
public void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Converter Evaluation";
const string strActivationCode = "07EFCDAB0100010025AFF1801CB9441306C5739F7D452154D8833B9CECBA2ADE79E3762A69FFC354528A5F4A5811BE3204A0A439F5BA";
const string AMYUNI_PRINTER_NAME = "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);
// The SetDefaultPrinter function sets the system default printer to the one
// initialized by the DriverInit functions.
PDF.SetDefaultPrinter();
// The EnablePrinter() method needs to be called right before each print job.
// and before the configuration
// Calling the EnablePrinter() method will start a 20 second time-out value
PDF.EnablePrinter(strLicenseTo, strActivationCode);
// Resulting PDF document stored here
PDF.DefaultDirectory = @"C:\Temp";
// Set Printer options
PDF.FileNameOptionsEx = (int)acFileNameOptions.NoPrompt;
// Set the language used in the user interface of the printer.
PDF.PrinterLanguage = (int)LANGUAGES._FR;
// The BatchConvert method converts a number of files to PDF.
PDF.BatchConvert(@"C:\Temp\*.docx");
// The RestoreDefaultPrinter function resets the system default printer
// to the printer that was the default before the call to SetDefaultPrinter.
PDF.RestoreDefaultPrinter();
// This function will simply detach from an existing printer because the handle was created using DriverInit
PDF.DriverEnd();
}
// 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;
enum acFileNameOptions
{
ConfirmOverwrite = 0x00001000,
AppendExisting = 0x00002000,
AddDateTime = 0x00003000,
AddIdNumber = 0x00004000,
QualityLevelLow = 0x00020000,
QualityLevelMedium = 0x00040000,
QualityLevelHigh = 0x00060000,
ExportToHTML = 0x04000000,
ExportToRTF = 0x08000000,
ExportToJPEG = 0x10000000,
AutoImageCompression = 0x80000000
};
int main()
{
// Constants for Activation codes
#define strLicenseTo "Amyuni PDF Converter Evaluation"
#define strActivationCode "07EFCDAB0100010025AFF1801CB9441306C5739F7D452154D8833B9CECBA2ADE79E3762A69FFC354528A5F4A5811BE3204A0A439F5BA"
#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);
// The CDISetDefaultPrinter function sets the system default printer to the one
// initialized by the DriverInit functions.
CDISetDefaultPrinter(PDF);
// The EnablePrinter() method needs to be called right before each print job.
// and before the configuration
// Calling the EnablePrinter() method will start a 20 second time-out value
EnablePrinter(PDF, strLicenseTo, strActivationCode);
// Resulting PDF document stored here
SetDefaultDirectory(PDF, "C:\temp");
// Set Printer options
SetFileNameOptions(PDF, NoPrompt);
// Set the language used in the user interface of the printer.
SetPrinterLanguage(PDF, _SP);
// The BatchConvert method converts a number of files to PDF.
BatchConvertEx(PDF, "C:\temp\\*.docx");
// Get the language used in the user interface of the printer.
cout << GetPrinterLanguage(PDF);
// The RestoreDefaultPrinter function resets the system default printer
// to the printer that was the default before the call to SetDefaultPrinter.
RestoreDefaultPrinter(PDF);
// This function will simply detach from an existing printer because the handle was created using DriverInit
DriverEnd(PDF);
// Destroy PDF object
PDF = nullptr;
return 0;
}
package Example;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
public class Sample {
public enum LANGUAGES
{
_EN(1), // English
_FR(2), // French
_DE(3), // German
_PT(4), // Portuguese
_SV(5), // Swedish
_IT(6), // Italian
_SP(7), // Spanish
_JA(8), // Japanese
_CH(9), // Chinese
_KO(10), // Korean
_PL(11), // Polish
_RU(12), // Russian
_TR(13); // Turkish;
public int value;
public LANGUAGES(int value)
{
this.value = value;
}
public Object value(){
return value;
}
}
public enum acFileNameOptions
{
NoPrompt(0x00000001),
UseFileName(0x00000002),
Concatenate(0x00000004),
DisableCompression(0x00000008),
EmbedFonts(0x00000010),
BroadcastMessages(0x00000020),
PrintWatermark(0x00000040);
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 strLicenseTo = "Amyuni PDF Converter Evaluation";
String strActivationCode = "07EFCDAB0100010025AFF1801CB9441306C5739F7D452154D8833B9CECBA2ADE79E3762A69FFC354528A5F4A5811BE3204A0A439F5BA";
String AMYUNI_PRINTER_NAME = "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);
// The SetDefaultPrinter function sets the system default printer to the one
// initialized by the DriverInit functions.
Dispatch.call(pdf,"SetDefaultPrinter");
// The EnablePrinter() method needs to be called right before each print job.
// and before the configuration
// Calling the EnablePrinter() method will start a 20 second time-out value
Dispatch.call(pdf,"EnablePrinter", strLicenseTo, strActivationCode);
// Resulting PDF document stored here
Dispatch.put(pdf,"DefaultDirectory","C:\temp");
// Set Printer options
Dispatch.put(pdf,"FileNameOptionsEx",acFileNameOptions.NoPrompt.value);
// Set Printer options
Dispatch.put(pdf, "PrinterLanguage", LANGUAGES._FR.value);
// The BatchConvert method converts a number of files to PDF.
Dispatch.call(pdf,"BatchConvert","C:\temp\\*.docx");
// The RestoreDefaultPrinter function resets the system default printer
// to the printer that was the default before the call to SetDefaultPrinter.
Dispatch.call(pdf,"RestoreDefaultPrinter");
// This function will simply detach from an existing printer because the handle was created using DriverInit
Dispatch.call(pdf,"DriverEnd");
// Destroy PDF object
pdf = null;
}
}
$LANGUAGES = @{
SPL_DEFAULT = 0
_EN = 1 #English
_FR = 2 #French
_DE = 3 #German
_PT = 4 #Portuguese
_SV = 5 #Swedish
_IT = 6 #Italian
_SP = 7 #Spanish
_JA = 8 #Japanese
_CH = 9 #Chinese
_KO = 10 #Korean
_PL = 11 #Polish
_RU = 12 #Russian
_TR = 13 #Turkish
}
$acFileNameOptions = @{
NoPrompt = 0x00000001
UseFileName = 0x00000002
Concatenate = 0x00000004
DisableCompression = 0x00000008
EmbedFonts = 0x00000010
BroadcastMessages = 0x00000020
PrintWatermark = 0x00000040
}
# Constants for Activation codes
$strLicenseTo = "Amyuni PDF Converter Evaluation"
$strActivationCode = "07EFCDAB0100010025AFF1801CB9441306C5739F7D452154D8833B9CECBA2ADE79E3762A69FFC354528A5F4A5811BE3204A0A439F5BA"
$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)
# The SetDefaultPrinter function sets the system default printer to the one
# initialized by the DriverInit functions.
[System.__ComObject].InvokeMember('SetDefaultPrinter', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$null)
# The EnablePrinter()method needs to be called right before each print job.
# and before the configuration
# Calling the EnablePrinter()method will start a 20 second time-out value
[System.__ComObject].InvokeMember('EnablePrinter', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, @($strLicenseTo, $strActivationCode))
# Resulting PDF document stored here
[System.__ComObject].InvokeMember('DefaultDirectory', [System.Reflection.BindingFlags]::SetProperty,$null,$PDF,"C:\Temp")
# Set Printer options
[System.__ComObject].InvokeMember('FileNameOptionsEx', [System.Reflection.BindingFlags]::SetProperty,$null,$PDF,$acFileNameOptions::NoPrompt)
# Set an Language
[System.__ComObject].InvokeMember('PrinterLanguage', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$LANGUAGES::_FR)
# The BatchConvert method converts a number of files to PDF.
[System.__ComObject].InvokeMember('BatchConvert', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF, "C:\Temp\*.docx")
# The RestoreDefaultPrinter function resets the system default printer
# to the printer that was the default before the call to SetDefaultPrinter.
[System.__ComObject].InvokeMember('RestoreDefaultPrinter', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$null)
# This function will simply detach from an existing printer because the handle was created using DriverInit
[System.__ComObject].InvokeMember('DriverEnd', [System.Reflection.BindingFlags]::InvokeMethod,$null,$PDF,$null)
# Destroy PDF object
$PDF = $null
' Printer Language Constants
Const LANGUAGES_SPL_DEFAULT = 0
Const LANGUAGES_EN = 1 ' English
Const LANGUAGES_FR = 2 ' French
Const LANGUAGES_DE = 3 ' German
Const LANGUAGES_PT = 4 ' Portuguese
Const LANGUAGES_SV = 5 ' Swedish
Const LANGUAGES_IT = 6 ' Italian
Const LANGUAGES_SP = 7 ' Spanish
Const LANGUAGES_JA = 8 ' Japanese
Const LANGUAGES_CH = 9 ' Chinese
Const LANGUAGES_KO = 10 ' Korean
Const LANGUAGES_PL = 11 ' Polish
Const LANGUAGES_RU = 12 ' Russian
Const LANGUAGES_TR = 13 ' Turkish
' FileNameOptions constants
' Please check FileNameOptions for the complete flags version
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
' Constants for Activation codes
Const strLicenseTo = "Amyuni PDF Converter Evaluation"
Const strActivationCode = "07EFCDAB0100010025AFF1801CB9441306C5739F7D452154D8833B9CECBA2ADE79E3762A69FFC354528A5F4A5811BE3204A0A439F5BA"
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
' The SetDefaultPrinter function sets the system default printer to the one
' initialized by the DriverInit functions.
PDF.SetDefaultPrinter
' The EnablePrinter() method needs to be called right before each print job.
' and before the configuration
' Calling the EnablePrinter() method will start a 20 second time-out value
PDF.EnablePrinter strLicenseTo, strActivationCode
' Resulting PDF document stored here
PDF.DefaultDirectory = "C:\Temp"
' Set Printer options
PDF.FileNameOptionsEx = NoPrompt
' Set the language used in the user interface of the printer.
PDF.PrinterLanguage = LANGUAGES_FR
' The BatchConvert method converts a number of files to PDF.
PDF.BatchConvert "C:\Temp\*.docx"
' The RestoreDefaultPrinter function resets the system default printer
' to the printer that was the default before the call to SetDefaultPrinter.
PDF.RestoreDefaultPrinter
' This function will simply detach from an existing printer because the handle was created using DriverInit
PDF.DriverEnd
' Destroy PDF object
Set PDF = Nothing