Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Jun 04, 2018 8:59 am

there's advanced information in pdf files using acrobat reader DC.
(pdf producer, version, size, etc)
i want to check this size information( inch, mm ..).
How would I check this?
in spire.pdf, I think that PageSettings.Height and PageSettings.Width methods don't provide exact information.
When replaced and compared with the values provided by these methods, different values are obtained.

kelesym
 
Posts: 12
Joined: Thu Jan 04, 2018 1:42 am

Mon Jun 04, 2018 9:32 am

Dear kelesym,

Thanks for your inquiry.
Please refer to following code:
Code: Select all
            PdfDocument document = new PdfDocument();
            document.LoadFromFile(@"F:\sample.pdf");
            //get the producer
            string producer = document.DocumentInformation.Producer;
            string author =   document.DocumentInformation.Author;
            string title = document.DocumentInformation.Title;
           
            //get the PDF version
            string version = document.FileInfo.Version.ToString();

           //please use this property to get the page size, and the unit is point
           float height =  document.Pages[0].ActualSize.Height;
           float width = document.Pages[0].ActualSize.Width;

Any question, welcome to write back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jun 12, 2018 7:50 am

Dear kelesym,

Greetings from E-iceblue.
How is your issue going now ? Did the code I provided help you solve your issue ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jun 15, 2018 8:59 am

Thank you, it really helped me. have a nice weekend :lol:

kelesym
 
Posts: 12
Joined: Thu Jan 04, 2018 1:42 am

Fri Jun 15, 2018 9:06 am

Dear kelesym,

Thanks for your feedback.
If there is any question, please do not hesitate to contact us.
Have a nice weekend :)

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF