in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Page size returned in inches not mm

Last post 05-13-2008 6:25 AM by C1_DaveT. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-12-2008 7:29 PM

    Page size returned in inches not mm

    C1.C1Preview.2.dll - 2.0.20082.50022 Hi, I set the default units to mm: pdocDocument.DefaultUnit = UnitTypeEnum.Mm But this returns a value in inches: pdocDocument.PageLayout.PageSettings.Height.Value So does this: C1PageSettings.GetCurrentLocaleDefaultPaperSize(ldblPageWidth, ldblPageHeight, ldblPageMargin, C1.C1Preview.UnitTypeEnum.Mm) What am I doing wrong? I want to return all page values in mm. Regards, Dale

    Filed under: ,
  • 05-13-2008 6:25 AM In reply to

    Re: Page size returned in inches not mm

    After setting default unit to mm, we can set page height and width in millimeter like this –

    ---------------------------------------------------

    Me.C1PrintDocument1.DefaultUnit = UnitTypeEnum.Mm

     

     Me.C1PrintDocument1.PageLayout.PageSettings.Width = Me.C1PrintDocument1.PageLayout.PageSettings.Width.ConvertUnit(UnitTypeEnum.Mm)

     

     Me.C1PrintDocument1.PageLayout.PageSettings.Height = Me.C1PrintDocument1.PageLayout.PageSettings.Height.ConvertUnit(UnitTypeEnum.Mm)

    -------------------------------------------------------

     

    After this if you check height and width property you will find it in mm.

     

    I hope this helps.

     

    -Dave.

     

     

    <DaleBartlett> wrote in message news:204787@10.0.1.98...

    C1.C1Preview.2.dll - 2.0.20082.50022 Hi, I set the default units to mm: pdocDocument.DefaultUnit = UnitTypeEnum.Mm But this returns a value in inches: pdocDocument.PageLayout.PageSettings.Height.Value So does this: C1PageSettings.GetCurrentLocaleDefaultPaperSize(ldblPageWidth, ldblPageHeight, ldblPageMargin, C1.C1Preview.UnitTypeEnum.Mm) What am I doing wrong? I want to return all page values in mm. Regards, Dale



    http://helpcentral.componentone.com/cs/forums/p/75228/204787.aspx#204787

Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.