Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Rotated table not working

Avatar

Level 2

I am trying to rotate a table in our documentation and cannot get it to work. I have set the orient attribute on the table element to "land", but it is not showing up when I preview the document in the XML Editor or when I generate a PDF output. 

 

rotated-table-01.png

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Nicole,

The landscape table needs a new vertical landscape PDF page layout.

Steps to create vertical landscape PDF page layout:

  1. Create a new PDF page layout ("VerticalLandscape") by duplicating the "Landscape" layout.
  2. Open Page Properties right panel. 
  3. Add view rotation properties with anticlockwise 90 degree Screenshot 2022-09-19 at 6.21.03 PM.png
  4. Save the page layout file.

Steps to link new page layout via CSS:

  1. Create a style 'orient-land' in content.css Screenshot 2022-09-19 at 3.26.13 PM.png
  2. Add the newly created page "VerticalLandscape" to page propertiesScreenshot 2022-09-19 at 3.26.40 PM.png
  3. Save the content.css file.

 

Now generate the PDF. It will create a separate page for orient="land" tables.

 

Regards,

Gunjan Kumar

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Hi Nicole,

The landscape table needs a new vertical landscape PDF page layout.

Steps to create vertical landscape PDF page layout:

  1. Create a new PDF page layout ("VerticalLandscape") by duplicating the "Landscape" layout.
  2. Open Page Properties right panel. 
  3. Add view rotation properties with anticlockwise 90 degree Screenshot 2022-09-19 at 6.21.03 PM.png
  4. Save the page layout file.

Steps to link new page layout via CSS:

  1. Create a style 'orient-land' in content.css Screenshot 2022-09-19 at 3.26.13 PM.png
  2. Add the newly created page "VerticalLandscape" to page propertiesScreenshot 2022-09-19 at 3.26.40 PM.png
  3. Save the content.css file.

 

Now generate the PDF. It will create a separate page for orient="land" tables.

 

Regards,

Gunjan Kumar

Avatar

Level 2

Thanks, Gunjan. I can now get the table to show up in landscape orientation. However, the topic title doesn't stay with the landscape table. The topic title stays by itself on the previous page, as if there's a page break between the topic title and the landscape table. How can I get the topic title to stay with the landscape table?

 

Nicole

Avatar

Employee

Hi Nicole,

 

You can move any DITA content block to a different PDF page layout. Here you can add an output class (say "vertical-topic") to the topic containing the landscape table. Then instead of adding "orient-land", add "vertical-topic" in the CSS file. And add page "VerticalLandscape" to page properties of "vertical-topic".

 

Now generate the PDF. It will create a separate page for topics having outputclass="vertical-topic".

 

Regards,

Gunjan Kumar