Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Columns of requirements class table are too narrow on the PDF #629

Closed
ghobona opened this issue Feb 5, 2024 · 7 comments
Closed

Columns of requirements class table are too narrow on the PDF #629

ghobona opened this issue Feb 5, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@ghobona
Copy link

ghobona commented Feb 5, 2024

Requirements Class 2 on pdf page 52. Table is not filling the width of the page.

The result is that the columns become too narrow.

https://opengeospatial.github.io/ogcna-auto-review/22-003.pdf

Screenshot 2024-02-05 at 12 12 13

@ronaldtse
Copy link
Contributor

@Intelligent2013 could you please help urgently? Thanks.

@ronaldtse ronaldtse added the bug Something isn't working label Feb 5, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Feb 5, 2024
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Feb 5, 2024
@Intelligent2013 Intelligent2013 moved this from 🌋 Urgent to 🏗 In progress in Metanorma Feb 5, 2024
@Intelligent2013
Copy link
Contributor

XML fragment:

<table id="rc_movingfeature" class="modspec" type="recommendclass">
	<thead>
		<tr>
			<th scope="colgroup" colspan="2">
				<p class="RecommendationTitle">Requirements class 2: Requirements Class ‘Moving Features’</p>
			</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th>Identifier</th>
			<td>
				<tt>http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/req/movingfeatures</tt>
			</td>
		</tr>

Internally, in XSL-FO the table contains 6 columns with non determined widths:

<fo:table id="rc_movingfeature" table-omit-footer-at-break="true" table-layout="fixed" width="100%">
	<fo:table-column column-width="proportional-column-width(NaN)"/>
	<fo:table-column column-width="proportional-column-width(NaN)"/>
	<fo:table-column column-width="proportional-column-width(NaN)"/>
	<fo:table-column column-width="proportional-column-width(NaN)"/>
	<fo:table-column column-width="proportional-column-width(NaN)"/>
	<fo:table-column column-width="proportional-column-width(NaN)"/>
	<fo:table-header>

I'll investigate what's happened.

@ronaldtse FYI, the current issue doesn't relate to the mn2pdf, but https://opengeospatial.github.io/ogcna-auto-review/22-003.pdf generated by mn2pdf version 1.50 (Sep 3, 2022)
image

The latest version is 1.82 (https://github.com/metanorma/mn2pdf/releases/tag/v1.82)

May be something wrong in the metanorma container?
From https://github.com/opengeospatial/ogcna-auto-review/blob/main/.github/workflows/generate_22-003.yml:

jobs:
  build:
    runs-on: ubuntu-latest
    container: metanorma/metanorma:latest
...

Intelligent2013 added a commit to metanorma/mn2pdf that referenced this issue Feb 5, 2024
Intelligent2013 added a commit to metanorma/mn2pdf that referenced this issue Feb 5, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Feb 5, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Feb 5, 2024
@Intelligent2013
Copy link
Contributor

@ronaldtse issue fixed in https://github.com/metanorma/metanorma-ogc and https://github.com/metanorma/mn2pdf/releases/tag/v1.83.
(The issue was in the table processing algorithm with the ids rc_movingfeature and rc_movingfeature_collection, both start with the same prefix rc_movingfeature_ in the algorithm).

@Intelligent2013 Intelligent2013 moved this from 🏗 In progress to ✅ Done in Metanorma Feb 5, 2024
@Intelligent2013
Copy link
Contributor

Intelligent2013 commented Feb 5, 2024

Resulted PDF:
image

@ronaldtse
Copy link
Contributor

@Intelligent2013 it's a little strange that the table column balancing depends on the ID...?

@Intelligent2013
Copy link
Contributor

@Intelligent2013 it's a little strange that the table column balancing depends on the ID...?

@ronaldtse table column balancing algorithm based on the Apache Intermediate Format (IF) XML processing. Apache IF XML doesn't contain table 'as is'. It contains the portions of the text with the 'x,y' coordinates. For identifying the relation each text to the table, we need to mark each text with id = table's id + row number + column number. In the algorithm there was issue with the extraction the row number + column number after the table's id. Now it's fixed.

@ghobona
Copy link
Author

ghobona commented Mar 19, 2024

Discussed 2024-03-19

Confirmed that the fix worked.

@ghobona ghobona closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants