Get document information

The PDF Viewer allows you to access the filename and file path of the loaded PDF document.

Refer to the following code example to access the filename.

//Initialize the PDF Viewer

PdfViewerControl pdfViewer = new PdfViewerControl();

//Loads the PDF document in PDF Viewer

pdfViewer.Load(@"input.pdf");

//Gets the filename of loaded PDF document

string fileName = pdfViewer.DocumentInformation.FileName;
'Initialize the PDF Viewer 

pdfViewer As New PdfViewerControl() 

'Loads the PDF document in PDF Viewer 

pdfViewer.Load("../../Data/Barcode.pdf")

'Gets the filename of loaded PDF document

Dim fileName As String = pdfViewer.DocumentInformation.FileName

Refer to the following code example to access the file path.

//Initialize the PDF Viewer

PdfViewerControl pdfViewer = new PdfViewerControl();

//Loads the PDF document in PDF Viewer

pdfViewer.Load(@"input.pdf");

//Gets the file path of loaded PDF document

string filePath = pdfViewer.DocumentInformation.FilePath;
'Initialize the PDF Viewer 

pdfViewer As New PdfViewerControl() 

'Loads the PDF document in PDF Viewer 

pdfViewer.Load("../../Data/Barcode.pdf")

'Gets the file path of loaded PDF document

Dim filePath As String = pdfViewer.DocumentInformation.FilePath