I am using PB.11.2 and I am trying to export an A4 size data window report into pdf file . After exporting the layout is going to different layout than the layout in print preview. Please can you advise me how to fix this issue .
The following is my script.
dw_1.Object.DataWindow.Export.PDF.Method = Distill!
dw_1.Object.DataWindow.Printer = 'CutePDF Writer'
li_ret = dw_1.SaveAs(ls_attach, PDF!, true)