SpreadsheetRenderOnlyPrintArea Property (GdPictureDocumentConverter)
For spreadsheet, specifies that for each sheets only the print areas must be rendered.
If no print area are found the whole sheets will be rendered
public bool SpreadsheetRenderOnlyPrintArea {get; set;}
public read-write property SpreadsheetRenderOnlyPrintArea: Boolean;
public function get,set SpreadsheetRenderOnlyPrintArea : boolean
public: __property bool get_SpreadsheetRenderOnlyPrintArea();
public: __property void set_SpreadsheetRenderOnlyPrintArea(
bool value
);
public:
property bool SpreadsheetRenderOnlyPrintArea {
bool get();
void set ( bool value);
}
'Declaration
Public Property SpreadsheetRenderOnlyPrintArea As Boolean
Property Value
The default value is false.
Loading and converting a .xlsx with SpreadsheetRenderOnlyPrintArea enabled.
Using gdpictureDocumentConverter As New GdPictureDocumentConverter()
gdpictureDocumentConverter.SpreadsheetRenderOnlyPrintArea = True
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("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())
{
gdpictureDocumentConverter.SpreadsheetRenderOnlyPrintArea = true;
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("The file has failed to save. Status: " + status.ToString(), "GdPicture");
}
}
else
{
MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture");
}
}