Batch printing PDF files from powerbuilder...

Has anyone implemented batch printing of pdf files from powerbuilder.
I tried RUN ( acrobat32.exe + /p /o /h + fileargs )
I would like to have adobe open before i issue the shell command as there is
some performance improvement, but the problem is after the batch printing
process is completed i want to kill adobe. Is there any win32 functions
available to kill an application or something. Which is the best way to
implement this.

Thanks in advance,
-Ram



0
Steve
12/14/1999 3:00:11 PM
sybase.powerbuilder.general 62418 articles. 15 followers. Follow

4 Replies
1803 Views

Similar Articles

[PageSpeed] 31

Steve,

You can use FindWindowA to get a handle to any window that you can specify
the title text for. Then use SendMessageA to send WM_CLOSE to that window. I
haven't tried this for Acrobat, but it works for other apps.

--
Regards,
Millard[Team Sybase]
Power3 - Custom Enterprise Training



Steve LeClair wrote in message <#Ggf3QkR$GA.191@forums.sybase.com>...
>Has anyone implemented batch printing of pdf files from powerbuilder.
>I tried RUN ( acrobat32.exe + /p /o /h + fileargs )
>I would like to have adobe open before i issue the shell command as there
is
>some performance improvement, but the problem is after the batch printing
>process is completed i want to kill adobe. Is there any win32 functions
>available to kill an application or something. Which is the best way to
>implement this.
>
>Thanks in advance,
>-Ram
>
>
>


0
Millard
12/14/1999 3:50:48 PM
can you send me some examples. I tried to get handle to acrobat application
wasnt successful.
Powerbuilder handle function works only for powerbuilder objects
I know i can call the sendmessage powerbuilder function and close the app.
Problem is to get the handle to acrobat.

Thanks in advance,
-RAM

Millard F. Brown III [TeamSybase] <millard.brown@teamsybase.com> wrote in
message news:Y0$6iokR$GA.192@forums.sybase.com...
> Steve,
>
> You can use FindWindowA to get a handle to any window that you can specify
> the title text for. Then use SendMessageA to send WM_CLOSE to that window.
I
> haven't tried this for Acrobat, but it works for other apps.
>
> --
> Regards,
> Millard[Team Sybase]
> Power3 - Custom Enterprise Training
>
>
>
> Steve LeClair wrote in message <#Ggf3QkR$GA.191@forums.sybase.com>...
> >Has anyone implemented batch printing of pdf files from powerbuilder.
> >I tried RUN ( acrobat32.exe + /p /o /h + fileargs )
> >I would like to have adobe open before i issue the shell command as there
> is
> >some performance improvement, but the problem is after the batch printing
> >process is completed i want to kill adobe. Is there any win32 functions
> >available to kill an application or something. Which is the best way to
> >implement this.
> >
> >Thanks in advance,
> >-Ram
> >
> >
> >
>
>


0
Steve
12/14/1999 5:08:56 PM
Steve,

It isn't the PB handle() function. The FindWindowA API function gets the
handle to the named window from the operating system. Use it like this:

ulong lu_handle
long ll_rtn
string ls_wintitle

ls_wintitle = 'Acrobat Reader - [ACROBAT.PDF]'  // change this to match the
window title shown by Acrobat

lu_handle = FindWindowA(0,ls_wintitle)
if lu_handle > 0 then
 ll_rtn=SendMessageA(lu_handle,16,0,0)
else
 MessageBox('Error','Can not find window')
end if
return ll_rtn

--
Regards,
Millard[Team Sybase]
Power3 - Custom Enterprise Training



Steve LeClair wrote in message ...
>can you send me some examples. I tried to get handle to acrobat application
>wasnt successful.
>Powerbuilder handle function works only for powerbuilder objects
>I know i can call the sendmessage powerbuilder function and close the app.
>Problem is to get the handle to acrobat.
>
>Thanks in advance,
>-RAM
>
>Millard F. Brown III [TeamSybase] <millard.brown@teamsybase.com> wrote in
>message news:Y0$6iokR$GA.192@forums.sybase.com...
>> Steve,
>>
>> You can use FindWindowA to get a handle to any window that you can
specify
>> the title text for. Then use SendMessageA to send WM_CLOSE to that
window.
>I
>> haven't tried this for Acrobat, but it works for other apps.
>>
>> --
>> Regards,
>> Millard[Team Sybase]
>> Power3 - Custom Enterprise Training
>>
>>
>>
>> Steve LeClair wrote in message <#Ggf3QkR$GA.191@forums.sybase.com>...
>> >Has anyone implemented batch printing of pdf files from powerbuilder.
>> >I tried RUN ( acrobat32.exe + /p /o /h + fileargs )
>> >I would like to have adobe open before i issue the shell command as
there
>> is
>> >some performance improvement, but the problem is after the batch
printing
>> >process is completed i want to kill adobe. Is there any win32 functions
>> >available to kill an application or something. Which is the best way to
>> >implement this.
>> >
>> >Thanks in advance,
>> >-Ram
>> >
>> >
>> >
>>
>>
>
>


