Hi Pablo
1. It was dumb of me to not realise I had to excute printfile command at command prompt so did not know how to use it.
2. The demo4.exe asks for EMF file, sorry I don't know what EMF files are ?
3. The screenshot which appears on this thread is different from that produced by demo4.exe.
4. I tried to run printfile.exe at dos prompt by giving command "printfile test1.txt" where test1.txt is a text file, but I got error msg file not found eventhough file is there.
5. I tried to run printfile.exe at dos prompt by giving command "printfile test.txt /PREVIEW" where test.txt is a text file, but I got runtime error msg Error BASE/1303 Argument error:_HB_LANGSELECT ... Called from PRINTGRAPHIC(524)
Pls advice if I am doing something wrong in using the program.
Thanks

1. It was dumb of me to not realise I had to excute printfile command at command prompt so did not know how to use it.

Ok, I understood. You never had imagined this application is used with parameters. Mostly used in prompt command or in Clipper, Harbour by executing and passing the due parameters.

2. The demo4.exe asks for EMF file, sorry I don't know what EMF files are ?

At begining when I have created this topic, you and another coleagues have downloaded. But the files attached was wrong. It was my mistake to attach other application.
Coincidentally I had another application with a similar name that was stored in the same folder as this one. That's how I went wrong and I ended up posting Demo. If you want to know about Demo4, check out this topic that I have been releasing for a long time: viewtopic.php?p=37167#p37167 (this ios for metafiles printing as Rathi already said)

3. The screenshot which appears on this thread is different from that produced by demo4.exe.

As I explained earlier, this Demo4 was not meant to be published in this topic. Sorry for the confusion I caused.
If you make download again you will see there is the right project PrintFile with all its sources files.

4. I tried to run printfile.exe at dos prompt by giving command "printfile test1.txt" where test1.txt is a text file, but I got error msg file not found eventhough file is there.

It can not be possible.
Unless you have typed the wrong text file name (the file can be any extension: PRN, TXT but needs to be a text file type) or the file is in another folder. And because is not found, because not full path was mentioned and the the app see for the current folder where the PrintFile.exe is stored. This is a convention of ALL app works like that.
You can enter the full path of the folder and the name of the file you are going to print.

For example, type PRINTFILE.EXE on the command line:

PrintFile "C:\My folder\Test.txt"

Please note in above, the first parameter is quoted because it is supposed to be an Text.txt file in the folder with name My folder. I said supposed to be the Test.txt as file name example.

Also note that you are mentioning to had typed: "printfile test1.txt" (this is not the correct way to use the quotes). Quotes you put at names of files or names of paths when it have empty spaces int its names.

5. I tried to run printfile.exe at dos prompt by giving command "printfile test.txt /PREVIEW" where test.txt is a text file, but I got runtime error msg Error BASE/1303 Argument error:_HB_LANGSELECT ... Called from PRINTGRAPHIC(524)

Ops... this could it be an error of identification language. Please would you be so kind to run this attached app:

Hi Pablo
1. It was dumb of me to not realise I had to excute printfile command at command prompt so did not know how to use it.
2. The demo4.exe asks for EMF file, sorry I don't know what EMF files are ?
3. The screenshot which appears on this thread is different from that produced by demo4.exe.
4. I tried to run printfile.exe at dos prompt by giving command "printfile test1.txt" where test1.txt is a text file, but I got error msg file not found eventhough file is there.
5. I tried to run printfile.exe at dos prompt by giving command "printfile test.txt /PREVIEW" where test.txt is a text file, but I got runtime error msg Error BASE/1303 Argument error:_HB_LANGSELECT ... Called from PRINTGRAPHIC(524)
Pls advice if I am doing something wrong in using the program.
Thanks

Hi Pablo
1. It was dumb of me to not realise I had to excute printfile command at command prompt so did not know how to use it.
2. The demo4.exe asks for EMF file, sorry I don't know what EMF files are ?
3. The screenshot which appears on this thread is different from that produced by demo4.exe.
4. I tried to run printfile.exe at dos prompt by giving command "printfile test1.txt" where test1.txt is a text file, but I got error msg file not found eventhough file is there.
5. I tried to run printfile.exe at dos prompt by giving command "printfile test.txt /PREVIEW" where test.txt is a text file, but I got runtime error msg Error BASE/1303 Argument error:_HB_LANGSELECT ... Called from PRINTGRAPHIC(524)
Pls advice if I am doing something wrong in using the program.
Thanks

"Printfile" command isn't only way:

And so what ?

I do not understand you. Why to make RPC quoting ?

My application is putting together several ways of printing and the user can choose between the 3 main ways (RAW, TEXT and GRAPHICAL) how to use it and the application quite does it automatically.

Giving priority to the matrix for economy when is not forced to graphical way of course.

HMGing a better world"Matter tells space how to curve, space tells matter how to move."Albert Einstein

Hi Pablo
1. I must first apologize for point no 4. It was my mistake, there was a space in file name and that' s why I was getting file not found error. It is resolved now.
2. I get following on running demo5

I appreciate your interest and persistence.
Thanks to this I understand that we can not always automate the language issue.
It may be best left to the discretion of the user and not be automated.
I also found the bug in the lack of language identification, which I will implement but as I said, I will first leave it to the user's selection.

The client is always the boss, is not doesn't it ?

Then I will have to write the .INI language file and make another option so user can modify the selection.

Thanks again, without your feedback, the application and function languages would be incomplete.

I will make new release.

HMGing a better world"Matter tells space how to curve, space tells matter how to move."Albert Einstein

Hi Pablo
Many thanks for updated Printfile program. I will check it.
Viewerror doesn't produce any error as such but the small window at start of compiling just disappears and nothing happens.
Even the programs which compiled without viewerror don't compile. I had to delete registry key so that I could use IDE to compile programs.