Using gdpictureDocumentConverter As GdPictureDocumentConverter = New GdPictureDocumentConverter()
Dim status As GdPictureStatus = gdpictureDocumentConverter.LoadFromFile("input.tif", GdPicture14.DocumentFormat.DocumentFormatTIFF)
If status = GdPictureStatus.OK Then
MessageBox.Show("The file has been loaded successfully.", "GdPicture")
'Set the required compression parameter here.
gdpictureDocumentConverter.PdfBitonalImageCompression = PdfCompression.PdfCompressionCCITT4
status = gdpictureDocumentConverter.SaveAsPDF("output.pdf", PdfConformance.PDF)
If status = GdPictureStatus.OK Then
MessageBox.Show("The file has been saved successfully.", "GdPicture")
Else
MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture")
End If
Else
MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture")
End If
End Using
using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())
{
GdPictureStatus status = gdpictureDocumentConverter.LoadFromFile("input.tif", GdPicture14.DocumentFormat.DocumentFormatTIFF);
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The file has been loaded successfully.", "GdPicture");
//Set the required compression parameter here.
gdpictureDocumentConverter.PdfBitonalImageCompression = PdfCompression.PdfCompressionCCITT4;
status = gdpictureDocumentConverter.SaveAsPDF("output.pdf", PdfConformance.PDF);
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The file has been saved successfully.", "GdPicture");
}
else
{
MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture");
}
}
else
{
MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture");
}
}