B4J Question print page layout in landscape

le_toubib

Active Member
Licensed User
Longtime User
hi all ,
i have a page layout set to fit in A4 paper in landscape mode,
how to print it using javaFX8 print ?
thanks
 

stevel05

Expert
Licensed User
Longtime User
You can change it with the dialogs if you're using them. If not, please show the code you are using currently.
 
Upvote 0

le_toubib

Active Member
Licensed User
Longtime User
You can change it with the dialogs if you're using them. If not, please show the code you are using currently.
thanks for replying
i'm not using dialogs

print A4 page:
        Dim PA As Paper
        PA.Initialize()
        PA = Paper_static.A4
        Dim PL As PageLayout
        PL.Initialize()
        PL = pr.CreatePageLayout2(PA, PageOrientation_Static.PORTRAIT, "HARDWARE_MINIMUM")
        Dim PJ As PrinterJob = PrinterJob_Static.CreatePrinterJob2(pr)
        PJ.GetJobSettings.SetCopies(count)
        PJ.GetJobSettings.SetJobName(DateTime.Date(DateTime.Now))
        PJ.PrintPage2(PL, frm.RootPane)
        PJ.EndJob

Rootpane is a landscape A4 page size : 842 x 595
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Have you tried changing PageOrientation_Static.PORTRAIT to PageOrientation_Static.LANDSCAPE ?
 
Upvote 0
Top