Code Samples - Neevia docCreator

Example 9: Convert a TIFF file into PDF - Delphi Copy 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
   procedure convertTIFFtoPDF();
   var
     DC : Variant;
     RVal : Integer;
     docToConvert : String;
   begin
     docToConvert := 'c:\users\public\test.tif';

     try
       DC := CreateOleObject('Neevia.docCreator');
       RVal := DC.ConvertImage(docToConvert, docToConvert + '.pdf');

       If (RVal <> 0) Then
         ShowMessage('Error while converting image!!! Code: '+IntToStr(RVal))
       else
         ShowMessage('Done converting !!!');
     finally
       DC := Unassigned;
     end;
   end;