1. Mike S
  2. PowerBuilder
  3. Wednesday, 2 August 2017 18:08 PM UTC
The default for PDF is A4 instead of the using datawindow's defined paper size.  
 
This is some code i put together so that the pdf saves the way you probably expect it to:  it will use settings from the datawindow  
 
ls_size = dw.describe("DataWindow.Print.Paper.Size")
choose case ls_size
  case '0', '1', '2'
    ls_size = '5'  //8.5 X 11
  case '5'
    ls_size = '6' //legal
   
    case '3', '4' // 17" x 11"
       ls_size = '6' //legal
  case '8'
       ls_size = '3' //A3
 
   case '9', '10' //9 – A4 210 x 297 mm
     ls_size = '4' //a4
   case else
     ls_size = '5'  //8.5 X 11 
end choose
 
dw.Modify("DataWindow.Export.PDF.Method = NativePDF! DataWindow.Export.PDF.NativePDF.CustomSize = '" + ls_size + "' DataWindow.Export.PDF.NativePDF.customorientation='0' ")  //customorientation of 0 means use datawindow setting
 
ll_rc = dw.SaveAs (ls_filepath, PDF! , true)
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 2 August 2017 18:28 PM UTC
  2. PowerBuilder
  3. # 1

Does this resolve the quality issue I've been reading about on this forum?

 

Thanks,

Olan

Comment
  1. Mike S
  2. Wednesday, 2 August 2017 20:24 PM UTC
this does not change anything about image quality (jpg etc.) in the pdf.  



The new pdf will lower the resolution/quality of the image, however that is very subjective as to how bad it really is.  If you start with a higher resolution image, then (IMO) the drop down in resolution won't be noticeable when the pdf is printed.  Even a low resolution image may be ok.  I'm leaning towards using the new PDF option even though i expect that most images such as logos are lower resolution and will be noticeable worse.

  1. Helpful
  1. Olan Knight
  2. Wednesday, 2 August 2017 21:16 PM UTC
OK, thanks!

  1. Helpful
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.