'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
'Annotate your document.
If GdViewer1.BurnAnnotationsToPage(True) = GdPictureStatus.OK Then
Dim oFileStream As System.IO.FileStream = New System.IO.FileStream("myimage.tif", System.IO.FileMode.Create)
If GdViewer1.SaveDocumentToTIFF(oFileStream, TiffCompression.TiffCompressionAUTO) = GdPictureStatus.OK Then
MessageBox.Show("Done!", "GdViewer.SaveDocumentToTIFF")
Else
MessageBox.Show("The file can't be saved. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveDocumentToTIFF")
End If
oFileStream.Dispose()
Else
MessageBox.Show("Annotations can't be burned. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveDocumentToTIFF")
End If
Else
MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveDocumentToTIFF")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
//Annotate your document.
if (GdViewer1.BurnAnnotationsToPage(true) == GdPictureStatus.OK)
{
System.IO.FileStream oFileStream = new System.IO.FileStream("myimage.tif", System.IO.FileMode.Create);
if (GdViewer1.SaveDocumentToTIFF(oFileStream, TiffCompression.TiffCompressionAUTO) == GdPictureStatus.OK)
MessageBox.Show("Done!", "GdViewer.SaveDocumentToTIFF");
else
MessageBox.Show("The file can't be saved. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveDocumentToTIFF");
oFileStream.Dispose();
}
else
MessageBox.Show("Annotations can't be burned. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveDocumentToTIFF");
}
else
MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveDocumentToTIFF");