Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How can I save as .pdf on one click ?

6 posts in DataWindow Last posting was on 2009-10-23 03:32:04.0Z
NILADRI CHATTERJEE Posted on 2009-10-21 16:41:10.0Z
Sender: 1121.4adf34ba.1804289383@sybase.com
From: NILADRI CHATTERJEE
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: How can I save as .pdf on one click ?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4adf39a6.1217.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Oct 2009 09:41:10 -0700
X-Trace: forums-1-dub 1256143270 10.22.241.41 (21 Oct 2009 09:41:10 -0700)
X-Original-Trace: 21 Oct 2009 09:41:10 -0700, 10.22.241.41
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90113
Article PK: 409715

Following my codes are and want to save as .PDF. We have
Adobe Writer 6.0. The Problem is the used has to Specify the
file name each time for SaveAs() to create a .pdf.
Otherwise, it creates the .pdf with 0 bites...!!

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

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()


Scott Morris Posted on 2009-10-21 19:08:03.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4adf39a6.1217.1681692777@sybase.com>
Subject: Re: How can I save as .pdf on one click ?
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4adf5c13$1@forums-1-dub>
Date: 21 Oct 2009 12:08:03 -0700
X-Trace: forums-1-dub 1256152083 10.22.241.152 (21 Oct 2009 12:08:03 -0700)
X-Original-Trace: 21 Oct 2009 12:08:03 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90115
Article PK: 409719


<NILADRI CHATTERJEE> wrote in message
news:4adf39a6.1217.1681692777@sybase.com...
> Following my codes are and want to save as .PDF. We have
> Adobe Writer 6.0. The Problem is the used has to Specify the
> file name each time for SaveAs() to create a .pdf.
> Otherwise, it creates the .pdf with 0 bites...!!

Did you install Ghostscript? You might also want to review all the other
(rather frequent) posts about PDF generation to see if there is anything
useful. For future reference, you should always indicate which version and
build of PB you are using.


NILADRI CHATTERJEE Posted on 2009-10-21 23:56:34.0Z
Sender: 2127.4adf9df4.1804289383@sybase.com
From: NILADRI CHATTERJEE
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: How can I save as .pdf on one click ?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4adf9fb2.21a6.1681692777@sybase.com>
References: <4adf5c13$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Oct 2009 16:56:34 -0700
X-Trace: forums-1-dub 1256169394 10.22.241.41 (21 Oct 2009 16:56:34 -0700)
X-Original-Trace: 21 Oct 2009 16:56:34 -0700, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90125
Article PK: 409728

Using PB 11.5. Windows XP o/s. Ca it be done using Adobe
Writer 6.0? Why SaveAs() creates a .pdf file with 0 bites?
if I call dw_1.Print() only it will create a valid pdf file
but user has to specify a file name to save it.

My objective is to Auto save with the file name I am
providing.

-niladri

> <NILADRI CHATTERJEE> wrote in message
> news:4adf39a6.1217.1681692777@sybase.com...
> > Following my codes are and want to save as .PDF. We have
> > Adobe Writer 6.0. The Problem is the used has to Specify
> > the file name each time for SaveAs() to create a .pdf.
> > Otherwise, it creates the .pdf with 0 bites...!!
>
> Did you install Ghostscript? You might also want to
> review all the other (rather frequent) posts about PDF
> generation to see if there is anything useful. For
> future reference, you should always indicate which version
> and build of PB you are using.
>
>


Scott Morris Posted on 2009-10-22 14:26:13.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4adf5c13$1@forums-1-dub> <4adf9fb2.21a6.1681692777@sybase.com>
Subject: Re: How can I save as .pdf on one click ?
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ae06b85$1@forums-1-dub>
Date: 22 Oct 2009 07:26:13 -0700
X-Trace: forums-1-dub 1256221573 10.22.241.152 (22 Oct 2009 07:26:13 -0700)
X-Original-Trace: 22 Oct 2009 07:26:13 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90127
Article PK: 409737


<NILADRI CHATTERJEE> wrote in message
news:4adf9fb2.21a6.1681692777@sybase.com...
> Using PB 11.5. Windows XP o/s. Ca it be done using Adobe
> Writer 6.0? Why SaveAs() creates a .pdf file with 0 bites?

Read the documentation. Most likely, you did not install the requirement
software.

> if I call dw_1.Print() only it will create a valid pdf file
> but user has to specify a file name to save it.

AFAIK, PB does not have any builtin features to support this. Perhaps you
should post your question to an Adobe forum. But you don't need to if you
use the saveas function and install the appropriate software.


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-10-22 06:50:10.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4adf39a6.1217.1681692777@sybase.com>
Subject: Re: How can I save as .pdf on one click ?
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ae000a2@forums-1-dub>
Date: 21 Oct 2009 23:50:10 -0700
X-Trace: forums-1-dub 1256194210 10.22.241.152 (21 Oct 2009 23:50:10 -0700)
X-Original-Trace: 21 Oct 2009 23:50:10 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90126
Article PK: 409734

I answered this in the powerscript section. Please don't cross-post.

--
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:4adf39a6.1217.1681692777@sybase.com...
> Following my codes are and want to save as .PDF. We have
> Adobe Writer 6.0. The Problem is the used has to Specify the
> file name each time for SaveAs() to create a .pdf.
> Otherwise, it creates the .pdf with 0 bites...!!
>
> How can I save as .pdf on one click (without user to specify
> the file name) ???
>
> 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()


Arthur Hefti Posted on 2009-10-23 03:32:04.0Z
From: "Arthur Hefti" <arthur@catsoft.ch>
Subject: Re: How can I save as .pdf on one click ?
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4adf39a6.1217.1681692777@sybase.com>
User-Agent: XanaNews/1.19.1.194
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ae123b4$1@forums-1-dub>
Date: 22 Oct 2009 20:32:04 -0700
X-Trace: forums-1-dub 1256268724 10.22.241.152 (22 Oct 2009 20:32:04 -0700)
X-Original-Trace: 22 Oct 2009 20:32:04 -0700, vip152.sybase.com
Lines: 48
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90132
Article PK: 409738

Save as PDF wont work without GhostScript but you can either:
1. Print to PDF

PrintSetPrinter( "<Adobeprinterdriver>" )
dw_1.Modify( "DataWindow.Print.Filename = 'Output.pdf'" )
dw.Print()

or 2.
Use CATsoftPDF (http://www.catsoft.ch/catsoftpdf) to create your PDF
from a DataWindow.

Arthur

NILADRI CHATTERJEE wrote:

> Following my codes are and want to save as .PDF. We have
> Adobe Writer 6.0. The Problem is the used has to Specify the
> file name each time for SaveAs() to create a .pdf.
> Otherwise, it creates the .pdf with 0 bites...!!
>
> How can I save as .pdf on one click (without user to specify
> the file name) ???
>
> 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.CustomPost
> Script="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()