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.

open a pdf

9 posts in DataWindow Last posting was on 2009-07-15 13:44:55.0Z
Sharon Posted on 2009-07-09 13:01:06.0Z
Sender: 12ec.4a53457f.1804289383@sybase.com
From: Sharon
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: open a pdf
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a55ea12.2401.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 9 Jul 2009 06:01:06 -0700
X-Trace: forums-3-dub.sybase.com 1247144466 10.22.241.188 (9 Jul 2009 06:01:06 -0700)
X-Original-Trace: 9 Jul 2009 06:01:06 -0700, forums-3-dub.sybase.com
Lines: 3
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89609
Article PK: 418798

any sample code on how to open/view a pdf file in
Powerbuilder.
Using pb 10


Sharon Posted on 2009-07-09 13:49:15.0Z
Sender: 12ec.4a53457f.1804289383@sybase.com
From: Sharon
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: open a pdf, still need help
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a55f55b.2d11.1681692777@sybase.com>
References: <4a55ea12.2401.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 9 Jul 2009 06:49:15 -0700
X-Trace: forums-3-dub.sybase.com 1247147355 10.22.241.188 (9 Jul 2009 06:49:15 -0700)
X-Original-Trace: 9 Jul 2009 06:49:15 -0700, forums-3-dub.sybase.com
Lines: 16
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89610
Article PK: 418797


> any sample code on how to open/view a pdf file in
> Powerbuilder.
> Using pb 11

tried the following
String ls_Null
String ls_Pdf = 'h:\gl.PDF'
long ll

SetNull (ls_Null)
ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
ls_Null, ls_null, 1)
messagebox ( 'code', string(ll ))

got a code of 2 , file not found? however I know the file
is there, if I use fileexists it comes back true.


Jeremy Lakeman Posted on 2009-07-09 15:16:09.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: open a pdf, still need help
Date: Thu, 9 Jul 2009 08:16:09 -0700 (PDT)
Organization: http://groups.google.com
Lines: 19
Message-ID: <d6883d20-5a57-4237-bdff-ae51c38f5c84@v15g2000prn.googlegroups.com>
References: <4a55ea12.2401.1681692777@sybase.com> <4a55f55b.2d11.1681692777@sybase.com>
NNTP-Posting-Host: 219.90.154.220
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1247152570 23637 127.0.0.1 (9 Jul 2009 15:16:10 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 9 Jul 2009 15:16:10 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: v15g2000prn.googlegroups.com; posting-host=219.90.154.220; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!v15g2000prn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89612
Article PK: 418799


On Jul 9, 10:49 pm, Sharon wrote:
> > any sample code on how to open/view a pdf file in
> > Powerbuilder.
> > Using pb 11
>
> tried the following
> String ls_Null
> String ls_Pdf = 'h:\gl.PDF'
> long ll
>
> SetNull (ls_Null)
> ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
> ls_Null, ls_null, 1)
> messagebox ( 'code', string(ll ))
>
> got a code of 2 , file not found?  however I know the file
> is there, if I use fileexists it comes back true.

PB10 is unicode, you want ShellExecuteW.


Chris Pollach Posted on 2009-07-09 17:00:03.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a55ea12.2401.1681692777@sybase.com> <4a55f55b.2d11.1681692777@sybase.com> <d6883d20-5a57-4237-bdff-ae51c38f5c84@v15g2000prn.googlegroups.com>
Subject: Re: open a pdf, still need help
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <4a562213$2@forums-3-dub.sybase.com>
Date: 9 Jul 2009 10:00:03 -0700
X-Trace: forums-3-dub.sybase.com 1247158803 10.22.241.152 (9 Jul 2009 10:00:03 -0700)
X-Original-Trace: 9 Jul 2009 10:00:03 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89614
Article PK: 418802

Correct ...

Sharon - do not use ShellExecuteA as it could be deprecated in Windows7, its
now ShellExecuteW.




"Jeremy Lakeman" <jeremy.lakeman@gmail.com> wrote in message
news:d6883d20-5a57-4237-bdff-ae51c38f5c84@v15g2000prn.googlegroups.com...

