Print Page | Close Window

How to Get Current Measurement Units

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=277
Printed Date: 17 May 24 at 5:29AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to Get Current Measurement Units
Posted By: jabaltie
Subject: How to Get Current Measurement Units
Date Posted: 20 Jan 06 at 8:29AM
I'd like to retrieve Current Measurement Units but I've seen that there is no function "GetMeasurementUnits".

Why is that ? Is it really missing or there is another way to get such value ?




Replies:
Posted By: StanMarshall
Date Posted: 20 Jan 06 at 6:02PM

hmmm...it does seem strange that there is no GetMeasurementUnits, but there definitely doesn't seem to be.

One idea might be to set the paper size and then get the PageWidth and/or PageHeight. For example, if you set the paper size to letter and PageWidth is 8.5, you know it the current measurement units is inches. If it is 612, you know it is in points. If it is 215.9, you know it is millimeters.

(I'm not sure if these values work out exactly...the specified width in millimeters of letter sized page might be 216. You could maybe test for a range or something to be safe.)

I've never actually tried this, but I think it would work.

Good luck!

Stan

 



Posted By: Ingo
Date Posted: 21 Jan 06 at 7:44AM
Hi!

I don't think that's a problem.
Why you want to know such things?
The answer: You want to know it to control if it's okay...
The set-function is small and don't need performance - so set the measurement-units you need and that's it ;-)

Best regards,
Ingo


Posted By: Ingo
Date Posted: 21 Jan 06 at 7:45AM
I forgot:
You can't find this value inside the document. I think it's a helping value for the functions you're using after setmeasure...
Best regards,
Ingo



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk