GroupDocs.Viewer provides additional information for PDF documents when calling getViewInfo() method. To retrieve view information for PDF document call getViewInfo() method and cast output result to PdfViewInfo type.
Following example demonstrates how to retrieve view information for PDF document.
try(Viewerviewer=newViewer("sample.pdf")){ViewInfoOptionsviewInfoOptions=ViewInfoOptions.forHtmlView();PdfViewInfoviewInfo=(PdfViewInfo)viewer.getViewInfo(viewInfoOptions);System.out.println("Document type is: "+viewInfo.getFileType());System.out.println("Pages count: "+viewInfo.getPages().size());System.out.println("Printing allowed: "+viewInfo.isPrintingAllowed());}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.