On Jul 9, 10:49 pm, Sharon wrote:
> > any sample code on how to open/view a pdf file in
> > Powerbuilder.
> > Using pb 11
>
> tried the following
> String ls_Null
> String ls_Pdf = 'h:\gl.PDF'
> long ll
>
> SetNull (ls_Null)
> ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
> ls_Null, ls_null, 1)
> messagebox ( 'code', string(ll ))
>
> got a code of 2 , file not found? however I know the file
> is there, if I use fileexists it comes back true.

PB10 is unicode, you want ShellExecuteW.


Bruce Armstrong Posted on 2009-07-10 01:17:42.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: open a pdf, still need help
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <fj5d55pp7jimvmkv7mc06pk34o5p0je3i7@4ax.com>
References: <4a55ea12.2401.1681692777@sybase.com> <4a55f55b.2d11.1681692777@sybase.com> <d6883d20-5a57-4237-bdff-ae51c38f5c84@v15g2000prn.googlegroups.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 9 Jul 2009 18:17:42 -0700
X-Trace: forums-3-dub.sybase.com 1247188662 10.22.241.152 (9 Jul 2009 18:17:42 -0700)
X-Original-Trace: 9 Jul 2009 18:17:42 -0700, vip152.sybase.com
Lines: 40
X-Authenticated-User: TeamSybase
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89620
Article PK: 418807

Actually, FWIW, I would recommend ShellExecuteEx.

http://msdn.microsoft.com/en-us/library/bb762154(VS.85).aspx

It gives you a bit more control, such as the handle to the process
that got started so you can monitor it (if you so choose).

On Thu, 9 Jul 2009 08:16:09 -0700 (PDT), Jeremy Lakeman

<jeremy.lakeman@gmail.com> wrote:

>On Jul 9, 10:49 pm, Sharon wrote:
>> > any sample code on how to open/view a pdf file in
>> > Powerbuilder.
>> > Using pb 11
>>
>> tried the following
>> String ls_Null
>> String ls_Pdf = 'h:\gl.PDF'
>> long ll
>>
>> SetNull (ls_Null)
>> ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
>> ls_Null, ls_null, 1)
>> messagebox ( 'code', string(ll ))
>>
>> got a code of 2 , file not found?  however I know the file
>> is there, if I use fileexists it comes back true.
>
>PB10 is unicode, you want ShellExecuteW.

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


Sharon Posted on 2009-07-15 13:44:55.0Z
Sender: 518.4a5ddb86.1804289383@sybase.com
From: Sharon
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Thanks! Re: open a pdf, still need help
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a5ddd57.752.1681692777@sybase.com>
References: <fj5d55pp7jimvmkv7mc06pk34o5p0je3i7@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 15 Jul 2009 06:44:55 -0700
X-Trace: forums-3-dub.sybase.com 1247665495 10.22.241.188 (15 Jul 2009 06:44:55 -0700)
X-Original-Trace: 15 Jul 2009 06:44:55 -0700, forums-3-dub.sybase.com
Lines: 45
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89638
Article PK: 418826

thanks, ShellExecutewW worked

> Actually, FWIW, I would recommend ShellExecuteEx.
>
>
http://msdn.microsoft.com/en-us/library/bb762154(VS.85).aspx
>
> It gives you a bit more control, such as the handle to the
> process that got started so you can monitor it (if you so
> choose).
>
> On Thu, 9 Jul 2009 08:16:09 -0700 (PDT), Jeremy Lakeman
> <jeremy.lakeman@gmail.com> wrote:
>
> >On Jul 9, 10:49�pm, Sharon wrote:
> >> > any sample code on how to open/view a pdf file in
> >> > Powerbuilder.
> >> > Using pb 11
> >>
> >> tried the following
> >> String ls_Null
> >> String ls_Pdf = 'h:\gl.PDF'
> >> long ll
> >>
> >> SetNull (ls_Null)
> >> ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
> >> ls_Null, ls_null, 1)
> >> messagebox ( 'code', string(ll ))
> >>
> >> got a code of 2 , file not found? �however I
know the
> file >> is there, if I use fileexists it comes back true.
> >
> >PB10 is unicode, you want ShellExecuteW.
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog: http://bruce.pbdjmagazine.com/
> Facebook:
> http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki: http://public.fotki.com/brucearmstrong/
> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> Twitter: http://twitter.com/bruce_armstrong YouTube:
> http://www.youtube.com/user/brucearmstrong


