Changing the Way Landscape Prints with PostScript Driver

ID: Q115417

The information in this article applies to:

SUMMARY

When you are printing in landscape orientation with a PostScript printer driver set up in FoxPro for MS-DOS, the top of the page is on the right. When you are printing in landscape orientation with the Windows PostScript drivers, the top of the page is on the left. In order to get the same behavior from the FoxPro for MS-DOS printer driver, you must modify the printer driver application (GENPD.APP).

MORE INFORMATION

The following steps describe how to modify GENPD.APP so that the PostScript driver prints the top of the page on the left side of the paper when the orientation is landscape.

1. Open the project file for GENPD.APP, called GENPD.PJX (located in the

   GOODIES\PDRIVERS subdirectory).

   For example, type this command in the Command window:

      MODIFY PROJECT (SYS(2004)+ "GOODIES\PDRIVERS\GENPD.PJX")

2. Scroll down the list of items in the project until the program item
   named "PS" is highlighted, and then choose the Edit button in the
   Project window to modify PS.PRG.

3. From the Edit menu, choose Find, and type "rotate" (without the
   quotation marks) in the Find box. Choose the Find button. The cursor
   should now be on line 219 of PS.PRG.

   Lines 219-220 of PS-PRG should contain the following code:

      IIF(_pdparms[1],"","-90 rotate -" + ALLTRIM(STR(_pdparms[36])) + ;
          " 0 translate" + CHR(13)) + ;

4. Change the above lines of code to the following:

      IIF(_pdparms[1],"","90 rotate 0 -" + ALLTRIM(STR(_pdparms[37])) + ;
          " translate" + CHR(13)) + ;

   NOTE: This change tells the printer to rotate 90 degrees clockwise
   instead of 90 degrees counterclockwise. Though the beginning column and
   row coordinates were at -<page height>,0 (using _pdparms[36], the
   Horizontal Points on Page), the coordinates must now start at 0,-<page
   width> (using the Vertical Points on Page parameter _pdparms[37] as the
   page width). For example, for a page size of 8.5 by 11 inches (612 by
   729 points), the starting coordinates must be changed from -729,0 to
   0,-612.

5. Save and close PS.PRG by pressing CTRL+W.

6. Rebuild GENPD.APP by choosing the Build button in the Project window,

   selecting Build Application, and then choosing OK. If FoxPro asks
   whether to save changes to the project, choose Yes. When the Enter
   Application Filename dialog box is displayed, change the current drive
   and directory to the root FoxPro directory so that the old GENPD.APP
   file will be replaced.

   If the message "File is in use" is displayed when you choose the Build
   button in the last dialog box, press any key to clear the error message,
   and then choose Cancel in the dialog box. In the Command window, type
   the following command:

      SET PDSETUP TO ""

   Now go back to the project window and begin step 6 again.

7. Before printing, be sure to set the printer driver setup again either by
   choosing Printer Setup from the File menu, or by using the SET PDSETUP
   TO command.

Additional reference words: FoxDos 2.00 2.50a 2.50b 2.60 KBCategory: kbprint kbprg kbcode KBSubcategory:

Last Reviewed: April 18, 1995