• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

RH 2020.4.173 new UI: issue with PDF output with tables using master page and own css

Enthusiast ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Hi All,

I am having an issue with PDF-output using RH new UI 2020.4.173 with master page and tables.
For a test, I created a file containing a table. The table width is defined to be 100%. I also created a new css-file containing a style for this table (here, no width is defined, just colors etc.). Then I created a new master page and assigned my new css to it additionally to the other css "book" and "default".

 

When I run the PDF output, I use the layout setting "Page Margin = 15mm". However, the width of my table does not consider this margin but runs farther to the side. It only works, if my own css is not added to the master page. However, then of course my styles are missing. As soon as I add my css to the master page, the table grows too big.

 

I even tried to define a margin for the body-part of the master page. This leads to the normal text having a too large margin, but the table is still too big.

 

This has been working in version 2020.2.29.

 

Can anyone point me towards what I'm doing wrong here? Thanks in advance for any help.

 

If this helps, here are my code sections:

My css (KA.css):

 

/*Created with Adobe RoboHelp*/
table.BlueWhite {
border-collapse: collapse;
font-family: Arial;
border-width: 1px;
border-style: solid;
border-color: #C0C0C0;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #C0C0C0;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #C0C0C0;
border-right-width: 1px;
border-right-style: solid;
border-right-color: #C0C0C0;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #C0C0C0;
}
table.BlueWhite td {
padding-top: 1px;
padding-right: 1px;
padding-bottom: 1px;
padding-left: 1px;
}
table.BlueWhite tr:nth-child(even) td {
background-color: #CADAFA;
}

 

 

New_Master_Page

 

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Adobe RoboHelp 2020" />
<title>New Master Page</title>
<meta name="topic-status" content="Draft" />
<link rel="stylesheet" type="text/css" href="../css/default.css" />
<link rel="stylesheet" type="text/css" href="../css/book.css" />
<link rel="stylesheet" type="text/css" href="../css/KA.css" />
</head>
<body>
<div data-region="header">
<p style="text-align: right"><span data-field="title" data-format="default">New Master Page</span></p>
</div>
<div data-region="topic">
<p>This is Body Placeholder text for your Master Page. Topics created using this Master Page will get this text by default. Replace text of this Body Placeholder with your default content for topics.</p>
<p> </p>
<p>Area outside this Body Placeholder represents the layout of the Master Page which will not be shown in the associated topics but will be present in the output. The Body Placeholder content will be replaced by actual topic content in the output.</p>
<p> </p>
<p>Use Master Page to define the layout of your topic in the output.</p>
</div>
<div data-region="footer">
<table border="1" cellpadding="1" cellspacing="1" style="border-collapse:collapse; width:100%">
<colgroup>
<col style="width:50%" />
<col style="width:50%" />
</colgroup>
<tbody>
<tr>
<td>Copyright KMS</td>
<td style="text-align: right"><span data-field="page-number" data-format="default">1</span> from <span data-field="total-pages" data-format="default">1</span></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

 

 

First_Topic

 

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Erstes Thema</title>
  <meta name="topic-status" content="Draft" />
  <meta name="generator" content="Adobe RoboHelp 2020" />
  <link rel="stylesheet" type="text/css" href="assets/css/KA.css" />
</head>
<body>
  <h1>Erstes Thema</h1>
  <p>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</p>
  <p> </p>
  <p>Um mehr über den Editor zu erfahren, drücken Sie <b>F1</b> (mit dem Cursor in diesem Bereich), um Hilfe anzuzeigen.</p>
  <p> </p>
  <table border="1" cellpadding="1" cellspacing="1" class="BlueWhite" style="border-collapse:collapse; width:100%">
    <colgroup style="">
      <col style="width:12.5%" />
      <col style="width:12.5%" />
      <col style="width:12.5%" />
      <col style="width:12.5%" />
      <col style="width:12.5%" />
      <col style="width:12.5%" />
      <col style="width:12.5%" />
      <col style="width:12.5%" />
    </colgroup>
    
    <tbody>
      <tr>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
      </tr>
      <tr>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
      </tr>
      <tr>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td> </td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td>Dies ist das erste Thema in Ihrem Projekt. Löschen Sie diesen Text und ersetzen Sie ihn durch Ihren eigenen. Um ein neues Thema hinzuzufügen, klicken Sie in der Symbolleiste auf die Schaltfläche <b>Neues Thema</b>.</td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
    </tbody>
  </table>
</body>
</html>

 

 

This is how the output looks like (without considering the right margin):

image.png

Views

214

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 12, 2021 Apr 12, 2021

Also try creating another table with your style but just put numbers 1 to 8 in a row. I'm wondering if something in the content is causing this, any images further down?

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Votes

Translate

Translate
Community Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Was the test working in 2020.2 or something similar?

 

Try testing with the master page set in the order ka.css, default.css and book.css. Also test copying the codef of the table from default.css to the end of ka.css and removing default.css. 

 

I'm thinking maybe there is a conflict with cascading.

 

I also notice your header looks too far to the right. I had to fix that in a test by applying a margin indent to it.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Thanks for your reply, Peter. Cascading issue is also what I was suspecting. However, I tried all orders of the css-files and nothing works. It only works, if KA.css is omitted.

I do not have any table style at all in the default.css. I ran another test having only book.css and KA.css assigned to the master page and KA.css before book.css. Then, the table grows even larger and runs out of the page.

image.png

As for the header: you mean it is too far to the right? It is, but here I know how to fix it.

 

The table size did work in my main projects in 2020.2. As these did not work with update 4, I created a small test to further analyse. I will re-create this test for 2020.2 and report back.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

I just verified that this problem did not exist in 2020.2

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

I just spotted that I confused left and right as well so that is corrected.

 

Try putting that table definition at the end of default.css and removing that from the master page.

 

If that fails then maybe a bug has been introduced given this all worked before. I know both PDF and tables have been worked on.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

In the test project create an 8 column table using the toolbar icon. Add a few rows and with the cursor in the table go to the table icon on the right. Apply the template that is alternate clear and grey.

 

Generate that and see what the result is. 

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

I'm not sure if I understood which style should be defined where and what style sheets I should apply to the master page ^^.

However, here a couple of tests: 

- table style defined in KA.css and copied to default.css

- KA.css, default.css and book.css assigned to master page in all possible orders - doesn't work (table too far to the right)

- KA.css and book.css assigned to master page - doesn't work (table runs out of page)

- default.css and book.css assigned to master page - doesn't work (table too far to the right)

 

Or did I get you completely wrong now?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

So with the table CSS in both default and KA it fails no matter what you do. I actuall meant move rather than copy but see my later reply.

 

If you do that and it works, then the issue seems to be your table definition rather than cascading. The next step would be to compare the code definition of the styles.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Also try creating another table with your style but just put numbers 1 to 8 in a row. I'm wondering if something in the content is causing this, any images further down?

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Send me the test project if you haven't been able to fix this.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 13, 2021 Apr 13, 2021

Copy link to clipboard

Copied

LATEST

I got this fixed. In the first case, you were right that there was a word causing the table being to broad. Also, I got to work this in my existing projects. There, I detected some error in the css that did not cause problems in previous versions but does now.

Thanks for your support, Peter!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp