void OpenSaveAppendImages(string imageFile1, string imageFile2, string pdfFileOut)
{
CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
CiImage Image = ci.CreateImage();
// Create PDF file with image from the first file
Image.Open(imageFile1, 1);
Image.SaveAs(pdfFileOut, EFileFormat.cifPDF);
// Append to PDF file image from the second file
Image.Open(imageFile2, 1);
Image.Append(pdfFileOut, EFileFormat.cifPDF);
// Open PDF page and show image information
Image.Open(pdfFileOut, 2);
ShowImageInfo(Image);
// Close image
Image.Close();
}
void ShowImageInfo(CiImage Image)
{
Console.WriteLine(" File='" + Image.FileName + "'" + " Page=" + Image.PageNumber + " PageCount=" + Image.PageCount + " Format=" + Image.Format);
Console.WriteLine(" Width=" + Image.Width + " Height=" + Image.Height + " BPP=" + Image.BitsPerPixel + " HorzDpi=" + Image.HorzDpi + " VertDpi=" + Image.VertDpi);
}
Sub OpenSaveAppendImages(imageFile1 As String, imageFile2 As String, pdfFileOut As String)
Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
Dim Image As CiImage = ci.CreateImage()
' Create PDF file with image from the first file
Image.Open(imageFile1, 1)
Image.SaveAs(pdfFileOut, EFileFormat.cifPDF)
' Append to PDF file image from the second file
Image.Open(imageFile2, 1)
Image.Append(pdfFileOut, EFileFormat.cifPDF)
' Open PDF page and show image information
Image.Open(pdfFileOut, 2)
ShowImageInfo(Image)
' Close image
Image.Close()
End Sub
Sub ShowImageInfo(Image As CiImage)
Console.WriteLine(" File='" + Image.FileName + "'" + " Page=" + Image.PageNumber + " PageCount=" + Image.PageCount + " Format=" + Image.Format)
Console.WriteLine(" Width=" + Image.Width + " Height=" + Image.Height + " BPP=" + Image.BitsPerPixel + " HorzDpi=" + Image.HorzDpi + " VertDpi=" + Image.VertDpi)
End Sub