Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #7182 > unrolled thread

Open a PDF Document from VO Application

Started by"Jose F Zouain" <jfzouain@zetaconcepts.com>
First post2014-09-05 17:51 +0000
Last post2014-09-13 16:35 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Open a PDF Document from VO Application "Jose F Zouain" <jfzouain@zetaconcepts.com> - 2014-09-05 17:51 +0000
    Re: Open a PDF Document from VO Application JohnMartens <martens@tennishulp.info> - 2014-09-05 21:59 +0200
      Re: Open a PDF Document from VO Application "Jose F Zouain" <jfzouain@zetaconcepts.com> - 2014-09-13 16:35 +0000

#7182 — Open a PDF Document from VO Application

From"Jose F Zouain" <jfzouain@zetaconcepts.com>
Date2014-09-05 17:51 +0000
SubjectOpen a PDF Document from VO Application
Message-ID<c6ubh1FtknnU7@mid.individual.net>
Hi Guys

Happy New Year to all

Is there some piece of code you guys can share, I woul like to open a
PDF Document from a Data Window, I already have the way insert it into
an SLE, what I need is the command to call any PDF reader, like Acrobat
and display the document on the screen.

Best regards

Jose Zouain
-- 

[toc] | [next] | [standalone]


#7183

FromJohnMartens <martens@tennishulp.info>
Date2014-09-05 21:59 +0200
Message-ID<lud4m7$fhl$1@dont-email.me>
In reply to#7182
This works for me for any file that has an app that can open it

nErr := 
ShellExecute(MyShellWindow():Handle(),PSZ("open"),PSZ(_CHR(34)+cFileNm+_CHR(34)),PSZ(""),PSZ(""),SW_SHOWNORMAL)
IF INT(@nErr) > 32
	// OK
ELSE
	// No app to open this type of file
ENDIF

In the same wya you can print it like this (do not know anymore why I 
use the _CHR(34) in open and not in print)
nFout := 
ShellExecute(MyShellWindow():Handle(),PSZ("print"),PSZ(cFileNm),PSZ(""),PSZ(""),SW_SHOWNORMAL)

After printing you must close adobe like this

DO WHILE (hWnd := FindWindow(NULL_PSZ, PSZ("Adobe Reader"))) = NULL_PTR
	Sleep(500)
ENDDO
Sleep(5000)
// Close
PostMessage(hWnd, WM_CLOSE, 0, 0)


Jose F Zouain schreef op 5-9-2014 om 19:51:
>
> Hi Guys
>
> Happy New Year to all
>
> Is there some piece of code you guys can share, I woul like to open a
> PDF Document from a Data Window, I already have the way insert it into
> an SLE, what I need is the command to call any PDF reader, like Acrobat
> and display the document on the screen.
>
> Best regards
>
> Jose Zouain
>

[toc] | [prev] | [next] | [standalone]


#7204

From"Jose F Zouain" <jfzouain@zetaconcepts.com>
Date2014-09-13 16:35 +0000
Message-ID<c7ja2fFdumgU2@mid.individual.net>
In reply to#7183
JohnMartens wrote:

> This works for me for any file that has an app that can open it
> 
> nErr :=
> ShellExecute(MyShellWindow():Handle(),PSZ("open"),PSZ(_CHR(34)+cFileNm
> +_CHR(34)),PSZ(""),PSZ(""),SW_SHOWNORMAL) IF INT(@nErr) > 32 	// OK
> ELSE
> 	// No app to open this type of file
> ENDIF
> 
> In the same wya you can print it like this (do not know anymore why I
> use the _CHR(34) in open and not in print) nFout :=
> ShellExecute(MyShellWindow():Handle(),PSZ("print"),PSZ(cFileNm),PSZ(""
> ),PSZ(""),SW_SHOWNORMAL)
> 
> After printing you must close adobe like this
> 
> DO WHILE (hWnd := FindWindow(NULL_PSZ, PSZ("Adobe Reader"))) =
> NULL_PTR 	Sleep(500)
> ENDDO
> Sleep(5000)
> // Close
> PostMessage(hWnd, WM_CLOSE, 0, 0)
> 
> 
> Jose F Zouain schreef op 5-9-2014 om 19:51:
> > 
> > Hi Guys
> > 
> > Happy New Year to all
> > 
> > Is there some piece of code you guys can share, I woul like to open
> > a PDF Document from a Data Window, I already have the way insert it
> > into an SLE, what I need is the command to call any PDF reader,
> > like Acrobat and display the document on the screen.
> > 
> > Best regards
> > 
> > Jose Zouain
> > 

Thanks for the reply.

-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web