Windows Paper Size (ttaad3112m000)

Use this session to display the available Windows paper size codes.

You can link paper size codes to paper types.

When you print a report to a Windows printer, LN verifies the paper size code of the selected paper type to determine whether the report fits on the paper type.

Creating custom paper sizes

You cannot add own paper sizes in this session, because only official print code values from Microsoft are expected. However, the printer drivers may also support other print code values that are officially not supported by Microsoft. You can use these other values to create your own custom paper sizes.

To create a custom paper size:

  1. In the Windows printer driver, define your customized paper size.
  2. Set the printer concerned as the default printer.
  3. Create a bpf file. Complete these steps:

    1. Open a Windows Command Prompt.
    2. Type the following commands. To specify the ^[ in the first command, hold down the Ctrl key and then press [.

      set ESC=^[

      echo %ESC%@ -B mydevice > %TMP%\test.bpf

      echo hello >> %TMP%\test.bpf

  4. To open the test.bpf file in BwPrint, type the following command in the same Windows Command Prompt:

    %TMP%\test.bpf.

    A BwPrint window with the text "hello" is displayed.

  5. Right-click in the BwPrint window.

    A shortcut menu is displayed. Ensure the Use user specific settings menu option is checked.

  6. Right-click in the BwPrint window and select Paper size > Change device specific paper size.

    The Page Setup dialog box is displayed.

  7. The Size list should contain the list of paper sizes of the Windows default printer. Select the prepared customized paper size and click OK.

  8. Start the registry editor and navigate to the HKCU\Software\Baan\BwPrint\Fonts\mydevice key. This key contains a REG_DWORD entry named 'Form'. In the Data column, the hexadecimal value and, between parentheses, the decimal value of this entry are displayed. Make a note of the decimal value, because this is the BwPrint Code that you must use to define the new paper size.

  9. Add a custom paper type:
    1. Start the General Table Maintenance (ttaad4100 ) session.
    2. Open the Windows Paper Size (ttaad312) table.
    3. Add a new paper type, that uses the new BWPrint code.
Caution: 
Inappropriate usage of the General Table Maintenance (ttaad4100 ) session can result in data inconsistency!
Paper Size

The name of the paper size code. For example: A3, A4 or A4 Small.

width

The width in millimeters.

height

The height in millimeters.

BWPrint Code

The Microsoft Windows print code for the paper size.

See https://docs.microsoft.com/en-us/windows/desktop/Intl/paper-sizes.