cancel
Showing results for 
Search instead for 
Did you mean: 

SPOOL To PDF Attachment with LOGO-PageFormat Issue

Former Member
0 Kudos

Dear Community,

I am facing one typical issue while printing a PDF attachment from email.

If you have any similar experiance or thought please share with me.

Here is the scenario, please read the till end:

1. We are sending email to customer with a PDF attachment.

    PDF has a logo(bmp) within it.

2. When printing the PDF (received from the email) with default windows printer settings(auto orientation) the print layout is generating as landscape.

However, when we are printing with Orientation as Portrait and size orientation as actual(changing the default windows printer settings in the print command window ) then the printout is generating as expected.

So here the problem is why windows default printer settings is not able to print the document in actual size and orientation as portrait format where as while printing from spool directly that time it is generting correct layout.

Process used to generate PDF attachment:

1.  CALL FUNCTION 'PRINT_TEXT'  --> This is used here in stead of CONVERT_ABAPSPOOLJOB_2_PDF/ CONVERT_OTFSPOOLJOB_2_PDF because of LOGO printing in PDF attachment.

2. Next step is CALL FUNCTION 'CONVERT_OTF_2_PDF'

3.Next step CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'

4. Next Step : CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'

5. Next Step:   CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

..

..

Next    CALL METHOD cl_document_bcs=>create_document

Next    CALL METHOD lv_obj_document->add_attachment -->

Note: we are using LOCL as printer device in PRINT_TEXT function module.

These are pretty much standard steps I believe but only problem is we are not able to control the page sise and page orientation during spool to pdf conversation.

Can Anybody help me here.

Thanks

Shibasis

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Still No Reply..

Just to add one more input.

I am using all standard Texts here.. not PDF or smartforms.

Pls. guide me how to change the default page/print parameters while using PRINT_TEXT.

Thanks

Shibasis