Using gdpictureDocumentConverter As New GdPictureDocumentConverter()
gdpictureDocumentConverter.SpreadsheetMaximumContentWidthPerSheet = 0
gdpictureDocumentConverter.SpreadsheetMaximumContentHeightPerSheet = 0
Dim status As GdPictureStatus = gdpictureDocumentConverter.LoadFromFile("test_xlsx.xlsx", GdPicture14.DocumentFormat.DocumentFormatXLSX)
If status = GdPictureStatus.OK Then
MessageBox.Show("The file has been loaded successfully.", "GdPicture")
status = gdpictureDocumentConverter.SaveAsPDF("Converted.pdf", PdfConformance.PDF)
If status = GdPictureStatus.OK Then
MessageBox.Show("The file has been saved successfully.", "GdPicture")
Else
MessageBox.Show("Failed to save file. Status: " + status.ToString(), "GdPicture")
End If
Else
MessageBox.Show("Failed to load file. Status: " + status.ToString(), "GdPicture")
End If
End Using
using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())
{
gdpictureDocumentConverter.SpreadsheetMaximumContentWidthPerSheet = 0;
gdpictureDocumentConverter.SpreadsheetMaximumContentHeightPerSheet = 0;
GdPictureStatus status = gdpictureDocumentConverter.LoadFromFile("test_xlsx.xlsx", GdPicture14.DocumentFormat.DocumentFormatXLSX);
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The file has been loaded successfully.", "GdPicture");
status = gdpictureDocumentConverter.SaveAsPDF("Converted.pdf", PdfConformance.PDF);
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The file has been saved successfully.", "GdPicture");
}
else
{
MessageBox.Show("Failed to save file. Status: " + status.ToString(), "GdPicture");
}
}
else
{
MessageBox.Show("Failed to load file. Status: " + status.ToString(), "GdPicture");
}
}