Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Determining the DPI of the Canvas?
  FAQ FAQ  Forum Search   Register Register  Login Login

Determining the DPI of the Canvas?

 Post Reply Post Reply
Author
Message
stevemaughan View Drop Down
Beginner
Beginner


Joined: 08 Oct 14
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevemaughan Quote  Post ReplyReply Direct Link To This Post Topic: Determining the DPI of the Canvas?
    Posted: 08 Oct 14 at 1:11PM
Hi - 

I'd like to draw a map as a PDF file. This will require a lot of vector graphics. To do this I need to know the resolution of the canvas (e.g. pixels per inch). Or I need to set the resolution of the canvas. Is this possible? If so, how can I do it?

Thanks,

Steve
Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post Posted: 08 Oct 14 at 3:06PM
You pick the dpi yourself when you RenderPageToDC (or DARenderPageToDC). It is one of the parameters:

int DPLDARenderPageToDC(int InstanceID, int FileHandle, int PageRef,  double DPI, HDC DC);

Maybe I misunderstood. You want to know what value to supply. Look at the response to
Previewing a PDF before Saving?

This shows the appropriate calculations to create a device context with the correct dpi


Edited by erico - 08 Oct 14 at 3:15PM
Back to Top
stevemaughan View Drop Down
Beginner
Beginner


Joined: 08 Oct 14
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevemaughan Quote  Post ReplyReply Direct Link To This Post Posted: 08 Oct 14 at 3:20PM
Wonderful!

Many thanks,

Steve
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 09 Oct 14 at 2:43PM
btw.
this is described here:

http://www.debenu.com/kb/map-pdf-coordinates-delphi-graphics-canvas-coordinates/



Edited by mLipok - 09 Oct 14 at 2:46PM
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
stevemaughan View Drop Down
Beginner
Beginner


Joined: 08 Oct 14
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevemaughan Quote  Post ReplyReply Direct Link To This Post Posted: 09 Oct 14 at 2:47PM
Thanks - looks like a great article!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store