Using gdpictureDocumentConverter As New GdPictureDocumentConverter()
Dim status As GdPictureStatus = gdpictureDocumentConverter.LoadFromFile("drawing.pdf", GdPicture14.DocumentFormat.DocumentFormatPDF)
If status = GdPictureStatus.OK Then
Dim oFileStream As New System.IO.FileStream("drawing_stream.svg", System.IO.FileMode.Create)
status = gdpictureDocumentConverter.SaveAsSVG(oFileStream)
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
oFileStream.Dispose()
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("drawing.pdf", GdPicture14.DocumentFormat.DocumentFormatPDF);
if (status == GdPictureStatus.OK)
{
System.IO.FileStream oFileStream = new System.IO.FileStream("drawing_stream.svg");
status = gdpictureDocumentConverter.SaveAsSVG(oFileStream);
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");
}
oFileStream.Dispose();
}
else
{
MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture");
}
}