Thread: v11 code in v13
View Single Post
  #5  
Old 26-06-2007, 12:02
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

No, your problem is that you are setting the page size after changing the units of measurements.

Document.PageSizes method is deprecated and should not be used. Instead, you should be using Application.PageSizes. However the page size returned by this will be in units specified by the Application.Units and not Document.Units. As a result, you'll get a Letter page size of 8.5 x 11 because Application.Unit is set to cdrInch. However when you call Page.SetSize they are interpreted as kilometers.

Just set the page size before you change the document units to kilometers.
Reply With Quote