Git Product home page Git Product logo

mn-native-pdf's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mn-native-pdf's Issues

ISO: Boilerplate text should be in Metanorma-ISO instead of stylesheet

These lines should refer to Metanorma XML content:

<fo:block-container font-size="10pt" margin-top="12pt" margin-bottom="6pt" margin-left="1.5mm" margin-right="1.5mm" border="0.5pt solid black">
<fo:block text-align="center" font-weight="bold">Warning for WDs and CD</fo:block>
<fo:block margin-top="6pt" margin-bottom="6pt">This document is not an ISO International Standard. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an International Standard.</fo:block>
<fo:block>Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="document" format="i" force-page-count="no-force">
<xsl:call-template name="insertHeaderFooter"/>
<fo:flow flow-name="xsl-region-body">
<fo:block-container margin-top="12pt" margin-bottom="6pt" margin-left="1.5mm" margin-right="1.5mm" border="0.5pt solid black">
<fo:block margin-bottom="12pt">© ISO 2019, Published in Switzerland.</fo:block>
<fo:block font-size="10pt" margin-bottom="12pt">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of the requester.</fo:block>
<fo:block font-size="10pt" text-indent="7.1mm">
<fo:block>ISO copyright office</fo:block>
<fo:block>Ch. de Blandonnet 8 • CP 401</fo:block>
<fo:block>CH-1214 Vernier, Geneva, Switzerland</fo:block>
<fo:block>Tel. + 41 22 749 01 11</fo:block>
<fo:block>Fax + 41 22 749 09 47</fo:block>
<fo:block>[email protected]</fo:block>
<fo:block>www.iso.org</fo:block>

This can only be done after the upstream issue is complete:
metanorma/metanorma-iso#292

This is for @Intelligent2013

ISO: Differences in structure of iso-rice-en and iso-rice-zh

There are differences between xml and doc for ISO rice.

  1. In iso-rice-zh.xml there isn't section/preface/introduction, looks like it moved into sections/clause (first clause), i.e. second clause in iso-rice-zh.xml is first clause (Scope) in iso-rice-en.xml.

  2. If compare docs iso-rice-en.doc and iso-rice-zh.doc :

  • in iso-rice-zh.doc section 'Normative references' (7 elements) moved at the end of document as Bibliography (7 elements)
  • in iso-rice-zh.doc there isn't last Bibliography section which contains 16 elements (in iso-rice-en.doc).
    But xml there are such data.
  1. In iso-rice-en.xml the section 'Terms and definitions' placed in terms/term tag, but iso-rice-zh.xml this section placed in clause/clause tag.
    These texts 'paddy', 'husked rice', 'milled rice' display in Contents table (see image), because they are in clause/clause (we show 1st and 2nd level titles from clauses).

Untitled

