TIFF2PDF
TIFF to PDF:
This easy-to-use software allows you to convert several TIFF files into one PDF file.
The program converts one or many TIFF files to one PDF file, including multiple page TIFF files,
tiled TIFF files, black and white. grayscale, and color TIFF files that contain data of TIFF photometric interpretations of bilevel, grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by libtiff and PDF.
Available in user-interactive (GUI), Command-line and DLL versions.
Support Windows 2000, 2003, 2008, XP and Vista.( 32 & 64 bit )
Also you can use tif2pdf.dll in your programs.
Here sample code for C++, Delphi and C#
C++ code sample:
typedef int ( *PFN_open_PDF)(const char *); PFN_open_PDF open_PDF;
typedef int ( *PFN_close_PDF)(const char *,const char *); PFN_close_PDF close_PDF;
typedef int ( *PFN_add_TIFF)(const char *); PFN_add_TIFF add_TIFF;
HINSTANCE hDll;
void LoadDll()
{
hDll=LoadLibrary(_T("tif2pdf.dll"))
if(hDll)
{ open_PDF=(PFN_open_PDF)GetProcAddress(hDll,"open_PDF");
add_TIFF=(PFN_add_TIFF)GetProcAddress(hDll,"add_TIFF");
close_PDF=(PFN_close_PDF)GetProcAddress(hDll,"close_PDF");
}
}
int OpenPDF(const char *n)
{
if (open_PDF)
return (*open_PDF)(n);
else
return -1;
}
int AddTIFF(const char *n)
{
if (add_TIFF)
return (*add_TIFF)(n);
else
return -1;
}
int ClosePDF(const char *n,const char *n1)
{
if (close_PDF)
return (*close_PDF)(n,n1);
else
return -1;
}
int _tmain(int argc, _TCHAR* argv[])
{
LoadDll();
if (OpenPDF("tmp_image")== 0){
AddTIFF("image1.tif");
AddTIFF("image2.tif");
ClosePDF("tmp_image","image.pdf");
}
if (hDll!=NULL) FreeLibrary(hDll);
return 0;
}
C# code sample:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("tif2pdf.dll")] static extern int open_PDF(String n);
[DllImport("tif2pdf.dll")] static extern int add_TIFF(String n);
[DllImport("tif2pdf.dll")] static extern int close_PDF(String n, String n1);
private void button1_Click(object sender, EventArgs e)
{
if (open_PDF("temp_name") == 0)
{
add_TIFF("image1.tif");
add_TIFF("image2.tif");
close_PDF("temp_name", "image.pdf");
}
}
Delphi code sample:
function open_PDF(tmp_namefile:PChar):integer;cdecl; external 'tif2pdf.dll' name 'open_PDF';
function close_PDF(tmp_namefile,pdf_namefile:PChar):integer;cdecl ; external 'tif2pdf.dll' name 'close_PDF';
function add_TIFF(tiff_namefile:PChar):integer;cdecl ; external 'tif2pdf.dll' name 'add_TIFF';
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if open_PDF('temp_pdf')=0 then
begin
add_TIFF('image1.tif');
add_TIFF('image2.tif');
close_PDF('temp_pdf','image.pdf');
end;
end;
All these samples are also available in installer program, they will be located in example.zip file after installation.
TIFF to PDF:
This easy-to-use software allows you to convert several TIFF files into one PDF file.
The program converts one or many TIFF files to one PDF file, including multiple page TIFF files,
tiled TIFF files, black and white. grayscale, and color TIFF files that contain data of TIFF photometric interpretations of bilevel, grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by libtiff and PDF.
Available in user-interactive (GUI), Command-line and DLL versions.
Support Windows 2000, 2003, 2008, XP and Vista.( 32 & 64 bit )
Also you can use tif2pdf.dll in your programs.
Here sample code for C++, Delphi and C#
C++ code sample:
typedef int ( *PFN_open_PDF)(const char *); PFN_open_PDF open_PDF;
typedef int ( *PFN_close_PDF)(const char *,const char *); PFN_close_PDF close_PDF;
typedef int ( *PFN_add_TIFF)(const char *); PFN_add_TIFF add_TIFF;
HINSTANCE hDll;
void LoadDll()
{
hDll=LoadLibrary(_T("tif2pdf.dll"))
if(hDll)
{ open_PDF=(PFN_open_PDF)GetProcAddress(hDll,"open_PDF");
add_TIFF=(PFN_add_TIFF)GetProcAddress(hDll,"add_TIFF");
close_PDF=(PFN_close_PDF)GetProcAddress(hDll,"close_PDF");
}
}
int OpenPDF(const char *n)
{
if (open_PDF)
return (*open_PDF)(n);
else
return -1;
}
int AddTIFF(const char *n)
{
if (add_TIFF)
return (*add_TIFF)(n);
else
return -1;
}
int ClosePDF(const char *n,const char *n1)
{
if (close_PDF)
return (*close_PDF)(n,n1);
else
return -1;
}
int _tmain(int argc, _TCHAR* argv[])
{
LoadDll();
if (OpenPDF("tmp_image")== 0){
AddTIFF("image1.tif");
AddTIFF("image2.tif");
ClosePDF("tmp_image","image.pdf");
}
if (hDll!=NULL) FreeLibrary(hDll);
return 0;
}
C# code sample:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("tif2pdf.dll")] static extern int open_PDF(String n);
[DllImport("tif2pdf.dll")] static extern int add_TIFF(String n);
[DllImport("tif2pdf.dll")] static extern int close_PDF(String n, String n1);
private void button1_Click(object sender, EventArgs e)
{
if (open_PDF("temp_name") == 0)
{
add_TIFF("image1.tif");
add_TIFF("image2.tif");
close_PDF("temp_name", "image.pdf");
}
}
Delphi code sample:
function open_PDF(tmp_namefile:PChar):integer;cdecl; external 'tif2pdf.dll' name 'open_PDF';
function close_PDF(tmp_namefile,pdf_namefile:PChar):integer;cdecl ; external 'tif2pdf.dll' name 'close_PDF';
function add_TIFF(tiff_namefile:PChar):integer;cdecl ; external 'tif2pdf.dll' name 'add_TIFF';
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if open_PDF('temp_pdf')=0 then
begin
add_TIFF('image1.tif');
add_TIFF('image2.tif');
close_PDF('temp_pdf','image.pdf');
end;
end;
All these samples are also available in installer program, they will be located in example.zip file after installation.