0
Millard
12/15/1999 3:05:49 AM
Hi!,

Thanks for the code snippet. It works now. I was looking at the win32 api
documentation strangely the findwindowa first argument was a string, because
of that it dint work. After looking at your code snippet i just changed the
arg. from string to long and it worked. I dont know why the api dint fail
when i had the wrong datatype.

Any ways it works now.. Thank you very much

-Ram

Millard F. Brown III [TeamSybase] <millard.brown@teamsybase.com> wrote in
message news:uDnIwhqR$GA.287@forums.sybase.com...
> Steve,
>
> It isn't the PB handle() function. The FindWindowA API function gets the
> handle to the named window from the operating system. Use it like this:
>
> ulong lu_handle
> long ll_rtn
> string ls_wintitle
>
> ls_wintitle = 'Acrobat Reader - [ACROBAT.PDF]'  // change this to match
the
> window title shown by Acrobat
>
> lu_handle = FindWindowA(0,ls_wintitle)
> if lu_handle > 0 then
>  ll_rtn=SendMessageA(lu_handle,16,0,0)
> else
>  MessageBox('Error','Can not find window')
> end if
> return ll_rtn
>
> --
> Regards,
> Millard[Team Sybase]
> Power3 - Custom Enterprise Training
>
>
>
> Steve LeClair wrote in message ...
> >can you send me some examples. I tried to get handle to acrobat
application
> >wasnt successful.
> >Powerbuilder handle function works only for powerbuilder objects
> >I know i can call the sendmessage powerbuilder function and close the
app.
> >Problem is to get the handle to acrobat.
> >
> >Thanks in advance,
> >-RAM
> >
> >Millard F. Brown III [TeamSybase] <millard.brown@teamsybase.com> wrote in
> >message news:Y0$6iokR$GA.192@forums.sybase.com...
> >> Steve,
> >>
> >> You can use FindWindowA to get a handle to any window that you can
> specify
> >> the title text for. Then use SendMessageA to send WM_CLOSE to that
> window.
> >I
> >> haven't tried this for Acrobat, but it works for other apps.
> >>
> >> --
> >> Regards,
> >> Millard[Team Sybase]
> >> Power3 - Custom Enterprise Training
> >>
> >>
> >>
> >> Steve LeClair wrote in message <#Ggf3QkR$GA.191@forums.sybase.com>...
> >> >Has anyone implemented batch printing of pdf files from powerbuilder.
> >> >I tried RUN ( acrobat32.exe + /p /o /h + fileargs )
> >> >I would like to have adobe open before i issue the shell command as
> there
> >> is
> >> >some performance improvement, but the problem is after the batch
> printing
> >> >process is completed i want to kill adobe. Is there any win32
functions
> >> >available to kill an application or something. Which is the best way
to
> >> >implement this.
> >> >
> >> >Thanks in advance,
> >> >-Ram
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
>
>


0
Steve
12/15/1999 2:54:41 PM
Reply:

Similar Artilces:

how to print a PDF file in PowerBuilder
hello: how to print a PDF file in PowerBuilder ? I read online help but I don't get useful messages thanks Gino Lin Hello, This newsgroup is for Open Client, Open Server and SDK. You might want to post your question to one of the PowerBuilder newsgroups: http://www.sybase.com/detail_list_multi/1,6902,11507,00.html?dynamic_query_yn=N&dropdown_product=1248 Maybe this one would be best: news://forums.sybase.com/sybase.public.powerbuilder.general Gino Lin wrote: > hello: > > how to print a PDF file in PowerBuilder ? > I read online help but ...

Print a pdf file in powerbuilder
Hello How to print a pdf filein powerbuilder? I mean if i have a file call XXX.pdf, how can i coding in the button cb_button, so that the document will print automatically when i click the button cb_button. Thank You Very Much!!! ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp To be able to print to PDF you need to have Adobe Acrobat PDFWriter installed on your machine. To make it easier to implement printing to PDF you can get the printer utility for PB apps from www.powerwhizz.com. They provide you with the source-code that...

how to print a PDF file in PowerBuilder ?
hello: how to print a PDF file in PowerBuilder ? I read online help but I don't get useful messages thanks Gino Lin If you are using powerbuilder 9, you will need to download and install ghostscript. Once you get that install, you should be able to print pdf files. But if you already have Adobe Distiller, you might be able to just print to distiller. try PrintSetup() to setup the distiller printer, then print the datawindow. HTH James "Gino Lin" <jh_802@hotmail.com> wrote in message news:3FA5E586.113733CC@hotmail.com... > hello: &...

Print a PDF file in Powerbuilder 5
I need a way to print a pdf file using powerscript in Powerbuilder 5. I tried creating a datastore and doing and insertdocument function call but keep getting a -1 error code. I need help.... Thanks, Tom you would need a PDF print driver (e.g. Acrobat PDFWriter) installed and then print on that to generate PDF. u can also look at printer utility from www.powerwhizz.com that helps u with swicthing printers etc. On 16 Jun 2004 09:54:00 -0700, in sybase.public.powerbuilder.general <Thomas Rundo> wrote: >I need a way to print a pdf file using powerscript ...