ITU G.650 document review (continued from #60)

ITU G.650

Vertical spacing differs on the front page.

I don't see a differs on the front page. Which tool do you use to open DOC? I use Word 2010.

I am converting Word to PDF, and then comparing two PDFs in Adobe Acrobat Reader.
This is an example of a difference I see (spacing before "Series"):

DOC:
image

PDF:
image

DOC has an additional page after the front page (with TRANSMISSION SYSTEMS AND MEDIA, DIGITAL SYSTEMS AND NETWORKS) and a blank page after the Table of Contents.

I've added an additional page after the front page in PDF. But I don't see a black page after the ToC in DOC.

I am generating DOC with Metanorma::ITU 1.0.11 and I'm still getting one blank page after the ToC (as in the original document). Are we using the same version?

Crossreferences contain more detailed information in PDF (e.g. [ITU-T G.652 (11/2016)] in PDF, while [ITU-T G.652] in DOC).

This is no longer an issue. I see no differences.

References in "References" section contain the word "Recommendation" in DOC, unlike in PDF.

I need a rule 'In which case I put 'Recommendation' word in References section.

In this document, all ITU references include the word "Recommendation". However, I'm not sure whether this is a rule for ITU documents in general.

"Definition" section in PDF doesn't contain the sentence "This Recommendation defines the following terms:", unlike in DOC.

PDF includes this section now, so this is no longer an issue.

Equations are numbered differently. For example, (5) in PDF is (3-5) in DOC.

I don't see a differences.

Example of differences I can see is below. Please note that cross-references to equations differ, as well.

DOC:
image

PDF:
image

In PDF, inequality is cross-referenced as "Equation (3)", while it's cross-referenced as "inequality (3-3)" in DOC.

This is no longer an issue.

Appendices are not cross-referenced in PDF, unlike in DOC (e.g. sentence: (...) and coherent MPI test methods are described in Appendix IV of this Recommendation.).

This is no longer an issue.

Figures are not rendered in PDF at all - text is inserted instead.

This is no longer an issue.

Cross-references to figures are missing in PDF (probably because figures are not rendered in PDF).

This is no longer an issue.

Cross-references to notes are missing in PDF. For example, in DOC: "(...) concentricity error (see Note 2 in clause 3.3.7)", while "(...) "(...) concentricity error (see )" in PDF.

Fixed.

Yes, cross-references to notes are introduced in PDF. However, I think when note is in the same section as the text that refers to it, then there should be no "Clause (...)" part. At least this is a difference in comparison to DOC version.

DOC:
image

PDF:
image

In section 6.4.2.2.8, the word "clause" is duplicated due to cross-referencing in PDF: "See clause Clause 6.4.1.2.5".

I don't see in PDF. May be it was fixed in source data yet.

Yes, it's fixed.

Matrix in section 6.4.4.3 isn't rendered properly in PDF.

This is no longer an issue.

Sentence "(This annex forms an integral part of this Recommendation.)" is duplicated in annexes of PDF.

This is no longer an issue.

Section numbers are duplicated in Annex IV in PDF.

This is no longer an issue.

In DOC, there are equations that get right-aligned and their reference number center-aligned.

Looks like DOC has an extra tab before these equations.

This issue occurs for the equations which are written as a part of the text after some bullet (therefore indented, I guess tab comes from there). In other words, if something like following is used in .adoc, equations are not centered:
image

Other noticed differences:

  • Generated DOC: missing docnumber G.650.1 above the date and at the end of the front page, as well as in the header and footer on the other pages.

DOC (issue is yellow highlighted):
image
image
image

PDF:
image
image
image

  • In generated DOC, copyright title "© ITU 2020" is not centered.

DOC:
image

PDF:
image

  • Both DOC and PDF have some issues with Scope section. Additional (unneeded) text is added (Definitions).

DOC:
image

PDF:
image

Original:
image

  • Definitions section is rendered badly in DOC. Some additional text is added - and the section is rendered as Scope. Terms and definitions (subsections) are not generated. Due to this issue, some cross-references are not properly rendered (because these sections were not generated): [term_mode_field_diameter], [term_cladding_diameter], [term_cladding_non_circularity], [term_core_concentricity_error], [definitions], [glass_geometry_characteristics]. The same applies for the cross-references to equations from Definitions section, which are generated in DOC as: Equation (???-2), Equation (???-4) and Equation (???-5).

DOC:
image
image
image

PDF:
image

  • Section 6: Note is numbered in PDF and unnumbered in DOC.

DOC:
image

PDF:
image

  • Equation (II-2) is split into multiple lines in DOC, unlike in PDF. Since it is a long equation, it doesn't fit into margins in PDF and the number of equation is therefore not visible at all.

DOC:
image

PDF:
image

  • It seems that in Bibliography in PDF, one reference is not generated properly: "[[b-ITU-T G.Suppl.47]][b-ITU-T G.Suppl.47],".

DOC:
image

PDF:
image

  • Generated DOC and PDF have a different copyright year, comparing to the original.

Original:
image

Generated PDF:
image

I also noticed some mark-up issues, which are corrected in metanorma/mn-samples-itu#70.

Font inclusion warnings

I'm seeing these font warnings in mn-native-pdf-nist.

WARNING: Font "Cambria Math,normal,700" not found. Substituting with "Cambria Math,normal,400".
WARNING: Font "HanSans,italic,700" not found. Substituting with "HanSans,italic,400".

Are these font weights missing? Can we include them in mn2pdf?

P.S. Why is HanSans used in NIST documents?

Editor: Do ITU document review

Visual diff on the ITU documents against the Word version in mn-samples-itu. We need to ensure the Word and PDF version matches.

Unable to compile XSLTs on macOS

I'm getting this error on running make:

make 
XSLT_PATH_CORE=xslt_src/iec.international-standard.core.xsl; \
	XSLT_PATH_MERGE=xslt_src/merge.xsl; \
	java -jar xalan/xalan.jar -IN $XSLT_PATH_CORE -XSL $XSLT_PATH_MERGE -OUT xslt/iec.international-standard.xsl

(Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError): org/apache/xml/serializer/SerializerTrace
Exception in thread "main" java.lang.RuntimeException: org/apache/xml/serializer/SerializerTrace
	at org.apache.xalan.xslt.Process.doExit(Process.java:1155)
	at org.apache.xalan.xslt.Process.main(Process.java:1128)
make: *** [xslt/iec.international-standard.xsl] Error 1

@Intelligent2013 would you have idea why? I've tried OpenJDK 8 and also 13, but the error is still the same. Thanks!

ISO: Do diff with ISO Word CSS

(This ticket is not ready to be acted on)

@opoudjis will be providing instructions to retrieve ISO Word CSS so that the PDF output can be 100% matching.

We will also need to do a visual diff between the two types of output.

ITU: xml markup in document text

In source/itu-T-Editing-Guidelines-201602.xml there is a markup:

<p id="_7571feeb-d6f1-47bc-a445-0ad010b90a56">The draft <title of="" the="" draft="">, which is proposed for approval, consent or determination:</title>
		</p>

which displayed in doc as:
The draft <title of="" the="" draft="">, which is proposed for approval, consent or determination:</title>
But in point of view of xml the tag <title is usual tag, not simple text. I think this text should be coded as:
&lt;title .... &gt;, ... &lt;/title&gt;
for correct processing in xslt in displaying in PDF.

Degrade gracefully if fonts not found

The XSLT stylesheets are going to be used in arbitrary operating systems, and that means that the attempt to find the "right" font directory for fonts to use in PDF generation may fail. The stylesheets need to deal with that eventuality, and degrade gracefully if the expected fonts are not found, by still generating output with (presumably) system default fonts.

Editor: Do OGC document review

@metanorma/editors can you please help review the OGC PDF documents generated compared to the Word documents generated from Metanorma?

Please help split the work beforehand since there is quite a bit. Thanks!

UN: Issues in XML

In xml: https://metanorma.github.io/mn-samples-un/documents/ECE_TRADE_437E_Rec42.xml there are a few issues, which don't allow to correct display PDF via XSL-FO:

  • hard-coded paragraph number '24.':
    ... databases and the generation of appropriate indicators. 24. Other trade ...

  • Box 1 has a 'Source:' text with a font-size (9pt) a bit smaller then main font (10pt)
    image

but in xml this text markup as 'p':

<p id="_49bc4c63-f463-487d-a8c4-5843f89f61e8">
Another difference between BPA and the other two methods (TRS and TCD/CPMM) is that BPA not only provides indicators, but also provides a ‘standard’ way of analyzing indicators, trade procedures, identifying bottlenecks and diagnosing trade barriers—while the other two methods mainly provide indicators.
</p>
<p id="_876caf99-ea5b-438e-b1d7-4a5de4a915c4">
Source: The box is derived from an ESCAP-ADB publication entitled
<em>
Towards a National Integrated and Sustainable Trade and Transport Facilitation Monitoring Mechanism: BPA+
</em>
(2014). Available as of 14 December 2016 at:
<link target="http://www.unescap.org/resources/towards-national-integrated-and-sustainable-trade-and-transport-facilitation-monitoring"/>
.
</p>
</admonition>

ISO: Table width auto layout

From @Intelligent2013

in xml there isn't column width attribute for tables, so Apache FOP displays columns with equal width (table-layout="auto" feature isn't implemented by Apache FOP yet). I'll try to solve it by calculate proportional width by content for each column.

