This function begins the PDF creation process.
Parameters
| Name | Explanation | 
|---|---|
| PSFSetInfo | Structure (user-defined type) variable that sets the conditions for PDF creation | 
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKPDFEnd function finishes the PDF creation process. After initializing PDFSetInfo, set the appropriate values in its membesr and pass them to this function. PDFSetInfo is also used with the IKPDFAddPage, IKPDFAddImage, IKPDFEndPage, and IKPDFEnd functions. Regarding SAVE_PDF_INFO, see the description of the member variables of SAVE_PDF_INFO in Ik10File.dll, Ik10FileA.dll, Ik10File64.dll, Ik10File64A.dll.
Example Code:
(1)C++Builder/Visual C++
     HANDLE ImageHandle
     SAVE_PDF_INFO PDFSetInfo;
     ImageHandle =
IKFileLoadAsRawData("C:\\PNG\\load.png", NULL, "", "", "");
     if (ImageHandle == 0) return;
     memset(&PDFSetInfo, 0,
sizeof(SAVE_PDF_INFO));
     lstrcpy(PDFSetInfo.OwnerPassword,
"abcd");
     lstrcpy(PDFSetInfo.Application, "PDF
Creation Tool");
     lstrcpy(PDFSetInfo.Author, "Newtone
Corp.");
     PDFSetInfo.EnablePrint = TRUE;
     if (IKPDFStart(&PDFSetInfo) ==
FALSE)
     {
         
IKFreeMemory(ImageHandle);
          return;
     }
     IKPDFAddPage(&PDFSetInfo, "A4", FALSE,
0, 0);
     IKPDFAddImage(&PDFSetInfo,
ImageHandle, 30, 50, 100);
     IKPDFEndPage(&PDFSetInfo);
     IKPDFEnd(&PDFSetInfo,
"C:\\PDF\\save.pdf");
     IKFreeMemory(ImageHandle);
(2)Delphi
     var
          ImageHandle:
THandle;
          PDFSetInfo:
SAVE_PDF_INFO;
     begin
          ImageHandle
:= IKFileLoadAsRawData('C:\PNG\load.png', 0, '', '', '');
          if
(ImageHandle = 0) then Exit;
         
FillChar(PDFSetInfo, SizeOf(PDFSetInfo), 0);
         
StrPCopy(PDFSetInfo.OwnerPassword, 'abcd');
         
StrPCopy(PDFSetInfo.Application, 'PDF Creation Tool);
         
StrPCopy(PDFSetInfo.Author, 'Newtone Corp.');
         
PDFSetInfo.EnablePrint := True;
          if
(IKPDFStart(PDFSetInfo) = False) then
          begin
              
IKFreeMemory(ImageHandle);
              
Exit;
          end;
         
IKPDFAddPage(PDFSetInfo, 'A4', False, 0, 0);
         
IKPDFAddImage(PDFSetInfo, ImageHandle, 30, 50, 100);
         
IKPDFEndPage(PDFSetInfo);
         
IKPDFEnd(PDFSetInfo, 'C:\PDF\save.pdf');
         
IKFreeMemory(ImageHandle);
     end;
(3)Visual Basic
     Dim ImageHandle As Long
     Dim PDFSetInfo As SAVE_PDF_INFO
     ImageHandle =
IKFileLoadAsRawData("C:\PNG\load.png", 0, "", "", "")
     If (ImageHandle = 0) Then Exit Sub
     PDFSetInfo.OwnerPassword = "abcd" &
Chr$(0)
     PDFSetInfo.Application = "PDF Creation
Tool" & Chr$(0)
     PDFSetInfo.Author = "Newtone Corp." &
Chr$(0)
     PDFSetInfo.EnablePrint = True
     If (IKPDFStart(PDFSetInfo) = False)
Then
          Call
IKFreeMemory(ImageHandle)
          Exit Sub
     End If
     Call IKPDFAddPage(PDFSetInfo, "A4", False,
0, 0)
     Call IKPDFAddImage(PDFSetInfo,
ImageHandle, 30, 50, 100)
     Call IKPDFEndPage(PDFSetInfo)
     Call IKPDFEnd(PDFSetInfo,
"C:\PDF\save.pdf")
     Call IKFreeMemory(ImageHandle)