fugerit-org / fj-doc Goto Github PK
View Code? Open in Web Editor NEWFugerit Document Generation Framework (fj-doc)Fugerit Doc
Home Page: https://www.fugerit.org/perm/venus/
License: Apache License 2.0
Fugerit Document Generation Framework (fj-doc)Fugerit Doc
Home Page: https://www.fugerit.org/perm/venus/
License: Apache License 2.0
It seems setting both PDF/A and PDF/UA profile leads to this error on PDF/A validation :
"XMP property pdfuaid:part not defined in current schema."
Whereas PDF/UA validation succeds
PDF/A checked with : https://avepdf.com/en/pdfa-validation ( and Adobe )
PDF/UA checked with : https://check.axes4.com/en/
Here is a simple output of a PDF/A-1b and PDF/UA-1
Actually it seems that this property is added to the output PDF :
<rdf:Description xmlns:pdfuaid="http://www.aiim.org/pdfua/ns/id/" rdf:about="">
<pdfuaid:part>1</pdfuaid:part>
</rdf:Description>
Which is leading to the validation error.
Adding support for pdf/a format.
The concept of format has been introduced.
By default the format is the same as the type (pdf, xlsx, html etc).
It is possible now to add format for the same type.
The DocHandlerFacade can handle multiple handlers for the same type, as long as the format is diffirent.
For instance we can have a normal pdf handler (type : pdf, format : pdf) and a pdf a handler (type : pdf, format : PDF/A-1a).
An example in the fj-doc-sample project will be provided.
Next version is to be considered 1.0.0, adn git hub pages will be moved to main branch
Link new fj-bom version as described by :
A middle term goal is to provide graalvm support for native image build.
The aim of this task is to create an asciidoc renderer.
Vertical alignment in mod-fop cell it's not wotking :
<cell valign="middle">
<para>Elrond</para>
</cell>
<cell valign="bottom">
<para>Gil-Galad</para>
</cell>
The implementation level of the type handler should be better documented.
The idea is to provide a meta data :
Module fj-doc-playground-quarkus has a Dockerfile to build a standalone image of the project.
We want to add vulnerability scan workflow for it.
The quarkus application response model could be revised using ServiceResponse in
https://github.com/fugerit-org/fj-service-helper-bom/tree/main/emp-service-model
A new simplified configuration is under development
The javadoc build had some errors on jdk 17
Creates some shortcut for charset provider
Need to upgrade jackson core as soon as new release will be available :
As described in BUG FOP-3109 the code for loading fonts from class loader used for Apache FOP 2.6 is not working as before.
A patch has been applied starting from version 0.5.1 of fj-doc.
The class DocHandlerFactory offers a conveniente system to load and register type handler, but if even just one type handler is not found, the load process will fail.
It would be better if it was possible to tag handlers entry as "unsafe" (in which case the factory creations should not safe if the handler is not found).
<factory id="unsafe-test">
<data id="html-fm" info="html" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandlerUTF8" />
<data id="html-fragment-fm" info="fhtml" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerUTF8" />
<data id="pdf-unsafe" info="pdf" type="org.fugerit.java.doc.pdf.UnsafeDocHandler" />
</factory>
Imagine the last handler is not available in class loader. Thi can be handled with the new properties :
unsafe="true" unsafeMode="log-trace"
<factory id="unsafe-test">
<data id="html-fm" info="html" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandlerUTF8" />
<data id="html-fragment-fm" info="fhtml" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerUTF8" />
<data id="pdf-unsafe" info="pdf" type="org.fugerit.java.doc.pdf.UnsafeDocHandler" unsafe="true" unsafeMode="log-trace"/>
</factory>
The stack trace will be logged only if you set unsafeMod to log-trace. If you want to suppress the stack trace use :
unsafe="true" unsafeMode="log-message"
Starting from version 0.5.2 the way to configure the custom ResourceResolver has been changed.
The project build successfully with oracle jdk 11.0.16.1 and higher.
Previous implementation may failes with maven build profile 'full' when generating javadoc of auto generated sources from jaxb in module fj-doc-lib-autodoc.
New changelog style based on :
https://github.com/olivierlacan/keep-a-changelog
Fix Dependabot alert : https://github.com/fugerit-org/fj-doc/security/dependabot/23
Currently module fj-doc-lib-autodoc does not handle additional imported xsd.
Aim of this issue is to extends its behaviour.
The should be well documented.
THe proposal is to expand the fj-doc-lib-autodoc module.
The extra module :
https://github.com/fugerit-org/fj-doc-mod-openpdf
Based on :
https://github.com/LibrePDF/OpenPDF
https://github.com/LibrePDF/OpenRTF
Will be added to the core project modules.
And will be divided in specific modules for PDF and RTF to minimize dependencies.
The module for rendering pdf with fop does not correcly handle the & symbol.
Updated quarkus version
Should be created a full list of features available in the core library.
Then should be updated the implementation status of each module.
new xls/xlsx module based on apache poi 5+
this module will only work with java 11+
Migrating bundler of the single page application to https://vitejs.dev/
The goal is to add the change to parse input as FreeMarker template and add sample data as json input.
Starting from next release java 8 will be the minimum version supported for source and compiled code.
This change is made at the same time for other two repositories :
fugerit-org/fj-lib#4
fugerit-org/fj-daogen#2
On linux server with no graphical interface, is possible to get the an error when invoking :
at org.fugerit.java.doc.mod.poi.PoiUtils.resizeSheet()
For instance on :
at org.fugerit.java.doc.mod.poi.BasicPoiTypeHandler.handle()
Tested on jdk : jdk-11.0.16.1 (for linux arm)
Fix : install the fontconfig package on your system. (source)
Here is a sample stack trace for version fj-doc-mod-poi version 0.7.2
java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:86)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.desktop/java.awt.Font.getFont2D(Font.java:497)
at java.desktop/java.awt.Font.canDisplayUpTo(Font.java:2250)
at java.desktop/java.awt.font.TextLayout.singleFont(TextLayout.java:469)
at java.desktop/java.awt.font.TextLayout.<init>(TextLayout.java:530)
at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:273)
at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:248)
at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:233)
at org.apache.poi.xssf.usermodel.XSSFSheet.autoSizeColumn(XSSFSheet.java:555)
at org.apache.poi.xssf.usermodel.XSSFSheet.autoSizeColumn(XSSFSheet.java:537)
at org.fugerit.java.doc.mod.poi.PoiUtils.resizeSheet(PoiUtils.java:17)
at org.fugerit.java.doc.mod.poi.PoiUtils.autoSizeColumns(PoiUtils.java:25)
at org.fugerit.java.doc.mod.poi.BasicPoiTypeHandler.handle(BasicPoiTypeHandler.java:292)
at org.fugerit.java.doc.lib.simpletable.SimpleTableDocConfig.processSimpleTable(SimpleTableDocConfig.java:60)
at org.fugerit.java.doc.playground.doc.GenerateRest.validate(GenerateRest.java:142)
at org.fugerit.java.doc.playground.doc.GenerateRest_ClientProxy.validate(Unknown Source)
at org.fugerit.java.doc.playground.doc.GenerateRest$quarkusrestinvoker$validate_9602abc43de303ad70b38c0fbaa7c81272957d46.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:84)
... 28 more
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:379)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:324)
at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:56)
Fix the dependant bot alert :
https://github.com/fugerit-org/fj-doc/security/dependabot/21
Starting from release 0.5.4 it will be possible to render a single table in the document in CSV using the OpenCSV library.
For compatibility FopConfigClassLoaderWrapper should have a constructor with default ResourceResolver. [ref. #7]
External Entity Processing allows for XML parsing with the involvement of external entities. However, when this functionality is enabled without proper precautions, it can lead to a vulnerability known as XML External Entity (XXE) attack.
need fix
It would be a good idea to give the chance to set charset for xml output
Dependabot alert :
https://github.com/fugerit-org/fj-doc/security/dependabot/17
Some type handlers support and/or need font loading. The aim of this task is to create a helper for configuring fonts to be used in handlers like fop.
We want to create a new module for converting a excel o csv to simple table.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.