Printing on ladscape mode

tdi

Progress Fan
Hi there!.
I've been trying for a way to print a wide report in landscape, because it's so wide it cannot fit other way. On the system under development, i use _osprint (by the way, does any one noticed? internally it test for session:window-system to be "ms-windows", but on V9.0b it returns "ms-win95"), but even I put parameter 1 where it's supposed to be the "call dialog" flag, no dialog it's called. I tried using system-dialog printer-setup, but no luck.
Any one has any clue?
Thanks.
Octavio

------------------
and yes... i'm Powered by Progress...
 

Chris Kelleher

Administrator
Staff member
Octavio-

Hi there. You need to set parameter number 4 to the value "2". This will print in landscape mode.

Here are the comments on what all of the parameters are and what they do:

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
/****************************************************************************
File _osprint.p

Syntax
RUN adecomm/_osprint.p ( INPUT p_Window,
INPUT p_PrintFile,
INPUT p_FontNumber,
INPUT p_PrintFlags,
INPUT p_PageSize,
INPUT p_PageCount,
OUTPUT p_Printed ).

Purpose Send a specified operating system text file to the default
printer.

Remarks Output is sent to printer as PAGED output, with a default
page size of zero. This lets the printer handle the paging.
The page size can be specified using p_PageSize.

Max characters per line: 255.

Under MS-Windows, the MSW Print Setup dialog box
is called via a PROGRESS DLL (PROPRINT.DLL) and the
SESSION:pRINTER-CONTROL-HANDLE is always cleared.

Author J. Palazzo
Created Mar 1994
Updated Sept 1996 Changed p_UseDialog parameter to p_PrintFlags.
****************************************************************************/

DEFINE INPUT PARAMETER p_Window AS WIDGET NO-UNDO.
/* Parent window for Dialogs and Message boxes. Default
to CURRENT-WINDOW if p_Window is not valid. */

DEFINE INPUT PARAMETER p_PrintFile AS CHAR NO-UNDO.
/* Text file to print. Can be specified relative to PROPATH. */

DEFINE INPUT PARAMETER p_FontNumber AS INTEGER NO-UNDO.
/* PROGRESS Font Number to use when printing file. MSW Only.
This may not match screen font exactly and the printer
driver will make the ultimate choice, not PROGRESS. */

DEFINE INPUT PARAMETER p_PrintFlags AS INTEGER NO-UNDO.
/* Integer expression that specifies various print options.
The table below lists the flag values that correspond to
each print option. If a zero (0) value is passed, option
defaults are used.

Print Option Flag Value Meaning

useDialog 1 Display the MSW Print Setup Dialog.
Default is to not display the Print
dialog.

useLandscape 2 Set print orientation to Landscape.
Default orientation is Portrait.

You can specify any combination of these flags. For
example, you can pass three (1 + 2) as an input parameter to
specify that the Print Setup Dialog be displayed and that
the print orientation be landscape. */

DEFINE INPUT PARAMETER p_PageSize AS INTEGER NO-UNDO.
/* Page length - number of lines per page. */

DEFINE INPUT PARAMETER p_PageCount AS INTEGER NO-UNDO.
/* If non-zero, then enable the page range selection controls
in the printer setup dialog. If zero, the entire text file
is printed. */

DEFINE OUTPUT PARAMETER p_Printed AS LOGICAL INIT TRUE NO-UNDO .
/* Returns TRUE if able to complete the OUTPUT TO PRINTER. */
[/code]

HTH.

-Chris

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 

tdi

Progress Fan
Hi Chris!