Editor: do ISO document revirw

Visual diff on the ISO document against the Word version in mn-samples-iso. We need to ensure the Word and PDF version matches.

The authoritative PDF is the ISO Rice document on ISO.org.

Align with original ISO Rice document and optional cover page styles

@Intelligent2013 this issue is to visually align 100% (if possible) with the original ISO Rice document:

https://github.com/metanorma/mn-samples-iso/blob/master/reference-docs/iso-rice-sample.pdf

Notice that the cover page is different. This is the cover page for "Published" documents. The Word DOC version cover page is for "Unpublished" documents. We will need to allow generating both types of cover pages.

Originally posted by @ronaldtse in #34 (comment)

ISO: Non-Latin characters showing up as "#"

From @Intelligent2013 :

korean, hebrew characters show as '#'. The font 'Cambria' doesn't contains glyphs for such characters. In Word we see these characters correctly because Word substitutes another font (Malgun Gothic as I understood) to display them.

Enable PDF Accessibility in output

Apache FOP supports accessibility options:
https://xmlgraphics.apache.org/fop/2.4/accessibility.html

Metanorma XML supports accessibility options as shown here:
https://www.metanorma.com/blog/2019-10-08-metanorma-accessibility-html-word/

We should also enable PDF/UA

Here's what we need to do:

