1. Herry Ng
  2. PowerBuilder
  3. Thursday, 13 December 2018 04:56 AM UTC

Hi All, 

I would like to automatic the printing process. I would like to program when user click print, it will automatic select native PDF printer and automatically save to a network folder as pdf file 

is it possible to do in it PB 2017 ? if so how should I code ? 

 

 

Shenn Sellers Accepted Answer Pending Moderation
  1. Thursday, 13 December 2018 17:44 PM UTC
  2. PowerBuilder
  3. # 1

After setting the INI file, I just do the following...

//Customorientation of 0 means use DW setting
dw_report.Modify("DataWindow.Export.PDF.Method = NativePDF! DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'" &
+ " DataWindow.Export.PDF.NativePDF.customorientation='0' DataWindow.Export.PDF.NativePDF.ImageFormat = '1' " &
+ "DataWindow.Export.PDF.NativePDF.PDFStandard = '0'")

li_ret = dw_report.SaveAs("[NETWORK FOLDER GOES HERE]", PDF!, true)

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 December 2018 14:51 PM UTC
  2. PowerBuilder
  3. # 2

Hi Herry;

  The easiest way with no programming is to:

1) Create your own PB.INI ( ie: Notepad )

2) Add the following to the INI ...

[Data Window]
; 1 = Use Native, 0 = GhostScript or XLSFO
NativePDF_Valid=1
; 1 = Embed fonts in PDF, 0 = Do not embed fonts in PDF
NativePDF_IncludeCustomFont=1

3) Deploy your PB.INI with your App's EXE

HTH

Regards ... Chris

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.