Printing to pdf file from the powerbuilder 11
Hi All, I'm new to powerbuilder. I need to print my data window or report window to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram Please don't crosspost. I've answered your question in the .datawindow forum. Paul Horan[Sybase] <chithu.palaniappan@gmail.com> wrote in message news:69bfb3e6-69eb-4e76-a6a8-3048db57b6a1@q26g2000prq.googlegroups.com... > Hi All, > > I'm new to powerbuilder. > > I need to print my data...

Printing to pdf file from the powerbuilder 11
Hi All, I'm new to powerbuilder. I need to print my data window or report window to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram ...

Printing to pdf file from the powerbuilder 11 #2
Hi All, I'm new to powerbuilder. I need to print my data window data directly to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram You posted this same request yesterday - and have responses. See 'objects' Newsgroup post 'Saveas PDF on Client Machine' on 10/16/08 HTH KL > Hi All, > > I'm new to powerbuilder. > > > I need to print my data window data directly to pdf files. > > > I didn'...

AMYUNI: directly print a pdf-file in powerbuilder
Hello anybody! I have problems defining and printing with the amyuni print driver (with CDIntf.DLL) directly to a pdf-file in powerbuilder 7.0.3 Has anyone tried this? Is it possible to get an example code with the defining of the external functions, generate a new amyuni-printerdriver, print an PB-datastore, close the printdriver? It seems that the definition of the external functions is a little bit difficult. Running my code results in: Error: Specified argument type differs from required argument type at runtime in DLL function getlasterrormsg. (invalid stack pointer on ret...

Printing to file from PowerBuilder
Hello, Can anybody please tell me how can I print to file using Power Builder? I have Power Builder 7. I am trying to print the content of a data window. I can use: dw_list.Print() to print to the default printer, but how can I print it to file? Thank you and have a nice day. Joan Set the DataWindow.Print.FileName property for the datawindow object. On Thu, 1 Nov 2001 15:07:51 +0200, in powersoft.public.powerbuilder.datawindow Ghost <joanna.elkhoury@amyuni.com> wrote: >Hello, > >Can anybody please tell me how can I print to file using Power Build...

Powerbuilder,Printing a file
Is there any way I can print a file from within Powerbuilder. I see lots of Print functions in the online help, but nothing that will let me point to a file. I'm running Powerbuilder 7.0 Win98 Thanks Hi, If it is a local printer use the port as the file name, if on the network use the full path. i_file = FileOpen('\\server\printer', LineMode!, Write!) Works with text mode. If you wish to print graphics requires other tech. (Technique provided by Jerry Siegel) S. Bokhari =============================================== "Mary Dupelle" <m.dup...

Printing to PDF from Powerbuilder
Does anyone know how I would go about printing a file from Powerbuilder to PDF? Are there plugins required, does Powerbuilder allow something like this? Thanks. >>Does anyone know how I would go about printing a file from Powerbuilder to PDF? Are there plugins required, does Powerbuilder allow something like this? << You can load either Amyuni's PDFConverter printer driver or Adobe's PDFWriter printer driver and just use the usual print mechanisms (e.g. dw.Print()). If you don't want to be prompted to specify the .pdf filename, then you can set th...

powerbuilder and pdf files
I would like to know the process, steps and objects I would need to display "Adobe Acrobat's pdf files" with a powerbuilder application. You will need to embed the MS Web Browser control in your window and view the PDF via the browser control. Also, take a look at the following: http://groups.google.com/groups?q=powerbuilder+pdf+file+display&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=9pQWJp%23P9GA.449%40forums.powersoft.com&rnum=1 -- Andy Turiansky [TeamSybase] <espears@abssinc.com> wrote in message news:1BA11116505381030058B6D585256CD...

Print PDF in powerbuilder
Hello, Can anyone tell me how to print a pdf file in powerbuilder? I mean if i have a file call XXX.pdf, how can i coding in the button cb_button, so that the pdf file will print automatically when i click the button cb_button. Thank You ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp Get the printer utility from www.powerwhizz.com to print to PDF from PB "Sunny" <stupidlai@hongkong.com> wrote in message news:0#lVYT41AHA.302@forums.sybase.com... > Hello, > Can anyone tell me how to print a pdf file i...

printing to pdf from powerbuilder 11
Hi All, I'm new to powerbuilder. I need to print my data window or report window to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram It's in the Help File. Search for the phrase "GhostScript". Paul Horan[Sybase] <chithu.palaniappan@gmail.com> wrote in message news:552eca65-5d9c-4807-9b72-0d3ad19bf88d@b2g2000prf.googlegroups.com... > Hi All, > > I'm new to powerbuilder. > > I need to print my data window or repo...

Web resources about - Batch printing PDF files from powerbuilder... - sybase.powerbuilder.general

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 1/20/2016 10:57:13 AM