We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DPI of loaded document

Thread ID:





124109 May 17,2016 06:42 PM UTC May 18,2016 11:23 AM UTC WinForms 1
Tags: PdfViewer
Asked On May 17, 2016 06:42 PM UTC

How can I query the DPI of an existing PDF document?

Sathish Sivakumar [Syncfusion]
Replied On May 18, 2016 11:23 AM UTC

Hi Bob, 
Thank you for using Syncfusion Products. 
PDF document does not have DPI, since it is a vector format. 
However, we can get the height and width of the PDF document by using the PageSettings of PdfDocument. Please find the below code snippet to get the height and the width of the PDF document using the PageSettings of PdfDocument. 
Code Snippet: 
PdfLoadedDocument ldoc = new PdfLoadedDocument("../../Data/Barcode.pdf"); 
PdfDocument document = new PdfDocument(); 
PdfPageBase page = document.ImportPageRange(ldoc, 0, ldoc.Pages.Count - 1); 
SizeF pageSize=document.PageSettings.Size; 
float height = pageSize.Height; 
float width = pageSize.Width; 
We have also created the simple sample which illustrates the same. Kindly check out the sample from the below link: 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon