tombensve / markdowndoc Goto Github PK
View Code? Open in Web Editor NEWA Java tool/maven plugin/library to generate HMTL and PDF from markdown text intended for project documentation. Supports JSON based "stylesheet" for PDFs.
A Java tool/maven plugin/library to generate HMTL and PDF from markdown text intended for project documentation. Supports JSON based "stylesheet" for PDFs.
I have concluded that iText need to be replaced and I have found PDFBox with a reasonable Apache 2.0 license.
The PDFBox API is however at a much lower level than iTexts, but will allow more control.
Running: "mvn -U -X -e markdowndoc:doc" causes a NullPointerException! But when run normally during the install phase of an "mvn install" it works fine.
The maven plugin have a hardcoded version of the markdown-doc-lib instead of ${project.version}.
Not sure what annoys me more: that I hardcoded it to begin with or that I haven't discovered this until now!
The 2.0.23 version of PDFBox NPEs on my M1 mac and 3.0.0-RC1 have changed API for setting strokingColor!
I've got a structure for PDF generator
|-index.md
|-images
|--|--image.jpg
|-manual
|--|--chapter1.md
And there's block in chapter1.md: ![](../images/image.jpg)
that's file relative to chapter1.md.
But I got FileNotFoundException with message Invalid resource path: ../images/image.jpg!
in FileResource.groovy
It works only when I use image path that's relative to baseDir configuration parameter. But it's not comfortable.
Can you fix it please?
In addition look into supporting syntax coloring using provided hint after last ``` that is supported by many markdown tools today. Define coloring in new mss section.
Editor deletes next line if you press return in the middle of a line that is part of a paragraph made upp of multiple lines rather than just one long line. On top of that there is no undo function (as far as I can determine JEditorPane does not provide that functionality).
If anyone knows of a free open source Swing editor component that is better than JEditorPane (which kind of sucks), please let me know!
When editing markdown with tools like Byword or MarkdownPro, etc and you include images relative to the document they are resolved and displayed by the tool used, but when building and generating the PDF with MarkdownDoc it fails to find document relative images.
Hi,
It seems that markdowndoc-maven-plugin uses se.natusoft.tools.doc.markdowndoc:markdown-doc
as its parent, and the parent uses the plugin se.natusoft.tools.codelicmgr:CodeLicenseManager-maven-plugin:2.0
. I'm not quite sure why this prevents me from using markdowndoc-maven-plugin in my build, but this is what happens:
...
[INFO] --- markdowndoc-maven-plugin:1.2.9:doc (generate-docs) @ our-project ---
[WARNING] The POM for se.natusoft.tools.codelicmgr:CodeLicenseManager-annotations-retention-source:jar:2.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.929s
[INFO] Finished at: Fri Apr 10 15:36:21 EEST 2015
[INFO] Final Memory: 25M/354M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:1.2.9:doc (generate-docs) on project our-project: Execution generate-docs of goal se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:1.2.9:doc failed: Plugin se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:1.2.9 or one of its dependencies could not be resolved: Failure to find se.natusoft.tools.codelicmgr:CodeLicenseManager-annotations-retention-source:jar:2.0 in http://our.local.repo/artifactory/plugins-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
Changing the plugin element from
<plugin>
<groupId>se.natusoft.tools.doc.markdowndoc</groupId>
<artifactId>markdowndoc-maven-plugin</artifactId>
<version>1.2.9</version>
...
to
<plugin>
<groupId>se.natusoft.tools.doc.markdowndoc</groupId>
<artifactId>markdowndoc-maven-plugin</artifactId>
<version>1.2.9</version>
<dependencies>
<dependency>
<groupId>se.natusoft.tools.codelicmgr</groupId>
<artifactId>CodeLicenseManager-annotations-retention-source</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies>
...
seems to get around the problem.
I am one man doing this and other things in my spare time. There are more things I like
MarkdownDoc to do, like tables and other markdown extensions. I'm considering making the
library more modular with ServiceLoader "modules" as I have done in the editor, with APIs
for parsing a specific Markdown syntax and for generating that syntax in html and pdf.
This to make it easier to add new functionality. I also like to rewrite the parser to
accommodate this design. The current parser is a real mess :-).
It is going to take a very long time for this to happen if it is only me. So I'm looking
for other nerds like me to join me. I have been using my company domain as package, but
that can be changed and a new GitHub repo can be setup for this.
Do note that all but the maven plugin is in Groovy! I choose Groovy for most of my hobby projects since I don't want to waste my own time :-). @CompileStatic and @TypeChecked is however used.
I created this "issue" for easy communication about this, so answer here if you are interested.
Add option to generate section numbers or not to PDFGenerator.
Section numbers can be hidden in iText by setting numberDepth to 0.
I have just myself run into a problem on Windows 10 when using the MarkdowndDoc editor.
I have 2 screens, my laptop and an external monitor. The external monitor was first places above the laptop screen. Running MarkdownDoc Editor with the editor window on the external screen (on top) saved the size and coordinates when saving the file.
I then moved my external monitor and placed it on the right side instead and changed the monitor placement in windows 10. This gave it different coordinates. Opening the editor again opened the window at the previosuly saved coordinates which then apparently not are relative to the upper left corner of the monitor, but a point in a virtual coordinate system. So in other words the window opened outside of any screen!! This is clearly possible to do in Windows!!
So the only solution is to stop saving position and only size. Not sure why I save positions, it feels kind of stupid right now. Though not as stupid as allowing windows to open outside of any screen.
First of all thanks for this great plugin and your good work!
Do you plan to implement support for tables by any chance?
Hi,
I'm trying to use version 1.2.9 of the plugin but when I run it I get:
Failure to find se.natusoft.tools.codelicmgr:CodeLicenseManager-annotations-retention-source:jar:2.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
Overriding the dependency to use version 2.1.1 of CodeLicenseManager-annotations-retention-source (which exists in Maven central) throws a NullPointerException upon execution.
This is my maven pom.xml:
<plugin>
<groupId>se.natusoft.tools.doc.markdowndoc</groupId>
<artifactId>markdowndoc-maven-plugin</artifactId>
<version>1.2.9</version>
<dependencies>
<dependency>
<groupId>se.natusoft.tools.codelicmgr</groupId>
<artifactId>CodeLicenseManager-annotations-retention-source</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-docs</id>
<goals>
<goal>doc</goal>
</goals>
<phase>install</phase>
<configuration>
<generator>pdf</generator>
<inputPaths>
*.md
</inputPaths>
</configuration>
</execution>
</executions>
</plugin>
The defualt.mss file is missing the definition for the color 'grey', but that color is referenced for the horizontal ruler. This causes a fatal exception when using the such ruler and de default MSS.
When in fullscreen mode and only having one file when the mouse is moved to the left edge the file list pops up and moves the mouse pointer to center it among the files, it is moved to the top of the window since there is only one file, and this happens to then trigger the toolbar popup which also closes the file popup.
This is probably also a problem when in fullscreen and you have many files, but wan't to select the first in the list. Also when not in fullscreen and placing the window in the upper left corner should trigger this problem.
I though I tested this well, but apparently not well enough! 👎
I will like to compile my markdown files to html and pdf using the commandline tool. But I don't understand the full commands and which argurment to pass where. I tried what I could and got this error message:
The command I am using is java -jar markdowndoc-cmd-line-2.1.0.exec.jar pdf chapters/.*\.md --markdown
There is a plugin (CodeLicenseManager) that should only be used when building MarkdownDoc itself, but seem to be required when running the MarkdownDoc plugin also, where it is not needed in any way.
I want to run this plugin when the MarkdownDoc plugin is built, but not when the MarkdownDoc plugin is run! There seems to be a small flaw in maven here or there is some feature to solve this I don't know about. The easiest solution for now is to move the CLM plugin into a profile that I have to activate during build.
Used markdowndoc-maven-plugin 2.1.4
Maven 3.8.1
JDK 11.0.10
Try to convert a simple markdown file into PDF with custom MSS file (customized copy of default MSS file).
Execution generate-docs of goal se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.4:doc failed: An API incompatibility was encountered while executing se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.4:doc: java.lang.NoSuchMethodError: 'void org.apache.pdfbox.pdmodel.PDPageContentStream.setNonStrokingColor(int, int, int)'
Applying the color values from MSS file is failing:
Caused by: java.lang.NoSuchMethodError: 'void org.apache.pdfbox.pdmodel.PDPageContentStream.setNonStrokingColor(int, int, int)'
at se.natusoft.doc.markdown.generator.pdfbox.PDFBoxDocRenderer$DocMgr$_closure1.doCall (PDFBoxDocRenderer.groovy:252)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1019)
at groovy.lang.Closure.call (Closure.java:426)
at se.natusoft.doc.markdown.generator.styles.MSSColor.applyColor (MSSColor.groovy:75)
at se.natusoft.doc.markdown.generator.pdfbox.PDFBoxDocRenderer.setColorPair (PDFBoxDocRenderer.groovy:824)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator$_writeHeader_closure15.doCall (PDFBoxGenerator.groovy:601)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator$_writeHeader_closure15.call (PDFBoxGenerator.groovy)
at se.natusoft.doc.markdown.generator.pdfbox.PDFBoxDocRenderer.applyStyles (PDFBoxDocRenderer.groovy:661)
at se.natusoft.doc.markdown.generator.pdfbox.PDFBoxDocRenderer.text (PDFBoxDocRenderer.groovy:1287)
at se.natusoft.doc.markdown.generator.pdfbox.PDFBoxDocRenderer.text (PDFBoxDocRenderer.groovy:1218)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator$_writeHeader_closure16.doCall (PDFBoxGenerator.groovy:617)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator$_writeHeader_closure16.doCall (PDFBoxGenerator.groovy)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1019)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod (IndyInterface.java:218)
at se.natusoft.doc.markdown.generator.utils.Sectionizer.withSection (Sectionizer.groovy:67)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator.writeHeader (PDFBoxGenerator.groovy:616)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator.access$0 (PDFBoxGenerator.groovy)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator$_generate_closure1.doCall (PDFBoxGenerator.groovy:261)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1019)
at groovy.lang.Closure.call (Closure.java:426)
at groovy.lang.Closure.call (Closure.java:442)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2056)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator.generate (PDFBoxGenerator.groovy:237)
at se.natusoft.doc.markdown.generator.PDFBoxGenerator.generate (PDFBoxGenerator.groovy:148)
at se.natusoft.doc.markdowndoc.MarkdownDocMavenPlugin.executeStd (MarkdownDocMavenPlugin.java:258)
at se.natusoft.doc.markdowndoc.MarkdownDocMavenPlugin.execute (MarkdownDocMavenPlugin.java:174)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Happens with default mss and custom mss file.
What I did not mention in the information for version 1.3.4 is that the editor was converted from Java to Groovy. Here I apparently ran into a Groovy gotcha: What looked to be a member reference were actually a property reference to the same method that tried to reference member. In this case it was an anonymously implemented interface with a getter whose implementation tried to reference the outer class member of same name as getter property, and got the property rather than the member causing a never ending loop resulting in java.lang.StackOverflowError.
This affected only generating of PDF and HTML. The error occured after writing generated output, but before opening the generated output (when told to do so by checkbox setting).
Add table support.
I'm going with the simplest form of GitHub tables (https://docs.github.com/en/github/writing-on-github/organizing-information-with-tables) to begin with.
This is rather tricky since tables break rules that applies to current markdown supported. Tables makes things very much messier. It affects both parsing and rendering adding requirements that today does not exist.
What I like about markdown is the simplicity. With tables the simplicity goes away. My goal when designing software is always make code as simple as possible while still keeping it flexible! So with tables I have to try to isolate the new complexity.
Hello,
We are recently started using markdown to write doc and wanted to automate the production of pdf with our assembly plugin.
We tried this plugin and it's working like a charm on windows.
But I am running the project on my MacbookPro and the plugin is not working.
This is the configuration of the plugin we are using:
<plugin>
<groupId>se.natusoft.tools.doc.markdowndoc</groupId>
<artifactId>markdowndoc-maven-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>doc</goal>
</goals>
<configuration>
<generatorOptions>
<generator>pdf</generator>
<inputPaths>CHANGELOG.md</inputPaths>
</generatorOptions>
<pdfGeneratorOptions>
<resultFile>CHANGELOG.pdf</resultFile>
</pdfGeneratorOptions>
</configuration>
</execution>
</executions>
</plugin>
I ran maven in debug mode so that you have all the info:
[INFO] --- markdowndoc-maven-plugin:2.1.2:doc (default) @ PROXY ---
[DEBUG] Could not find metadata org.apache.pdfbox:pdfbox/maven-metadata.xml in local (/Users/user_adm/.m2/repository)
[DEBUG] Skipped remote request for org.apache.pdfbox:pdfbox/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Skipped remote request for org.apache.pdfbox:pdfbox/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=158110, ConflictMarker.markTime=34092, ConflictMarker.nodeCount=26, ConflictIdSorter.graphTime=80373, ConflictIdSorter.topsortTime=34329, ConflictIdSorter.conflictIdCount=18, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=595733, ConflictResolver.conflictItemCount=23, DefaultDependencyCollector.collectTime=76888497, DefaultDependencyCollector.transformTime=942732}
[DEBUG] se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:jar:2.1.2:
[DEBUG] org.apache.maven:maven-plugin-api:jar:3.0.5:compile
[DEBUG] org.apache.maven:maven-model:jar:3.0.5:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-artifact:jar:3.0.5:compile
[DEBUG] org.sonatype.sisu:sisu-inject-plexus:jar:2.3.0:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG] org.codehaus.plexus:plexus-classworlds:jar:2.4:compile
[DEBUG] org.sonatype.sisu:sisu-inject-bean:jar:2.3.0:compile
[DEBUG] org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0:compile
[DEBUG] org.sonatype.sisu:sisu-guava:jar:0.9.9:compile
[DEBUG] se.natusoft.tools.doc.markdowndoc:markdown-doc-lib:jar:2.1.2:compile
[DEBUG] org.apache.pdfbox:pdfbox:jar:2.0.16:compile
[DEBUG] org.apache.pdfbox:fontbox:jar:2.0.16:compile
[DEBUG] commons-logging:commons-logging:jar:1.2:compile
[DEBUG] se.natusoft.json:basic-json-lib:jar:1.0:compile
[DEBUG] org.codehaus.groovy:groovy-all:jar:indy:2.4.4:compile
[DEBUG] se.natusoft.tools.optionsmgr:OptionsManager:jar:2.0.3:compile
[DEBUG] Created new class realm plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2
[DEBUG] Importing foreign packages into class realm plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2
[DEBUG] Included: se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:jar:2.1.2
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.6
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG] Included: org.sonatype.sisu:sisu-inject-bean:jar:2.3.0
[DEBUG] Included: org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0
[DEBUG] Included: org.sonatype.sisu:sisu-guava:jar:0.9.9
[DEBUG] Included: se.natusoft.tools.doc.markdowndoc:markdown-doc-lib:jar:2.1.2
[DEBUG] Included: org.apache.pdfbox:pdfbox:jar:2.0.16
[DEBUG] Included: org.apache.pdfbox:fontbox:jar:2.0.16
[DEBUG] Included: commons-logging:commons-logging:jar:1.2
[DEBUG] Included: se.natusoft.json:basic-json-lib:jar:1.0
[DEBUG] Included: org.codehaus.groovy:groovy-all:jar:indy:2.4.4
[DEBUG] Included: se.natusoft.tools.optionsmgr:OptionsManager:jar:2.0.3
[DEBUG] Configuring mojo se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2:doc from plugin realm ClassRealm[plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2, parent: sun.misc.Launcher$AppClassLoader@3d4eac69]
[DEBUG] Configuring mojo 'se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2:doc' with basic configurator -->
[DEBUG] (f) baseDir = /Users/user_adm/Documents/work/proxy
[DEBUG] (s) generator = pdf
[DEBUG] (s) inputPaths = CHANGELOG.md
[DEBUG] (f) generatorOptions = se.natusoft.doc.markdown.generator.options.GeneratorOptions@431e86b1
[DEBUG] (s) resultFile = CHANGELOG.pdf
[DEBUG] (f) pdfGeneratorOptions = se.natusoft.doc.markdown.generator.options.PDFGeneratorOptions(resultFile:CHANGELOG.pdf, rootDir:null, title:null, subject:null, titlePageImage:null, author:null, version:null, copyright:null, authorLabel:Author:, versionLabel:Version:, pageLabel:Page, tableOfContentsLabel:Table of Contents, hideLinks:false, unorderedListItemPrefix:•, mss:null, generateSectionNumbers:false, generateTOC:false, generateTitlePage:false, help:false)
[DEBUG] -- end configuration --
No document source files were specified, and thus nothing were generated!
[INFO]
On the windows computer of my colleague it works perfectly
[DEBUG] Could not find metadata org.apache.pdfbox:pdfbox/maven-metadata.xml in local (E:\.m2\repository)
[DEBUG] Skipped remote request for org.apache.pdfbox:pdfbox/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Skipped remote request for org.apache.pdfbox:pdfbox/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=26, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=1, ConflictIdSorter.conflictIdCount=18, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=23, DefaultDependencyCollector.collectTime=197, DefaultDependencyCollector.transformTime=2}
[DEBUG] se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:jar:2.1.2:
[DEBUG] org.apache.maven:maven-plugin-api:jar:3.0.5:compile
[DEBUG] org.apache.maven:maven-model:jar:3.0.5:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-artifact:jar:3.0.5:compile
[DEBUG] org.sonatype.sisu:sisu-inject-plexus:jar:2.3.0:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG] org.codehaus.plexus:plexus-classworlds:jar:2.4:compile
[DEBUG] org.sonatype.sisu:sisu-inject-bean:jar:2.3.0:compile
[DEBUG] org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0:compile
[DEBUG] org.sonatype.sisu:sisu-guava:jar:0.9.9:compile
[DEBUG] se.natusoft.tools.doc.markdowndoc:markdown-doc-lib:jar:2.1.2:compile
[DEBUG] org.apache.pdfbox:pdfbox:jar:2.0.16:compile
[DEBUG] org.apache.pdfbox:fontbox:jar:2.0.16:compile
[DEBUG] commons-logging:commons-logging:jar:1.2:compile
[DEBUG] se.natusoft.json:basic-json-lib:jar:1.0:compile
[DEBUG] org.codehaus.groovy:groovy-all:jar:indy:2.4.4:compile
[DEBUG] se.natusoft.tools.optionsmgr:OptionsManager:jar:2.0.3:compile
[DEBUG] Created new class realm plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2
[DEBUG] Importing foreign packages into class realm plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2
[DEBUG] Included: se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:jar:2.1.2
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.6
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG] Included: org.sonatype.sisu:sisu-inject-bean:jar:2.3.0
[DEBUG] Included: org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0
[DEBUG] Included: org.sonatype.sisu:sisu-guava:jar:0.9.9
[DEBUG] Included: se.natusoft.tools.doc.markdowndoc:markdown-doc-lib:jar:2.1.2
[DEBUG] Included: org.apache.pdfbox:pdfbox:jar:2.0.16
[DEBUG] Included: org.apache.pdfbox:fontbox:jar:2.0.16
[DEBUG] Included: commons-logging:commons-logging:jar:1.2
[DEBUG] Included: se.natusoft.json:basic-json-lib:jar:1.0
[DEBUG] Included: org.codehaus.groovy:groovy-all:jar:indy:2.4.4
[DEBUG] Included: se.natusoft.tools.optionsmgr:OptionsManager:jar:2.0.3
[DEBUG] Configuring mojo se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2:doc from plugin realm ClassRealm[plugin>se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2, parent: sun.misc.Launcher$AppClassLoader@55f96302]
[DEBUG] Configuring mojo 'se.natusoft.tools.doc.markdowndoc:markdowndoc-maven-plugin:2.1.2:doc' with basic configurator -->
[DEBUG] (f) baseDir = E:\nextIbis\ibis
[DEBUG] (s) generator = pdf
[DEBUG] (s) inputPaths = CHANGELOG.md
[DEBUG] (f) generatorOptions = se.natusoft.doc.markdown.generator.options.GeneratorOptions@7ee548be
[DEBUG] (s) resultFile = CHANGELOG.pdf
[DEBUG] (f) pdfGeneratorOptions = se.natusoft.doc.markdown.generator.options.PDFGeneratorOptions(resultFile:CHANGELOG.pdf, rootDir:null, title:null, subject:null, titlePageImage:null, author:null, version:null, copyright:null, authorLabel:Author:, versionLabel:Version:, pageLabel:Page, tableOfContentsLabel:Table of Contents, hideLinks:false, unorderedListItemPrefix:?, mss:null, generateSectionNumbers:false, generateTOC:false, generateTitlePage:false, help:false)
[DEBUG] -- end configuration --
[INFO] Parsing the following files:
E:\nextIbis\ibis\CHANGELOG.md
[INFO] All parsed!
Generating: E:\nextIbis\ibis\CHANGELOG.pdf
Using default MSS!
sept. 02, 2019 2:38:34 PM org.apache.pdfbox.pdmodel.PDPageContentStream close
AVERTISSEMENT: You did not call endText(), some viewers won't display your text
[INFO]
The file is present on my computer but not recognised by the plugin
➜ proxy git:(sprint6) ✗ pwd
/Users/user_adm/Documents/work/proxy
➜ proxy git:(sprint6) ✗ ls CHANGELOG.md
CHANGELOG.md
I tried changing the inputPaths parameter and try ./CHANGELOG.MD ./.md ./..md and this does not work at all.
Any help would be appreciated.
Dummy issue to test email notifications.
This is probably just misconfiguration, but still a bit ugly.
Here is the exception.txt.
My config:
<plugin> <groupId>se.natusoft.tools.doc.markdowndoc</groupId> <artifactId>markdowndoc-maven-plugin</artifactId> <version>1.4.4</version> <executions> <execution> <id>generate-docs</id> <goals> <goal>doc</goal> </goals> <phase>prepare-package</phase> <configuration> <generatorOptions> <generator>pdf</generator> <inputPaths>${project.basedir}/src/doc/.*.md</inputPaths> </generatorOptions> </configuration> </execution> </executions> </plugin>
This copied from a mail so that I don't loose track of it!
It appears that relative images are not included correctly. I wonder if this happens with you?
My setup is as follows:
${basedir}/docs/Software-Architecture/
${basedir}/docs/Software-Architecture/Software-Architecture.md
${basedir}/docs/Software-Architecture/images/
${basedir}/docs/Software-Architecture/images/Containers-Diagram.jpg
When including the images using only images/Containers-Diagram, it seems that the resolveUrl() method in the PDFGenerator.groovy class returns the following which of course doesn't exist.
${basedir}/${basedir}/docs/Software-Architecture/images/Containers-Diagram.jpg
Looking into the PDFGenerator.groovy, it seems it's related to the concatenation of the canonicalPath of both the parseFile and the rootDir.
if (!testFile.exists()) {
// Try relative to parseFile first.
int ix = parseFile.canonicalPath.lastIndexOf(File.separator)
if (ix >= 0) {
String path1 = parseFile.canonicalPath.substring(0, ix + 1) + path
if (this.rootDir != null) {
// The result file is relative to the root dir!
resolvedUrl = "file:" + this.rootDir.canonicalPath + File.separator + path1
testFile = new File(this.rootDir.canonicalPath + File.separator + path1)
}
else {
resolvedUrl = "file:" + path1
testFile = new File(path1)
}
}
if (!testFile.exists()) {
// Try relative to result file.
ix = this.options.resultFile.lastIndexOf(File.separator)
if (ix >= 0) {
String path2 = this.options.resultFile.substring(0, ix + 1) + path
if (this.rootDir != null) {
// The result file is relative to the root dir!
resolvedUrl = "file:" + this.rootDir.canonicalPath + File.separator + path2
}
else {
resolvedUrl = "file:" + path2
}
}
}
}
First I really appreciate your work on this great maven plugin. Thank you.
Following czech sentence for encoding tests written in MD is not fully generated into PDF.
Input:
příliš žluťoučký kůň úpěl ďábelské ódy
PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL ĎÁBELSKÉ ÓDY
Output:
píliš žluouký k úpl ábelské ódy
PÍLIŠ ŽLUOUKÝ K ÚPL ÁBELSKÉ ÓDY
Add a Javadoc comment parser producing a Doc model. This allows for using java files as input to produce class documentation in a document. The intention here is not a full javadoc parser, but an as primitive as possible parse of javadoc comments.
(Please note that I'm using the "enhancement" label as an activty issue for new functionality that will be bound to an IntelliJ task for implementing this feature!)
Really long kibana links makes MDD put URL in 'title' rather than 'url'!!
This seems to be a parser bug.
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.