Ansicht
Dokumentation

RSTXLDMC - Upload TIFF Files to SAPscript Texts

RSTXLDMC - Upload TIFF Files to SAPscript Texts

PERFORM Short Reference   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Description

The report RSTXLDMC allows a TIFF graphics file to be uploaded from the file system of the R/3 GUI to a standard text in the R/3 word processor SAPscript. (TIFF is a registered trademark of the Aldus Corporation.)

When uploading, the TIFF graphic is converted either into a black and white raster image (parameter type=BMON) or as a color raster image with a maximum of 256 colors (parameter type=BCOL).
The black and white raster images (BMON) can be printed using the following printer types:

  • PCL-5 printer

  • PostScript printer

  • Kyocera PRESCRIBE printer

  • Device type SAPWIN (with SAPlpd 32-bit as of Version 2.41 for Windows NT or Windows 95)

The color raster images (BCOL) can be printed using the following printer types:

  • PCL-5 printer with color capability (e.g. HP Color LaserJet). Color graphics are not printed properly on monochrome PCL-5 printers (e.g. HP LaserJet 5), because the printer cannot set the color palette as required and does not perform any gray-level conversion.

  • PostScript printer (color graphics are automatically converted to gray levels on black and white printers using PostScript) Device type SAPWIN (with SAPlpd 32-bit as of Version 2.41 for Windows NT or Windows 95) During TIFF graphic import, the basic set "Baseline TIFF 6.0" of the TIFF specification 6.0 is supported.

To maintain compatibility with earlier versions of the report RSTXLDMC, it is also possible to convert the TIFF graphic directly into a black and white raster image for a particular printer type when uploading. These are the three printer types PCL-5 (parameter type=PCL), PostScript (parameter type=POST) and Kyocera PRESCRIBE (parameter type=PRES). A raster image uploaded in this manner can only be printed using the appropriate printer type.

Besides TIFF raster graphics, direct printer commands in the respective printer language (PCL-5, PostScript or Prescribe) can also be contained in the file which is to be uploaded (printer macros). They are then transferred to the standard text unmodified.

The graphics are output by inserting the standard text into the document which is to be printed, directly or using an INCLUDE command. The printer commands, which for example draw a company logo on the page, are only output if the print request is processed by the printer driver corresponding to the macro type, otherwise they are ignored. Example: A macro of type PCL is contained in a print request. If the request is output to a printer with type HPLJIIID (to which the driver HPL2 is assigned), the macro data is sent to the printer. If the request is printed on a printer of type POSTSCPT (to which the driver POST is assigned), the output of the macro data is suppressed.

In the standard text, the printer commands are inserted between the HEX ... ENDHEX command lines in hex notation. Various report parameters allow the graphic or printer macro to be placed on the page or at the current text position. Note: When the /:HEX command line which precedes the macro appears in the text, a line break is generally made before the graphic is output. The output of the macro therefore begins in the next text line at the left window border of the current page window, as long as a shift to the right is not specified (see below).

If your own printer macros are uploaded and not TIFF files, you must ensure yourself that the normal (text) output of the driver is not impaired when the printer commands are inserted in the output from the uploaded file. The printer drivers pass the data contained in the file to the printer unmodified, therefore without control over the individual actions this triggers on the printer. For example, syntax errors should not be generated by the PostScript commands (type POST), or form feeds should not be contained in the file (unless this was intended) for PCL-5 (type PCL).

Restrictions:

In general, the output of graphics generated via RSTXLDMC from R/3 is not suitable for mass printing (that is, unless you are using the "Graphic resident on printer" feature): the R/3 spooler has to hold significantly more data in its output files. If the graphics occur several times in a spool request, the data also reoccurs. Apart from this, the network is more heavily loaded in sending the increased volume of data to the printer and the printer output is slowed significantly (varies according to printer model) if raster graphics are output as well as the text.
If your graphics reside on your printer during a printing job, the degree of 'correctness' with which they are printed depends on the amount of memory available in your printer. R/3 print drivers are unable to determine whether the amount of memory available is enough! If one of the graphics that you have marked as resident is not displayed, try reloading the graphic and switching off the parameter "Graphic resident on printer".
When printing black and white graphics on PCL-5 printers, image data is compressed in order to greatly reduce the file size.

The output of graphics and macros on PCL-5 printers, PostScript printers and device type SAPWIN (type BMON, BCOL, PCL, POST) is adapted to the page orientation used, that is if landscape is used instead of portrait, the graphic is also turned when output. This is not the case for the PRESCRIBE printers (type BMON, PRES)! With these printers, the graphic is not automatically turned when landscape is used, but appears on the page in the identical position as for portrait. You are therefore recommended not to output raster images when printing in landscape on PRESCRIBE printers.

PRESCRIBE printers do not support the resolutions 200 and 600 dots per inch when printing raster images.

Not all PCL-5 compatible printers support the resolutions 200 and 600 dots per inch when printing raster images.

TIFF graphics with compression type 2 ("CCITT Group 3 1-Dimensional Modified Huffman run length encoding") can currently not be imported although this is a component of the Baseline TIFF 6.0 specification for monochrome images.

Color TIFF graphics with full color representation (ie. a lot more than 256 colors) are automatically converted into 256 gray levels when uploading with type BCOL.

When TIFF graphics are converted to black and white raster images (type BMON, PCL, POST, PRES) there is no default simulation of gray levels or colors of the original image on the printer (for example, by using different tones of gray). Each pixel of the original image is converted to a white or black pixel on the printer according to its intensity value.
The parameter "Number of TIFF gray levels" does, however, allow a simulation of gray/colour tones of the original image through levels of gray on the printer, when using type PCL, POST or PRES. This parameter is ignored for type BMON.

The conversion of TIFF graphics can be so time-consuming that it is recommendable to execute the report RSTXLDMC in batch processing. Note: in batch, the file is always read from the file system of the application server (ie. not from the file system of the GUI).

The length of an individual text in the text file is limited. When importing TIFF graphics with very large dimensions, especially if more than 2 gray levels are used, a termination can therefore occur when saving the standard text ("EXPORT_TOO_MUCH_DATA"). This restriction can only be avoided by reducing the TIFF graphics. Note: The display of a raster image in Postscript or PRESCRIBE format needs from two to three times as much space as displaying in PCL-5.

When processing very large TIFF images on PostScript printers, a print termination can occur with PS error message "limitcheck". In this case the internal memory of the printer is insufficient to scale the required raster image. This implementation limit cannot be influenced by changing the report parameters when importing.

Requirements

The file which is to be uploaded can contain the following formats/ commands:

  • Baseline TIFF 6.0 raster image files. The image information of the TIFF file is converted into black and white/color raster images when uploading. Note: As the TIFF format allows a variety of variants, only a basic set of TIFF 6.0 formats is supported here described in the TIFF 6.0 specification as Baseline TIFF 6.0.

  • PCL : PCL-5, Hewlett Packard Printer Control Language 5 for HP LaserJet 3, 4, 5 series and compatible printers. The data is output by the printer driver HPL2 only.

  • PRES: Kyocera PRESCRIBE for Kyocera laser printers. The data is output by the printer driver PRES only.

  • POST: Adobe PostScript or EPS format (encapsulated PostScript) for PostScript printers. The data is output by the printer driver POST only. In the upload, one of the end-of-file markers (CTRL-D, hex $04) which may be contained in the PostScript file is not transferred.
    For PostScript files which contain a bounding box entry (for example, all EPS files) the macro/graphic can be scaled to a size specified by the user. In this case, a small lead text and trailer are generated by the report for the macro data and inserted in the standard text.

Parameters of RSTXLDMC

File name

Path and file name of the file to be uploaded in the file system of the R/3 frontend (dialog processing) or in the file system of the application server (batch processing)

Type

Way which the data contained in the file is to be converted. Possible values are BMON, BCOL, PCL, POST and PRES. With parameter values BMON and BCOL, a TIFF 6.0 file is expected. This is converted into either a black and white raster image (BMON) or a color raster image (BCOL). These raster images are printer-independent and can be printed using various printer types (see above).
With parameter values PCL, POST and PRES, either a TIFF 6.0 file or a file with printer commands in the appropriate printer langauge is expected. If the file is a TIFF file, it is converted into a black and white raster image for the printer type specified in the parameter. The presence of a TIFF file is recognized automatically. If the file is not a TIFF file, the file contents are regarded as the printer macro of the respective type. Data loaded with type PCL, POST or PRES can only be printed on the respective printer type.