Thanks again. (I guess on your free time, you develop?
smile.gif

The thing is: Perhaps you consider (as you being the Moderator) to mention how can we download the examples posted on the UBB, since if you cut-and-paste or save the page, or whatever you do, you get the source in one line!!! imagine, no LF's, what a mess!!
(By the way, i purchased my provision on october 99, and doesn't have the fix on the _osprint.p you show, where did you get it? are you oscurelly well connected to PSC?)

Greetings to all.

------------------
and yes... i'm Powered by Progress...
 

tdi

Progress Fan
Hi Chris!.

I was wondering, what version of proprint.dll do you have?
I think the version i have, didn't support the 4th parameter being greater than 1?
My proprint.dll is dated on May 7th, 99 and is 41,928 bytes. any clue?

Octavio



------------------
and yes... i'm Powered by Progress...
 

Chris Kelleher

Administrator
Staff member
<BLOCKQUOTE><font size="1" face="Arial, Verdana">quote:</font><HR>Originally posted by tdi:
I was wondering, what version of proprint.dll do you have?
I think the version i have, didn't support the 4th parameter being greater than 1?
My proprint.dll is dated on May 7th, 99 and is 41,928 bytes. any clue?
<HR></BLOCKQUOTE>

Here is what I have for PROPRINT.DLL:
Version 8.3B
PROPRINT DLL 59,392 02-05-99 4:16p
Version 9.0A
PROPRINT DLL 20,992 05-14-99 12:30p
Version 9.1A
PROPRINT DLL 41,928 11-02-99 7:29p


------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 

Chris Kelleher

Administrator
Staff member
<BLOCKQUOTE><font size="1" face="Arial, Verdana">quote:</font><HR>Originally posted by tdi:
Thanks again. (I guess on your free time, you develop?
smile.gif

<HR></BLOCKQUOTE>
Free time??? What's that?
smile.gif

<BLOCKQUOTE><font size="1" face="Arial, Verdana">quote:</font><HR>
The thing is: Perhaps you consider (as you being the Moderator) to mention how can we download the examples posted on the UBB, since if you cut-and-paste or save the page, or whatever you do, you get the source in one line!!! imagine, no LF's, what a mess!!
<HR></BLOCKQUOTE>
Sure thing, I am going to add an easier way to cut and paste code from here in the next few weeks, since it isn't very clear how to do this and others have asked. But until then, just go to the message you want to copy, and click on the "Edit Message" button at the bottom of the post. This will bring up an edit window, with the message inside. You can select, copy and paste from there and it should work just fine
smile.gif


HTH.

-Chris

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 

tdi

Progress Fan
You will say that i have no other things to do, but the truth i got so much to do, and all is about not being able to print landscape. I guess i'll have to explain precisely my config, 'cause i think there's something about it, that doesn't allows me to print landscaped...
I use ProVision 9.01a on a NT server (english version) (besides the client networking... i now it's something radicall, but...) . The other day i found interesting things about that config. I found that the program CHOOSEDIR.p, doesn't work on NT,.. also, the proprint doesn't do a thing, and WINDOW-SYSTEM returns "ms-win95", instead of "ms-windows" as expected by _osprint.p. Besides, Arjen B, from the Netherlands, sent me a string to config the printer for landscaped, but it includes a square character, what ascii code would be that?, i'll put the string here with <BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>, hope it get interpreted right...

[/code]
display "&l1O" /*put on landscape */
E /*reset*/
[/code]
(well, don't know what will it be until later).

Tommorrow i will try the string and _osprint with a win98...

See you later...
Grettings from Mexico..
Octavio.

------------------
and yes... i'm Powered by Progress...
 

yanfug

New Member
[/code]
display "&l1O" /*put on landscape */
E /*reset*/
[/code]
(well, don't know what will it be until later).

Hi TDI!

Don't know if you have found your answer, but this box character is the escape sequence value to send PCL to the printer.

in your progress code you should use this:

put control "~033&l10" for exemple!
this will output the escape sequence into your document without incrementing the progress cursor in the document.

To have all the escape sequence, find a tech doc for PCL language on HP website! you could do what ever you want with that!:eek:

You can change paper format, orientation, font, draw boxes, etc.

Hope this will help you.
 
Top