cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS with mixed portrait and landscape page orientation

Former Member

Hello,

I need to create an SmartForm with pages with portrait orientation and landscape orientation to generate a PDF file. I also need to print the page number on all pages.

Example:

page 1 - portrait

page 2 - portrait

page 3 - landscape

page 4 - portrait

Because I need to generate a PDF file, the SmartForm should be printer aware and I can't define printer commands to make the rotation.

The problem is that the main window in portrait orientation and landscape orientation must be the same or the FM generated will throw an exception, and that reduces the printable area on the landscape page.

Do you have any suggestion?

Thanks in advance,

Jordi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U cannot give the orientation at page level, u can give only at Header level of smartform.

also, we can give only 1 since the selection is a Raido button..

If u want to display the no of pages use smartform system variable &sfsy-formpages&..

Hope it helps!!

Regards,

Pavan

Former Member
0 Kudos

Hi Pavan,

thanks for your answer, but I'm afraid that it does not solves my problem. As you said, the page orientation is a radio button on the page header, but if I the main window width of page1 is diferent than the main window width of page 2 the execution throws an exception.

Maybe I need to create two Smartforms (one with portrait orientation and another with landscape orientation) and call them together but ... How can generate a single PDF file? Calling the two FM of the forms, could I get the OTF internal table of the forms and append the lines of the two returned internal tables (with or without modifying the content) into a new one to generate a single PDF?

Thanks,

Jordi

Answers (1)

Answers (1)

Former Member

Hi all.

The problem is solved creating a SmartForm for the portrait pages and another one for the landscape pages, i.e: ZSF1 (portrait), ZSF2 (Landscape) and ZSF3 (portrait).

Then, call the smartforms separately (get the FM value with SSF_FUNCTION_MODULE_NAME) and get the OTF internal tables of each FM call, say IT_OTF1, IT_OTF2 and IT_OTF3.

Delete the last row of IT_OTF1 and IT_OTF2.

Delete the two first rows of IT_OTF2 and IT_OTF3.

Append lines of IT_OTF1, IT_OTF2 and IT_OTF3 into a new internal table IT_OTF_FINAL.

Use IT_OTF_FINAL to generate the PDF file.

Regards,

Jordi

Edited by: Jordi Alcantara Tadeo on Apr 23, 2009 6:00 PM