-
Notifications
You must be signed in to change notification settings - Fork 3
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
Upgraded Features #7
base: master
Are you sure you want to change the base?
Conversation
upgrade Upgrade midpoint version used in app.
fixing PDF export overlaying by exporting it not directly from ascii format but firstly to html and then from html to pdf. Pdf does have a few mistakes(layout centering + page breaks)
Adding references into documentation for easier work with documentation
Adding option to use default styling when the custom not existing or is empty
HtmlExporter htmlExporter = new HtmlExporter(); | ||
htmlExporter.export(adocFile, tempHtmlFile); | ||
|
||
String princeCommand = "prince " + tempHtmlFile.getAbsolutePath() + " -o " + outputPdf.getAbsolutePath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you switch to external command? Asciidoctor supports export to PDF, this creates dependency on another binary that might not be available. Native PDF export via asciidoctor is preferred, in case prince is needed then I'd expected user will use html export and then prince command separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main problem with the asciidoctor PDF export was formatting problem. Most of the generated documentation was unusable. The problem was that it did not recognize when the generated expression was ending therefore if the expression was longer and appeared on the next page it was overlapped with other sections. Use of the prince fixed that issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matejglombik I understand but can't accept 3rd party dependency this way. If I understand it correctly prince can be still used with midscribe --output-format html --output document.html;
and then prince document.html document.pdf
. We can rather try to fix pdf generator later to get rid of prince altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matejglombik I've created some simple test with resource object that contains long groovy script (in terms of line count and line length), midscribe rendered pdf where script just truncated and didn't continue to next page, lines breaks were created correctly. Could you provide (send) xml that creates incorrect output please?
@@ -34,7 +35,7 @@ public void testDescribeCapability() throws Exception { | |||
variables.put("capabilities", capabilities); | |||
|
|||
Properties props = new Properties(); | |||
props.setProperty(GeneratorProperties.VELOCITY_START_TEMPLATE, "/template/capabilities.vm"); | |||
props.setProperty(GeneratorProperties.VELOCITY_START_TEMPLATE, "/template/capabilities-native.vm"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why only native?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for that is that i broke the 1 template into 2 and after that i did not had enough time to recreate tests. Thats why only native template.
@@ -0,0 +1,552 @@ | |||
/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is default css needed in this project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it is not needed, the default one from asciidoctor will be used. I removed it from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at few comments, I still haven't have the time to check velocity templates
@matejglombik just to make sure - I can accept this PR only when prince dependency (pdf exporter) is reverted and style.css is removed as well. Another thing I don't understand - why dependency |
Added some features missing from base version: