Dim gdpicturePDF As New GdPicturePDF()
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
Dim count As Integer = gdpicturePDF.GetPageCount()
Dim status As GdPictureStatus = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
If count > 0 Then
status = gdpicturePDF.SelectPage(1)
Else
status = GdPictureStatus.InvalidParameter
End If
If status = GdPictureStatus.OK Then
Dim oGdPictureNewPDF As New GdPicturePDF()
status = oGdPictureNewPDF.NewPDF()
If status = GdPictureStatus.OK Then
status = gdpicturePDF.FlipPage(True, False)
If status = GdPictureStatus.OK Then
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1)
If status = GdPictureStatus.OK Then
status = gdpicturePDF.FlipPage(False, True)
If status = GdPictureStatus.OK Then
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1)
If status = GdPictureStatus.OK Then
status = gdpicturePDF.FlipPage(True, True)
If status = GdPictureStatus.OK Then
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1)
If status = GdPictureStatus.OK Then
status = gdpicturePDF.FlipPage(False, False)
If status = GdPictureStatus.OK Then
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1)
If status = GdPictureStatus.OK Then
status = oGdPictureNewPDF.SaveToFile("test_FlipPage.pdf")
If status = GdPictureStatus.OK Then
MessageBox.Show("The example HAS been followed successfully.", "Example: FlipPage")
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
oGdPictureNewPDF.Dispose()
End If
End If
If status <> GdPictureStatus.OK Then
MessageBox.Show("The example HAS NOT been followed successfully. The last error status is: " + status.ToString(), "Example: FlipPage")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: FlipPage")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
int count = gdpicturePDF.GetPageCount();
GdPictureStatus status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
{
if (count > 0)
status = gdpicturePDF.SelectPage(1);
else
status = GdPictureStatus.InvalidParameter;
if (status == GdPictureStatus.OK)
{
GdPicturePDF oGdPictureNewPDF = new GdPicturePDF();
status = oGdPictureNewPDF.NewPDF();
if (status == GdPictureStatus.OK)
{
status = gdpicturePDF.FlipPage(true, false);
if (status == GdPictureStatus.OK)
{
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1);
if (status == GdPictureStatus.OK)
{
status = gdpicturePDF.FlipPage(false, true);
if (status == GdPictureStatus.OK)
{
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1);
if (status == GdPictureStatus.OK)
{
status = gdpicturePDF.FlipPage(true, true);
if (status == GdPictureStatus.OK)
{
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1);
if (status == GdPictureStatus.OK)
{
status = gdpicturePDF.FlipPage(false, false);
if (status == GdPictureStatus.OK)
{
status = oGdPictureNewPDF.ClonePage(gdpicturePDF, 1);
if (status == GdPictureStatus.OK)
{
status = oGdPictureNewPDF.SaveToFile("test_FlipPage.pdf");
if (status == GdPictureStatus.OK)
MessageBox.Show("The example HAS been followed successfully.", "Example: FlipPage");
}
}
}
}
}
}
}
}
}
oGdPictureNewPDF.Dispose();
}
}
if (status != GdPictureStatus.OK)
MessageBox.Show("The example HAS NOT been followed successfully. The last error status is: " + status.ToString(), "Example: FlipPage");
}
else
MessageBox.Show("The file can't be loaded.", "Example: FlipPage");
gdpicturePDF.Dispose();