Example





In This Topic
GdPicture14 Namespace / GdPictureDocumentConverter Class / SpreadsheetMaximumPageHeight Property

SpreadsheetMaximumPageHeight Property (GdPictureDocumentConverter)

In This Topic
Specifies the maximum page height in millimeters. A value of zero or less indicates no height limitation.
Syntax
'Declaration

 

Public Property SpreadsheetMaximumPageHeight As Single
public float SpreadsheetMaximumPageHeight {get; set;}
public read-write property SpreadsheetMaximumPageHeight: Single; 
public function get,set SpreadsheetMaximumPageHeight : float
public: __property float get_SpreadsheetMaximumPageHeight();

public: __property void set_SpreadsheetMaximumPageHeight( 

   float value

);
public:

property float SpreadsheetMaximumPageHeight {

   float get();

   void set (    float value);

}

Property Value

The default value is 2800.
Example
Loading and converting a .xlsx with SpreadsheetMaximumPageWidth and SpreadsheetMaximumPageHeight set to 4000.
Using gdpictureDocumentConverter As New GdPictureDocumentConverter()

    gdpictureDocumentConverter.SpreadsheetMaximumPageWidth = 4000

    gdpictureDocumentConverter.SpreadsheetMaximumPageHeight = 4000

    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.SpreadsheetMaximumPageWidth = 4000;

    gdpictureDocumentConverter.SpreadsheetMaximumPageHeight = 4000;

    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");

    }

}
Example
Loading and converting a .xlsx with SpreadsheetMaximumPageWidth and SpreadsheetMaximumPageHeight set to 4000. Using gdpictureDocumentConverter As New GdPictureDocumentConverter() gdpictureDocumentConverter.SpreadsheetMaximumPageWidth = 4000 gdpictureDocumentConverter.SpreadsheetMaximumPageHeight = 4000 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.SpreadsheetMaximumPageWidth = 4000; gdpictureDocumentConverter.SpreadsheetMaximumPageHeight = 4000; 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"); } }
See Also