Thread: 5e Character to PDF Converter
-
May 17th, 2020, 22:09 #21
- Join Date
- Dec 2018
- Posts
- 306
@zmtoman are you aware of the character sheet printer: https://www.fantasygrounds.com/forum...Printer-for-FG
It uses XSL stylesheets to enable export from any ruleset. The available stylesheets aren't great, and the tool itself is a little rough around the edges... but the XSL approach is quite powerful, flexible, and extensible and is implementable in pretty much any language (including java). You might want to have a look and consider XSL for your conversion engine.
-
May 18th, 2020, 01:44 #22
- Join Date
- Jun 2017
- Posts
- 63
@Skate927 If you're using the tool I created, there's a checkbox just below where you reference your character xml. It'll swap them. If you want the adventurers league pdf, you have to use the 'Tyranny of Dragons' option in the dropdown. If you're using the online tool that was referenced elsewhere, I don't actually know what to do to change that...it kinda' bothered me as well.
@pollux Thanks for the info, I'll look into it when I get a chance. I wonder how well it would pair with referencing pdfs since the only pdf I actually programmatically generate is the info dump at the end, the others are just copy/fill.
-
May 18th, 2020, 01:59 #23
- Join Date
- Dec 2018
- Posts
- 306
It's a wildly different approach, I'm not really suggesting it's compatible with the codebase you have... just that you might be interested in prior art. Here's a snippet that is oriented toward html output and creates a list of languages conditional on there being languages to list. You can see HTML tags intermingled with XSL tags that perform some tag-selection and logic:
Code:<xsl:if test="count(languagelist/*) > 0"> <ul name="languages"> <label for="languages">Languages</label> <xsl:for-each select="languagelist/*"> <li><xsl:value-of select="name" /></li> </xsl:for-each> </ul> </xsl:if>
Last edited by pollux; May 18th, 2020 at 02:04.
-
May 18th, 2020, 02:53 #24
- Join Date
- Jun 2017
- Posts
- 63
Oh, I see, XSL with the intention of generating new files from scratch. That's vastly different than what I'm doing.
From what research I've done since my last reply, it appears it would simply rely on linking up an xsl file to an xml file, then outputting the implementation as an html (from there to pdf...possibly) file. I'm pretty sure there's simple web uis that can do that. For example this might be of use to you if you already have an xsl generated: https://www.freeformatter.com/xsl-transformer.html although their support for styles may vary
A standalone application could do this, however, I think accessible alternatives may already exist. In concert with the link above, I'd find a converter to convert the html output to a pdf.
-
September 19th, 2021, 14:55 #25
- Join Date
- Mar 2020
- Posts
- 11
-
September 21st, 2021, 00:14 #26
This prints out a nice character sheet. I can't complain about that but I will mention this...it looks like the program is producing a sheet with double the proficiency bonus. Easy to overcome but I wanted to add my two cents. And yes I know I am replying to a thread that is over two years old.
-
September 21st, 2021, 10:09 #27
- Join Date
- Mar 2020
- Posts
- 11
-
September 30th, 2021, 13:04 #28
- Join Date
- Jan 2018
- Posts
- 86
-
September 14th, 2022, 18:16 #29
- Join Date
- Oct 2020
- Posts
- 2
Mine won't even launch the window anymore. Is this project abandoned, then?
-
September 14th, 2022, 22:40 #30
- Join Date
- Jun 2017
- Posts
- 63
Specifically this project as in the java one? I wouldn't say abandoned, but I'm just super busy with another project. All I can suggest is verifying your java version, and launching it via the included bat file. Since it appears executable jars can't be executed directly.
The online project at https://www.alonlinetools.net/FGCharacterSheet.aspx is a completely different thing (not my work).
I'm aware of the proficiency issue, however I have no idea why it's doubling. I'll fix it at some point.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks