I have a SmartForm containing a color graphic. It works correctly,
appears just the way it should in Print Preview, and it prints
correctly. However, when I generate a PDF file from, Adobe Reader
complains that the PDF file is corrupt and refuses to print it. If I
remove the color graphic from the SmartForm and don't make any other
changes, I get a good PDF file that can be parsed, displayed, and
printed without any problems.
Why is the presence of the color graphic in the SmartForm leading to a
corrupt PDF file? Is there any workaround (short of removing the color
graphic) that I can use to get a good PDF file?
Here is a more detailed description of what I am doing.
1. Creating the color graphic A. I started with a color .TIF file B. I went to transaction SE78, Form Graphics -> Stored on Document Server -> GRAPHICS General Graphics -> BMAP Bitmap Images C. Clicked on the "Import" icon D. In the "File name" field, navigated to my .TIF file E. Typed the name of my graphic in the "Name" field and some descriptive text in the "Description" field F. Selected the "Color Bitmap Image" radio button G. Set the "Print Attributes" as follows: Unchecked - Resides in the Printer Memory Checked - Reserve Height Automatically Unchecked - Compression H. The color graphic seems to upload correctly I. When I click on Print Preview, it is displayed perfectly. J. When I use the Search Help associated with the name field to find the graphic, it is shown with the name and description that I gave it, the Object field is displayed as "GRAPHICS", the ID field is displayed as "BMAP". K. When I select Graphic -> Graphic Information, the Resolution is 75 DPI and the Size is 26.86 x 8.26 cm. When I use this graphic in the SmartForm, I will enter the resolution as 300 DPI - in order to get an image whose dimensions are one-quarter of these dimensions, but which will have a good resolution for a laser printer. 2. The use of the color graphic in the SmartForm A. It is a "Graphic" node which is the first node on the first (and only) page of the SmartForm. i. The Name is the name of the graphic I created ii. Object = "GRAPHICS" iii. ID = "BMAP" iv. The "Color Bitmap Image (BCOL)" radio button is selected v. The Resolution = 300 DPI B. The position and size are: i. Left Margin = 15.00 MM ii. Width = 69.00 MM iii. Upper margin = 15.00 MM iv. Height = 21.77 MM 3. The process of producing the PDF file A. The function SSF_FUNCTION_MODULE_NAME is called to obtain the name of the function module associated with the SmartForm. B. The function module (whose name was returned by SSF_FUNCTION_MODULE_NAME) is called with: i. CONTROL_PARAMETERS = a SSFCTRLOP structure with GETOTF = 'X' NO_OPEN = space NO_CLOSE = space NO_DIALOG = 'X' ii. OUTPUT_OPTIONS = a SSFCOMOP structure with: TDPRINTER = 'POST2' TDDEST = space TDNEWID = 'X' TDIMMED = 'X' TDDELETE = space TDCOVER = space TDCOPOES = 1 iii. JOB_OUTPUT_INFO = a structure of type SSFCRESCL used to receive the OTF file C. The function CONVERT_OTF is called with: i. FORMAT parameter = 'PDF' ii. OTF table parameter = the OTFDATA table contained within the JOB_OUTPUT_INFO SSFCRESCL structure returned from the SmartForm function module. iii. BIN_FILE parameter = an XSTRING used to receive the PDF file iv. BIN_FILESIZE parameter = an integer used to receive the size of the PDF file.