Quantcast
Channel: SCN : All Content - Output Management
Viewing all articles
Browse latest Browse all 1353

Adobe Form output cropped when sent directly from SAP to printer

$
0
0

I have created an Adobe Form (not interactive) that looks perfectly OK when previewed in Adobe Acrobat viewer but when printed blank margins of 4-5 millimeters are applied on all 4 paper edges. The form was designed with a coloured frame around it but the margins effectively remove most of the frame. The form content is being cropped instead of being compressed inside the margins.

 

The form has been created with LiveCycle Designer via SAP transaction SFP. I am generating the form from an ABAP program

 

When the form is printed from the Adobe Acrobat viewer I have the option to set Page Scaling to 'Fit to Printable Area'. This makes the form content being compressed inside the blank margins and the coloured frame remains intact. If I leave the Page Scaling setting as 'None' the output is being cropped as described above.

 

The real problem occurs when I want to print without previewing first. I need to do that since previewing enables the user to skip printing and the application must know if the form has been printed or not. I have so far found no way to make the printer print on the paper edges or fit the content to printable area. Is there some setting in the output parameters than handles this?

 

Also there is a need for duplex printing when sending form directly to printer. On help.sap.com there is information about duplex print for SAPscript and Smartforms but nothing for Adobe Forms.

 

Here is an excerpt of the ABAP code used for printing the Adobe Form:

 

  DATA: zs_outparams TYPE sfpoutputparams,

             z_fmname     TYPE rs38l_fnam.

 

  • Set some print parameters

  zs_outparams-nodialog = abap_true.        "No user dialog

  zs_outparams-device   = 'PRINTER'.          "Output device

  zs_outparams-dest     = z_pdest.              "Printer name

  zs_outparams-reqnew   = abap_true.        "New spool request

  zs_outparams-reqimm   = abap_true.        "Print immediately

 

  • Open print job

  CALL FUNCTION 'FP_JOB_OPEN'

    CHANGING

      ie_outputparams = zs_outparams

    EXCEPTIONS

      cancel          = 1

      usage_error     = 2

      system_error    = 3

      internal_error  = 4

      OTHERS          = 5.

  IF sy-subrc <> 0.

    RAISE print_error.

  ENDIF.

 

  • Get FM name for form

  CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'

    EXPORTING

      i_name     = 'Z_TEST_FORM'

    IMPORTING

      e_funcname = z_fmname.

 

  • Call FM to print form

  CALL FUNCTION z_fmname

    EXPORTING

      i_header       = t_data_for_form

    EXCEPTIONS

      usage_error    = 1

      system_error   = 2

      internal_error = 3

      OTHERS         = 4.

  IF sy-subrc <> 0.

    RAISE print_error.

  ENDIF.

 

  • Close print job

  CALL FUNCTION 'FP_JOB_CLOSE'

    EXCEPTIONS

      usage_error    = 1

      system_error   = 2

      internal_error = 3

      OTHERS         = 4.

  IF sy-subrc <> 0.

    "Ignore

  ENDIF.

 

 

Please advise on how to

-  avoid the content cropping

-  enable duplex print

when sending Adobe forms directly to the printer

 

Thanks very much!

 

Bernt Evensen


Viewing all articles
Browse latest Browse all 1353

Trending Articles