Get document information
21 Sep 2020 / 1 minute to read
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
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page