Arthur Hefti Posted on 2009-07-09 14:17:44.0Z
From: "Arthur Hefti" <arthur@catsoft.ch>
Subject: Re: open a pdf, still need help
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a55ea12.2401.1681692777@sybase.com> <4a55f55b.2d11.1681692777@sybase.com>
User-Agent: XanaNews/1.19.1.194
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a55fc08$2@forums-3-dub.sybase.com>
Date: 9 Jul 2009 07:17:44 -0700
X-Trace: forums-3-dub.sybase.com 1247149064 10.22.241.152 (9 Jul 2009 07:17:44 -0700)
X-Original-Trace: 9 Jul 2009 07:17:44 -0700, vip152.sybase.com
Lines: 24
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89611
Article PK: 418800

Try to pass "open" as the 2nd parameter in ShellExecute.

Arthur

Sharon wrote:

> > any sample code on how to open/view a pdf file in
> > Powerbuilder.
> > Using pb 11
>
> tried the following
> String ls_Null
> String ls_Pdf = 'h:\gl.PDF'
> long ll
>
> SetNull (ls_Null)
> ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
> ls_Null, ls_null, 1)
> messagebox ( 'code', string(ll ))
>
> got a code of 2 , file not found? however I know the file
> is there, if I use fileexists it comes back true.


Brad L Posted on 2009-07-09 16:03:54.0Z
Sender: 4343.4a561333.1804289383@sybase.com
From: Brad L
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: open a pdf, still need help
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a5614ea.4490.1681692777@sybase.com>
References: <4a55f55b.2d11.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 9 Jul 2009 09:03:54 -0700
X-Trace: forums-3-dub.sybase.com 1247155434 10.22.241.188 (9 Jul 2009 09:03:54 -0700)
X-Original-Trace: 9 Jul 2009 09:03:54 -0700, forums-3-dub.sybase.com
Lines: 24
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89613
Article PK: 418801

I've gotten it to work with the following code:

ll = ShellExecuteA ( handle( this ), "open", ls_PDF,
ls_Null, ls_Null, 1)

> > any sample code on how to open/view a pdf file in
> > Powerbuilder.
> > Using pb 11
>
> tried the following
> String ls_Null
> String ls_Pdf = 'h:\gl.PDF'
> long ll
>
> SetNull (ls_Null)
> ll = ShellExecuteA (handle(parent), ls_Null, ls_PDF,
> ls_Null, ls_null, 1)
> messagebox ( 'code', string(ll ))
>
> got a code of 2 , file not found? however I know the file
> is there, if I use fileexists it comes back true.


Adam Simmonds Posted on 2009-07-10 00:08:08.0Z
From: Adam Simmonds <adam.simmonds@[remove]exemail.com.au>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: open a pdf
References: <4a55ea12.2401.1681692777@sybase.com>
In-Reply-To: <4a55ea12.2401.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a568668$2@forums-3-dub.sybase.com>
Date: 9 Jul 2009 17:08:08 -0700
X-Trace: forums-3-dub.sybase.com 1247184488 10.22.241.152 (9 Jul 2009 17:08:08 -0700)
X-Original-Trace: 9 Jul 2009 17:08:08 -0700, vip152.sybase.com
Lines: 19
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89619
Article PK: 418808


Sharon wrote:
> any sample code on how to open/view a pdf file in
> Powerbuilder.
> Using pb 10

in addition to opening the PDF outside your app you can open the PDF
within your PB app quite easily as well

just insert adobe acrobat activex control then code

ole_1.object.LoadFile("filename.pdf")

I like this method better as it keeps everything within the application
and looks "cleaner".

a.