1. Ong Chin Keat
  2. PowerBuilder
  3. Tuesday, 27 August 2024 09:45 AM UTC

hi all,

 

I need to set specific paper size 12.50cm x 18.95cm at datawindow object. But I can't find any customization available. Any alternative way to do so ?

 

 

regards,

Dev Ong

Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Tuesday, 27 August 2024 10:39 AM UTC
  2. PowerBuilder
  3. # 1

https://docs.appeon.com/pb2022/datawindow_reference/XREF_91740_Print_property.html

 

You can set Datawindow.Print.PageSize to 256 to set custom page sizes.

 

dw1.Modify("DataWindow.Print.Paper.Size=256")
//18.9 centimeters long
dw1.Modify("DataWindow.Print.CustomPage.Length=189")
//12.5 centimeters wide
dw1.Modify("DataWindow.Print.CustomPage.Width=125") 

The values are in mm for Size=256, not sure if you can set half a mm of precision here but probably not.

Comment
  1. Ong Chin Keat
  2. Wednesday, 28 August 2024 02:26 AM UTC
Thanks Benjamin, it's work perfectly. regards, ong.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 27 August 2024 13:33 PM UTC
  2. PowerBuilder
  3. # 2

When the DW Units property is set to "centimeters" (property value = 3), the unit of measure is actually 1/1000th  of a logical centimeter, so 18.95cm would be expressed as 18950. Similarly, "inches" are expressed in units of 1/1000th of a logical inch.

Best regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.