-
Nov 28th, 2013, 03:35 AM
#1
Get dimensions from paper kind???
There seems to be no reliable way to get paper dimensions from the paper kind ... I have looked for about an hour online ... but all methods seem to use either the PrinterSettings or PrintDocument. The problem with using these is that they will only work for page sizes that your printer supports!
... so unless you have an A1 printer ... you won't be able to work out the paper dimensions by using this method..
Is there a better way?...
I noticed that there was a private method in the built in paper size (look here under "private Point Dimensions")
... but I tried to call it using reflection and it seems to be removed in the later versions of .net altogether (not surprising since Microsofts comment is: "I don't think we need this anymore")
How crazy is this WE NEED THIS!
Any ideas?
Thanks in advance,
Kris
-
Nov 28th, 2013, 07:22 AM
#2
Re: Get dimensions from paper kind???
-
Nov 28th, 2013, 07:31 AM
#3
Re: Get dimensions from paper kind???
Why not copy-paste the Select Case statement from the code you linked to? I'm sure it's more comprehensive than anything that would have been built into the Framework.
I suppose it's inevitable that the Framework avoids cluttering itself up with "external" information: not because of the space, but because of the implicit need to keep it up to date. After all, it doesn't even contain an enumeration of Windows Messages, does it.
BB
-
Nov 28th, 2013, 07:43 AM
#4
Re: Get dimensions from paper kind???
I think the constants are in the PrintJob.vb code
-
Nov 28th, 2013, 07:44 PM
#5
Re: Get dimensions from paper kind???
Originally Posted by boops boops
Why not copy-paste the Select Case statement from the code you linked to? I'm sure it's more comprehensive than anything that would have been built into the Framework.
I suppose it's inevitable that the Framework avoids cluttering itself up with "external" information: not because of the space, but because of the implicit need to keep it up to date. After all, it doesn't even contain an enumeration of Windows Messages, does it .
BB
That's what I ended up doing ... but it still seems like something that should be built in IMHO
Kris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|