Printing text files

Any ideas on the best way to print a text file from a PowerBuilder 7
application would be much appreciated.

Do I really need to open it up in notepad, copy the text to a word document,
then print?

Cheers

Garry


0
Garry
7/21/2005 4:02:28 PM
sybase.powerbuilder.general 62418 articles. 18 followers. Follow

3 Replies
738 Views

Similar Articles

[PageSpeed] 51

Garry wrote:

> Any ideas on the best way to print a text file from a PowerBuilder 7
> application would be much appreciated.

The first that comes to mind:

WinExec('notepad /p "your_file_name.txt"', SW_HIDE)

Dmitri.
0
Dmitri
7/21/2005 4:15:15 PM
Best? What's your criteria? 

There's probably a couple ways to do it within PB, if your criteria includes
minimal external dependencies. If you're a do-it-yourself kind of guy,
PrintText() is the raw tool, but you'll have to decide how much text to put on
each line, etc... Or, you could leverage a DataStore or dynamically created rich
text control, get the text file in there and use its line wrapping and print
capabilities. 

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

On 21 Jul 2005 09:02:28 -0700,
 in sybase.public.powerbuilder.general
Garry <garry@k-computer.co.uk> wrote: 
>Any ideas on the best way to print a text file from a PowerBuilder 7
>application would be much appreciated.
>
>Do I really need to open it up in notepad, copy the text to a word document,
>then print?

*********************************
Click once a day to help the hungry
http://www.thehungersite.com
*********************************

User Manual
===========
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit. 
Version 2.2.06 now available at the Sandbox
PB Futures page updated June 12/2005
See the PB Troubleshooting Guide at the Sandbox
^ ^
o o
=*=
0
Terry
7/21/2005 4:25:05 PM
Garry wrote:
> Any ideas on the best way to print a text file from a PowerBuilder 7
> application would be much appreciated.
> 
> Do I really need to open it up in notepad, copy the text to a word document,
> then print?
> 
> Cheers
> 
> Garry
> 
> 

ShellExecute API with "print" as the verb parameter

--
Roy
0
Roy
7/21/2005 11:53:50 PM
Reply:

Similar Artilces:

If I have a.doc file with text, can I print the text?
Is there any Class/Method in asp.net with which I can print the text of a doc file? Another question: I ahev a populated gridview or a datalist and I want to copy it to a file which I have just created. I tried the StreamWriter like: StreamWriter sw=new StreamWriter(FileName); sw.Write(DataList1);   Well I didn't expect it to work, but do you have any ideas how can I copy the whole datalist to the file via codebehind?    Thanks You cannot print the text of a .doc file just like that with the built in asp features. You can either use the Office Com...

Searching text file and printing to new file
I'm a nearly absolute beginner to Perl, and a lot of the text manipulation things confuse me. I have a large text file with information essentially broken into lines like this: findable text with a regexp information I care about more findable text There are plenty of sections like this in the file. How can I write a program that opens the file then searches for the middle line and prints it to a new file? PlagueMagazine@gmail.com wrote: > I'm a nearly absolute beginner to Perl, Then this site ought to be useful: http://learn.perl.org/ > and a lot of the te...

Print and print preview file on the website without using the File
Hi everyone, Is there any source code or help I can use to print and print preview my file on the IE and print the file using my own command instead of using the IE Print command. Please do reply me. Your help is greatly appreciated. Best regards....

How to print dynamic text (with line wrapping) that's not from a text file?
Hi everyone, Being a newbie to .NET, I've seen several examples (especially on MSDN) on printing regular text. However, it all assumes the text is in a text file and fits on a line. I have an application that needs to print textual output on the fly, complete with line wrapping. The output could be one line, or many lines, and have both vbtab and vbcrlf characters. The text is not from a text file and not from another control like a textbox. How is this possible? Can any gurus point me to good examples? Thanks!...

Printing a text file
Hi everybody, After creating a small text file using Fileopen, filewrite and fileclose, how can I sent it to a specific printer? I am using PB11.2, Windows Vista. Thanks a lot in advance Not certain about Vista, other Windows flavors you can use Run to copy the file to a printer port (example LPT1) after assigning the desired printer to that port. Or use the port as the file name in FileOpen .... <Manel> wrote in message news:48d18f12.5c9e.1681692777@sybase.com... > Hi everybody, > > After creating a small text file using Fileopen, filewrite > and fileclo...

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...

printing text file
what command to use in PB to print a text file? Hi MaLai uhhh...print()? You have to read the textfile into i.e. an mle. Then, open a printjob using printopen, mle.print(job), and printclose to close the job. HTH -- - Eric Aling [TeamPS], Cypres Informatisering bv, The Netherlands Eric's Home & PB Site @ http://utopia.knoware.nl/users/cypr115 MaLai <MaLai@hotmail.com> wrote in message FOsHM74F#GA.159@forums.powersoft.com... >what command to use in PB to print a text file? > > In one word -- ShellExecuteA. If you need a code sample, check ...

