Example





In This Topic
GdPicture14 Namespace / GdPicturePDF Class / GetInputFilePath Method

GetInputFilePath Method (GdPicturePDF)

In This Topic
Returns the input file path of your source document, if it has been loaded using the GdPicturePDF.LoadFromFile method.
Syntax
'Declaration

 

Public Function GetInputFilePath() As String
public string GetInputFilePath()
public function GetInputFilePath(): String; 
public function GetInputFilePath() : String;
public: string* GetInputFilePath(); 
public:

String^ GetInputFilePath(); 

Return Value

The input file path of the source document loaded from that file, otherwise an empty string.
Remarks
This method neither performs any security checks nor sets the error status.
Example
How to retrieve the file path of the currently loaded document.
Dim gdpicturePDF As GdPicturePDF = New GdPicturePDF()

If gdpicturePDF.LoadFromFile("D:\\documents\\my_document.pdf", False) = GdPictureStatus.OK Then

    'Do your stuff here.

    Dim filepath As String = gdpicturePDF.GetInputFilePath()

    MessageBox.Show("The input file path is " + filepath, "Example: GetInputFilePath")

Else

    MessageBox.Show("The file can't be loaded. Status: " + gdpicturePDF.GetStat().ToString(), "Example: GetInputFilePath")

End If

gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();

if (gdpicturePDF.LoadFromFile("D:\\documents\\my_document.pdf", false) == GdPictureStatus.OK)

{

    //Do your stuff here.

    string filepath = gdpicturePDF.GetInputFilePath();

    MessageBox.Show("The input file path is " + filepath, "Example: GetInputFilePath");

}

else

{

    MessageBox.Show("The file can't be loaded. Status: " + gdpicturePDF.GetStat().ToString(), "Example: GetInputFilePath");

}

gdpicturePDF.Dispose();
See Also