Resolution for TIFF raster images

Resolution which should be used when importing a TIFF raster image, in dots per inch (dpi). If an allowed value is entered here, this overrides the resolution information in the TIFF file. The allowed values are:
,,75 dpi
,,100 dpi
,,150 dpi
,,200 dpi (not for type PRES, for PCL only HP LaserJet 4,5 series)
,,300 dpi
,,600 dpi (not for type PRES, for PCL only HP LaserJet 4,5 series)
Changing the resolution affects the size of the graphic on the printer. If a resolution of 300 dpi is stated in the TIFF file and this parameter is set to 75 dpi, the graphic is four times as big when printed as at the outset.
Note: Kyocera PRESCRIBE printers do not support 200 and 600 dpi resolutions.
Note: Not all PCL-5 printers support resolutions 200 and 600 dpi, for example HP LaserJet 3 series does not, but LaserJet 4 and 5 series do.

Graphic Resident on Printer

Normally, graphics that occur more than once in a printing job (a company logo that appears on each page, for example) are sent to the printer repeatedly each time they are needed. In order to avoid this kind of redundancy, you can select this checkbox on the selection screen. The R/3 print driver then stores the graphic in the printer's memory and the printer retrieves the 'resident' graphic memory every time that re-occurs in your job.
Caution: Whether or not the printer correctly reproduces the graphic depends on the amount of memory available in the printer during the printing job! You should avoid using this feature with color graphics since they take up a lot more memory than monochrome graphics.
This parameter can only be used with types "BMON" and "BCOL".

Absolute positioning

Determines whether the macro/graphic is positioned absolutely or is to be output at the current text position. If this checkbox is selected, the graphic is positioned absolutely (parameters "X-position" and "Y-position" are used), if this checkbox is not selected, the graphic is positioned at the current text position (parameters "Reserved height" and "Shift to right" are used)

Absolute X-position

Horizontal position (space from left border) of the macro/graphic, if absolute positioning is required. This is the parameter XPOS of the HEX command.

Absolute Y-position

Vertical position (space from upper border) of the macro/graphic, if absolute positioning is required. This is the parameter YPOS of the HEX command.

Reserve height automatically

If this checkbox is selected, the system automatically inserts the actual height of the graphic during printing into the subsequent "Reserved height" parameter.

Reserved height

If positioned at the current text position, this parameter specifies the horizontal spacing to be reserved for the macro/graphic, which must not be printed with text from the paragraph. This is the parameter HEIGHT of the HEX command.

Shift to right

If positioned at the current text position, this parameter specifies the space between the left border of the macro/graphic and the left border of the page window. If this value is increased, the macro/graphic is shifted to the right. This is the parameter LEFT of the HEX command.

Unit of measurement for positioning

The unit of measurement in which the position values (X,Y, height, shift) are specified. Possible values are CM (centimeters), MM (millimeters), IN (inches), PT (typographic point = 1/72 inch), TW (1/20 point = 1/1440 inch)

Text title

Comment used for the attribute "Title" of the standard text generated as well as as a comment line in the text itself

Line width

Number of columns to be used in the standard text when generating the HEX...ENDHEX command lines. The default value is 132

Text name

Name of the standard text to be generated. If an * character occurs in the name, it is replaced by the value of the parameter "Printer type". For example, if the entry is ZHEX-IMAGE1-* and the printer type = PCL, the text name ZHEX-IMAGE1-PCL is generated. The default value for the name is ZHEX-MACRO-, but the standard text can be named as required (take into account customer reserve). Standard texts are client-dependent!
Note: The name of a standard text can be up to 32 characters long !

Text ID

ID of the standard text to be generated. The default value is ST (general standard texts)

Text language

Language key of the standard text to be generated. The default value is the logon language

PostScript scaling