How to append a text file to an existing text file
Hello, Is there a way to append a text file to an existing text file. For example, File A: Jan Feb Mar April ... File B: 10 30 40 20 ... After appending job, the File A would be like below. Jan Feb Mar April ... 10 30 40 20 ... TIA Hi, It's a basic job in Perl, just open, read, and print. open B with read mode; read the content of B into memory (ie, save to a variable); close B; open A with append mode; write B's content to A; close A; 2008/9/19 Back9 <backgoodoo@gmail.com>: > Hello, > > Is there a way to append a text file to...

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 a text file
Hi list, Does anyone know how to print out a text file to a printer? i would like the option of chosing a printer to send the document to, in addition, will I need to reformat the text, or will it print out the text file as is? Thanx Ben __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com Ben Crane wrote: > > Hi list, > > Does anyone know how to print out a text file to a > printer? i wou...

PowerBuilder and text files
Is it possible to import a fixed-length flat file to a datastore in PowerBuilder? The actual file is NOT tab-separated or comma-separated. It is just a text file with a number of fixed-length fields. I've tried many alternatives. The last one (see code below) refers to a DSN named PB_Post61, which is a configuration I made in ODBC Data Source Administrator (Windows 2000). The configuration uses the PB DataDirect OEM 4.20 TextFile (*.*) driver, and I've also defined the text file fields in ODBC Text Driver Setup. datastore lds_datastore lds_datastore = Create datast...

Load a Text File, Search a Text File
I'd like to load a text file that has a list of target words and replacement words. After loading the list, I'll replace all words with the target word. I've got the code worked out to do the replacing, now I just need some help with how to actually load and search the text file (xml). Here what it looks like: <dictionary> <entry> <word>Word1</word> <equivalent>Word1R1</equivalent> <equivalent>Word1R2</equivalent> <equivalent>Word1R3</equivalent> </entry> </dictionary> Th...

Append a text file to an existing text file
Hello, Is there a way to append a text file to an existing text file. For example, File A: Jan Feb Mar April ... File B: 10 30 40 20 ... After appending job, the File A would be like below. Jan Feb Mar April ... 10 30 40 20 ... TIA On Sep 18, 11:49=A0am, backgoo...@gmail.com (Back9) wrote: > Hello, > > Is there a way to append a text file to an existing text file. > For example, > File A: > Jan Feb Mar April ... > > File B: > 10 30 40 20 ... > > After appending job, the File A would be like below. > Jan Feb Mar April ... &g...

Print text or file
Hi, May I know what's the function to print an external file (ie. abc.doc) or a list of text on powerbuilder coding?? Can I have the sample codes to help me on this issue. Thanks. Depends on what you are printing text file: run('copy c:\myfile.txt lpt1') or use FileCopy String variable: FileOpen ('LPT1') FileWrite(ls_text) FileClose Word document you probably want to use OLE to open and print with Word <lenniegpl@gmail.com> wrote in message news:1194925151.225395.3530@e9g2000prf.googlegroups.com... > Hi, > > May I know what's the ...

Web resources about - Printing text files - sybase.powerbuilder.general

Printing - Wikipedia, the free encyclopedia
This article is about the process of reproducing text and images. For the handwriting method often called printing, see block letters . For other ...

Gelato Group Is Here To Democratize The World of Printing
... winning the Oslo Innovation Award 2015, we sat down with Henrik Müller-Hansen, Founder and CEO of Gelato Group. What Does Democratizing Printing ...

3D printing helps give badly burned boy a new nose
After tragic accident, teen getting second chance at normal life thanks to new facial reconstructive surgery technology

3-D printing's latest creation: Jobs
Industries, including aerospace and medical technology that use 3-D printers to build parts, are on the hunt for skilled workers.

3D printing jobs on the rise
Mary Thompson takes a look at employment growth in the 3D printing industry.

3D printing can recreate your vascular system for pre-op practice
... technology. With that in mind, physicians and researchers in Buffalo have worked with 3D printer maker Stratasys to develop a method of printing ...

3D printing files for guns are illegal in an Australian state
The Australian state of New South Wales has made it illegal to possess the blueprints necessary to make your own projectile weapons. Lawmakers ...

Pratt's "Coded Couture" Goes Beyond Wearables And 3-D Printing In High-Tech Fashion
The exhibition is about how coding can take personalization to the extreme, curator Ginger Gregg Duggan says. Innovation within the fashion ...

Sketch Life-Sized Objects With Sticky Tape Tubes Using This 3-D Printing Gun
Use the Protopiper to see if that new couch will really fit in your apartment. You won't need measuring tape. Imagine being able to sketch out ...

Banning Uber like trying to stop printing press, says Brussels
Banning Uber like trying to stop printing press, says Brussels

Resources last updated: 12/7/2015 7:49:33 AM