In Adobe Acrobat, the "Description" tab, we need to have:

  • Title: [full title of document]
  • (for the flavors that support them) Author: [list author names in the order they appear in the document, separated by semicolons]
  • Subject: [Abstract]
  • Keywords: [Keywords]
  • Advanced > Tagged PDF: Yes
  • Advanced > Fast Web View: Yes

"Fonts" tab:

  • All fonts used are embedded (or indicated “Embedded Subset”)

"Initial view" tab:

  • Window Options > Show: Document Title

"Advanced" tab:

  • "Reading Options" > Language: English

Implement ISO PROOF layout

Difference from FINAL:

  • every content page (all pages except front cover page) has "PROOF/ÉPREUVE" in the footer center, bolded
  • front page contains large print of "PROOF/ÉPREUVE"

iso-cover-proof-1
iso-cover-proof-2
iso-cover-proof-3
iso-cover-proof-4

IEC: 'domain' field in DOC

In xml https://metanorma.github.io/mn-samples-iec/documents/iec-rice.xml there 'domain' field in 'waxy rice' term:

<term id="_waxy_rice">
	<preferred>waxy rice</preferred>
	<definition>
		<p id="_12793fe3-c974-41e6-9fac-90547eb61eaa">variety of rice whose kernels have a white and opaque appearance</p><p id="_8acd11e5-7b99-4a95-96cb-1217281640f7">organic and inorganic components other than whole or broken kernels</p>
	</definition>
	<admitted>EM</admitted>
	<domain>rice</domain>
	<termexample id="_f66f5418-2c4b-49fc-9e42-58311d910e4d">
		<p id="_3719a14c-9efe-40e6-9e17-f8ed8b093e4c">Foreign seeds, husks, bran, sand, dust.</p>
	</termexample>
</term>

