Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to One Click File Save as .pdf ?

238 views
Skip to first unread message

niladrichatterjee

unread,
Oct 21, 2009, 8:07:00 PM10/21/09
to
Using PB 11.5 and Windows XP o/s.
Following my codes are and want to save as .PDF. We have
Adobe Writer 6.0. The Problem is the user has to Specify the
file name each time for SaveAs() to create a .pdf.
Otherwise, it creates the .pdf with 0 bites...!!

Please note I am supplying the File Name with path to
SaveAs()

How can I save as .pdf on one click (without user to specify
the file name) ???

with the dw_17.Print() function, it open the .pdf file but
user has to type the file name and specify the save
location.
How can it be one click save to a .pdf file.

My Save as .pdf button's clicled event code:-

int li_ret, ll_row
String ls_con_cde, ls_file_nm

tab_1.tabpage_17.dw_17.AcceptText()

//Get the Order No.
ll_row = tab_1.tabpage_17.dw_17.GetRow()
ls_con_cde = tab_1.tabpage_17.dw_17.GetItemString(ll_row,
"con_cde")
ls_file_nm = "R:\PDFS\VCI-CERT\" + ls_con_cde + ".pdf"

//Save as PDF
tab_1.tabpage_17.dw_17.Object.DataWindow.Export.PDF.Method =
Distill!
tab_1.tabpage_17.dw_17.Object.DataWindow.Printer = "Adobe
PDF"
tab_1.tabpage_17.dw_17.Object.DataWindow.Export.PDF.Distill.CustomPostScript="Yes"

tab_1.tabpage_17.dw_17.SetRedraw(TRUE)
li_ret = tab_1.tabpage_17.dw_17.SaveAs(ls_file_nm, PDF!,
TRUE)
tab_1.tabpage_17.dw_17.Print()

Jerry Siegel [TeamSybase]

unread,
Oct 22, 2009, 2:48:57 AM10/22/09
to
That would be a part of Acrobat? I'm pretty sure it's a printer driver,
since you can print() the DW to it and create a PDF.
PB SaveAs uses GhostScript, an open source tool.
http://pages.cs.wisc.edu/~ghost/ Because of licensing considerations, you
must download and install it independently.
See the HTML book (in your Help) PowerBuilder Users Guide, Chapter 19,
Saving data in an external file for all the details.

--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement


<NILADRI CHATTERJEE> wrote in message
news:4adfa224.220...@sybase.com...

0 new messages