Dave,
What problems are you experiencing? Reporting RDL's or something else? I have used different Unix systema and there appears to be no major differences with Digital Unix. To print RDL's in Landscape you need to include the '-olandscape' option with the 'lp' command that is contained either in the printer.tbl file or in the unix command field on MSO016. I hope this helps.
Paul.
Dave,
Just using the -olandscape option results is (barely) usable output. Can you send me your e-mail address and I will send you the script that we use to set the output string for better looking MIMS reports? This script should be installed in the 'local' directory and called from the command line set up in MSO016.
We use the following to define our printers. It seems like a lot of set up but works well once done. This seems to give us better control over jobs than using unix printer driver files.
1. Print command in MSO016: lpr -Poma931l
2. Printcap entries: (Note oma931 is set to text and oma031l is redirected to it through the script in /usr/lbin)
4. /usr/lbin/hplj13l contains PCL control codes (Each starts with esc) to set the print to landscape(&l1O), 8 lpi(&l8D), 13 cpi((s13H), 66 lines per page(&l66F), Top Margin 4 (&l4E), left margin 2 (&a2L)
We have modified the "lpmims" Perl script supplied by Mincom.
The script accepts an additional optional argument, which tells whether to print portrait or landscape. Depending on the value of the argument, we send appropriate PCL printer control commands. As we only have one brand of printers, the script does not handle various brands.
Here are some notes taken directly from the script:
# This script handles the following:
# - formatting of report output according to report line size (80 or 132)
# - forced landscape printing of reports listed in landscape.tbl, regardless
# of the device id where requested to print
# - optional portrait/landscape printing of any other reports, decided
# by the user at request time by selecting an appropriate device id.
# Additional devices can be set up in MIMS to enable optional landscape
# printing. The device name should be self-explanatory, eg "printerid-land".
# - landscape reports listed by landscape.tbl will print bold; any other
# reports will print with the normal stroke weight.
#
# The call to this script is entered in the "Unix Spool Command" field of
# screen MSM016A - Maintain Device
#
# The spool command specifies a printer queue(-d) and optional page orientation (-p)
# If option -p is present, report is formatted according to the option:
# landscape if the literal "land" is present, else portrait
#
# If option -p is absent, script searches the report id in file
# landscape.tbl that lists all reports that ALWAYS are required to print as
# landscape.
# landscape.tbl if implemented will need to stored in $MINENV_SYS/config
# The situation is handled when landscape.tbl does not exist.
#
# A report id listed in landscape.tbl will print landscape & BOLD in 2
# situations: if option -pland is present on the commnad line, or if
# option -p is absent. The report can still be printed portrait if
# option -pport is present
#
# Any other reports can be printed landscape & NORMAL if option -pland
# is present. Note such reports cannot print bold.
#
# If a report will print as portrait, formatting is undertaken
# according to the number of characters in the report line (80 or 132).
#
# The report line size and the report ID are determined by this script
# from the first 5 rows of the printable file in STDIN.
Below is the section of code that determines the orientation:
if ($landscape eq "land" { # option passed in to print as landscape
if (&rpt_in_list($report_id) == 1) {# report listed in landscape.tbl
&land_print($demi_bold);
}
else { # report NOT listed in landscape.tbl
&land_print($normal_stroke);
};
}
elsif ($landscape ne "" { # option was passed in and is not "land"
&port_print;
}
elsif (&rpt_in_list($report_id) == 1) {# report listed in landscape.tbl
&land_print($demi_bold);
}
else { #landscape.tbl does not exist or report not listed
&port_print;
};
Below is the actual code for landscape printing for HP printers:
sub land_print {
local($stroke_weight) = @_;
#builds PCL commands for landscape printing
#
#orientation = landscape;
print F_OUTFILE2 "^[&l1O";
#
#top margin = 3 lines;
print F_OUTFILE2 "^[&l3E";
#
#lines per inch = 9 (expressed as VMI = 5.5)
print F_OUTFILE2 "^[&l5.5C";
#
#left margin as number of columns: 5
print F_OUTFILE2 "^[&a5L";
#
#stroke weight: medium (0) or semi-bold(1) depending on parameter
print F_OUTFILE2 "^[(s${stroke_weight}b";
#
#Primary font: Courier
#fixed (0p),upright(0s), 13char/inch(13h), Courier(4099T)
print F_OUTFILE2 "^[(s0p0s13h4099T";
#
} #end of sub land_print
For more PCL language commands I suggest you search the HP site
A simple way of controlling your prints from MIMS.
In /usr/local/bin two files, one named mimsprint-l (Landscape) and another named mimsprint-p (Portrait). Content of mimsprint-l which is called via MOS016:
lp -d$1 -olandscape -o12 -olpi8 -onb -oA4 -otm3
and for Portrait:
lp -d$1 -oportrait -o12 -olpi8 -onb -oA4
So on the MSO016 line:
mimsprint-l Unix_queue_name
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.