But in doc (https://metanorma.github.io/mn-samples-iec/documents/iec-rice.doc) this field omitted:
image

Should I put it in PDF or not?

UN: Update Plenary layout

Editor: do UN document review

Visual diff on the UN documents (Recommendation, Plenary) against the Word version in mn-samples-un. We need to ensure the Word and PDF version matches. (And the original PDFs provided)

ISO: Setup Chinese font for produce PDF

Source xml:iso-rice-zh.xml,
Necessary to find SimSun font for ubuntu and add step into workflow (on windows pdf display ok with SimSun font), or find similar good font.

ITU: Error in table cell?

See itu-Y.3507-201812.xml

2019-12-04T19:40:45.6310680Z Dec 04, 2019 7:40:45 PM org.apache.fop.events.LoggingEventListener processEvent
2019-12-04T19:40:45.6312510Z INFO: An fo:block  (See position 861:12) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
2019-12-04T19:40:45.7909660Z javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: null:2581:18: A table-cell is spanning more rows than available in its parent element.
2019-12-04T19:40:45.7914370Z 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
2019-12-04T19:40:45.7915050Z 	at com.metanorma.fop.XML2PDF.convertXML2PDF(XML2PDF.java:93)
2019-12-04T19:40:45.7915620Z 	at com.metanorma.fop.XML2PDF.main(XML2PDF.java:148)
2019-12-04T19:40:45.7916150Z 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2019-12-04T19:40:45.7916760Z 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2019-12-04T19:40:45.7917360Z 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2019-12-04T19:40:45.7917920Z 	at java.lang.reflect.Method.invoke(Method.java:498)
2019-12-04T19:40:45.7918560Z 	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
2019-12-04T19:40:45.7919130Z 	at java.lang.Thread.run(Thread.java:748)
2019-12-04T19:40:45.7920350Z Caused by: org.apache.fop.fo.ValidationException: null:2581:18: A table-cell is spanning more rows than available in its parent element.
2019-12-04T19:40:45.7921060Z 	at org.apache.fop.fo.flow.table.FixedColRowGroupBuilder.endTablePart(FixedColRowGroupBuilder.java:181)
2019-12-04T19:40:45.7921670Z 	at org.apache.fop.fo.flow.table.TablePart.finishLastRowGroup(TablePart.java:139)
2019-12-04T19:40:45.7922240Z 	at org.apache.fop.fo.flow.table.TablePart.finalizeNode(TablePart.java:116)
2019-12-04T19:40:45.7923630Z 	at org.apache.fop.fo.FONode.endOfNode(FONode.java:350)
2019-12-04T19:40:45.7924410Z 	at org.apache.fop.fo.FObj.endOfNode(FObj.java:220)
2019-12-04T19:40:45.7924800Z 	at org.apache.fop.fo.flow.table.TableBody.endOfNode(TableBody.java:48)
2019-12-04T19:40:45.7925140Z 	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:362)
2019-12-04T19:40:45.7925460Z 	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
2019-12-04T19:40:45.7925810Z 	at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
2019-12-04T19:40:45.7926180Z 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
2019-12-04T19:40:45.7926560Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
2019-12-04T19:40:45.7926950Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
2019-12-04T19:40:45.7927360Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
2019-12-04T19:40:45.7927730Z 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
2019-12-04T19:40:45.7928110Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
2019-12-04T19:40:45.7928480Z 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
2019-12-04T19:40:45.7928830Z 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
2019-12-04T19:40:45.7929180Z 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
2019-12-04T19:40:45.7929520Z 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
2019-12-04T19:40:45.7929880Z 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
2019-12-04T19:40:45.7930190Z 	... 8 more
2019-12-04T19:40:45.7930910Z ---------
2019-12-04T19:40:45.7931640Z org.apache.fop.fo.ValidationException: null:2581:18: A table-cell is spanning more rows than available in its parent element.
2019-12-04T19:40:45.7932040Z 	at org.apache.fop.fo.flow.table.FixedColRowGroupBuilder.endTablePart(FixedColRowGroupBuilder.java:181)
2019-12-04T19:40:45.7932380Z 	at org.apache.fop.fo.flow.table.TablePart.finishLastRowGroup(TablePart.java:139)
2019-12-04T19:40:45.7932700Z 	at org.apache.fop.fo.flow.table.TablePart.finalizeNode(TablePart.java:116)
2019-12-04T19:40:45.7933010Z 	at org.apache.fop.fo.FONode.endOfNode(FONode.java:350)
2019-12-04T19:40:45.7933280Z 	at org.apache.fop.fo.FObj.endOfNode(FObj.java:220)
2019-12-04T19:40:45.7933570Z 	at org.apache.fop.fo.flow.table.TableBody.endOfNode(TableBody.java:48)
2019-12-04T19:40:45.7933890Z 	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:362)
2019-12-04T19:40:45.7934230Z 	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
2019-12-04T19:40:45.7934580Z 	at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
2019-12-04T19:40:45.7934940Z 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
2019-12-04T19:40:45.7935320Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
2019-12-04T19:40:45.7935720Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
2019-12-04T19:40:45.7936110Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
2019-12-04T19:40:45.7936480Z 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
2019-12-04T19:40:45.7937290Z 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
2019-12-04T19:40:45.7937710Z 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
2019-12-04T19:40:45.7938050Z 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
2019-12-04T19:40:45.7938390Z 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
2019-12-04T19:40:45.7938740Z 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
2019-12-04T19:40:45.7939090Z 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
2019-12-04T19:40:45.7939410Z 	at com.metanorma.fop.XML2PDF.convertXML2PDF(XML2PDF.java:93)
2019-12-04T19:40:45.7939700Z 	at com.metanorma.fop.XML2PDF.main(XML2PDF.java:148)
2019-12-04T19:40:45.7939980Z 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2019-12-04T19:40:45.7940300Z 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2019-12-04T19:40:45.7940640Z 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2019-12-04T19:40:45.7940940Z 	at java.lang.reflect.Method.invoke(Method.java:498)
2019-12-04T19:40:45.7941220Z 	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
2019-12-04T19:40:45.7941510Z 	at java.lang.Thread.run(Thread.java:748)
2019-12-04T19:40:46.2986640Z make: *** [documents/itu-Y.3507-201812.pdf] Error 255