Flag which determines how the macros/graphics of type POST are handled. If set to 'X', the report expects a PostScript comment line in the file
%%BoundingBox llx lly urx ury (e.g. %%BoundingBox -1.5 0 21.4 14.1)
as present, for example, in all EPS files, in which the dimensions and the position of the macro/graphic are specified (if a bounding box comment is not included, 0 0 1 1 is assumed as the default value). This information is then used by the report to insert PostScript commands which scale the macro/graphic to the size specified in the parameters "Width" and "Height" (listed below).

If the flag is set to ' ' (blank), the PostScript file is transferred to the standard text without any additions (any transformations to the coordinate system used by the printer driver must already be contained in the file).

The flag must be set to 'X' for the import of TIFF files for type POST.

Width according to PS scaling

Required width of the macro/graphic if the flag PostScript scaling is set. Can remain at zero for the import of TIFF files, the size is then determined by the resolution of the graphic.

Height according to PS scaling

Required height of the macro/graphic if the flag PostScript scaling is set. Can remain at zero for the import of TIFF files, the size is then determined by the resolution of the graphic.

If you want to scale the PostScript graphic with these parameters, one of the two values, width or height, can be specified with zero. The graphic is then scaled so that the width-to-height ratio remains unchanged and the original graphic is not distorted.

Unit of measurement for PS scaling

Unit of measurement in which the parameters "Width" and "Height" are specified. Possible values are CM (centimeters), MM (millimeters), IN (inches), PT (typographic point = 1/72 inch), TW (1/20 point = 1/1440 inch)

Number of TIFF gray levels

Number of gray tones which are to be used on the printer for displaying the original image. Note: This parameter is only evaluated when using types PCL, POST or PRES!
Possible values are 2,4,9. With the default value 2, each pixel of the original image is converted either to a white or a black pixel on the printer. With the value 4, each pixel of the original image is converted on the printer with 4 pixels, which simulate 4 different gray levels. With the value 9, each pixel of the original image is converted on the printer with 9 pixels which simulate 9 different gray levels.
Note: With values 4 or 9 the resolution of the image is doubled or tripled. The restrictions on the possible resolutions (see previous parameter) then apply for the resulting resolution.

Output

Individual steps of the upload procedure are logged in the report list generated and, if necessary, errors reported. The uploading of TIFF graphics, in particular, is cancelled if there is a variant which is not supported. A message to this effect is then issued. If execution is successful, the report generates a standard text with the key specified in the parameters. If the standard text already exists, a window appears with a warning before the text is overwritten.

Example

Example 1:

The PCL-5 file A:\IMAGE.PCL is to be uploaded to the standard text ZHEX-IMAGE-PCL, ID ST, language D. The macro is to be output at the current text position, a left margin of 4 CM from the layout set window maintained, and the text continued 5 CM below the current text position. The parameters should then contain values as follows (the default values should be left in the parameters not listed below):

File name: A:\IMAGE.PCL
Type: PCL
Absolute positioning: ' '  (blank)
Reserved height: 5
Shift to right: 4
Unit of measurement for positioning: CM
Text name: ZHEX-IMAGE-*
Text ID: ST
Text language: D
PostScript scaling: ' ' (blank)

Example 2:

The PostScript EPS file A:\LOGO.EPS is to be uploaded to the standard text ZHEX-LOGO-POST, ID ST, language D. The macro is to be output at the X/Y-position 1 inch/1 inch. The EPS file is to be scaled to the size 3 x 3 inches. The parameters should then contain values as follows (the default values should be left in the parameters not listed below):

File name: A:\LOGO.EPS
Type: POST
Absolute X-position: 1
Absolute Y-position: 1
Absolute positioning: X
Unit of measurement for positioning: IN
Text name: ZHEX-LOGO-*
Text ID: ST
Text language: D
PostScript scaling: X
Width according to PS scaling: 3
Height according to PS scaling: 3
Unit of measurement for PS scaling: IN

Example 3:

An example of a TIFF import with type BMON is shown below. The parameters were assigned values as follows (the default values should be left in the parameters not listed below):

File name: /tmp/gorilla.tif
Type: BMON
Resolution for TIFF file: 150
Text title: TIFF 150 dpi gorilla
Text name: ZHEX-MACRO-*
Text ID: ST
Text language: D
PostScript scaling: X






ROGBILLS - Synchronize billing plans   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 22203 Date: 20240601 Time: 093700     sap01-206 ( 452 ms )