Error in loading embedded fonts?

I'm getting this. Is this normal?

make documents/itu-G.191.pdf
cp mn-samples-itu/documents/G.191.xml sources/itu-G.191.xml
FILENAME=sources/itu-G.191.xml; \
	OUTFILE=documents/itu-G.191.pdf; \
	MN_FLAVOR=$(xmllint --xpath 'name(*)' ${FILENAME} | cut -d '-' -f 1); \
	DOCTYPE=$(xmllint --xpath "//*[local-name()='doctype']/text()" ${FILENAME}); \
	XSLT_PATH=/Users/me/src/mn/mn-native-pdf/xslt/${MN_FLAVOR}.${DOCTYPE}.xsl; \
  java -jar mn2pdf.jar /fonts $FILENAME $XSLT_PATH $OUTFILE
mn2pdf

Preparing...
Input: Fonts path (/fonts)
Input: XML (sources/itu-G.191.xml)
Input: XSL (/Users/me/src/mn/mn-native-pdf/xslt/itu.recommendation.xsl)
Output: PDF (documents/itu-G.191.pdf)

Transforming...
file:/Users/me/src/mn/mn-native-pdf/xslt/itu.recommendation.xsl; Line #63; Column #16; INFO: Document namespace: 'https://www.metanorma.org/ns/itu'
java.nio.file.NoSuchFileException: /fonts/SourceSansPro-Regular.ttf
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at java.nio.file.Files.copy(Files.java:3016)
	at com.metanorma.fop.fontConfig.prepareFonts(fontConfig.java:91)
	at com.metanorma.fop.fontConfig.<init>(fontConfig.java:69)
	at com.metanorma.fop.mn2pdf.convertmn2pdf(mn2pdf.java:77)
	at com.metanorma.fop.mn2pdf.main(mn2pdf.java:156)
make: *** [documents/itu-G.191.pdf] Error 255
rm sources/itu-G.191.xml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.