{"id":15340499,"url":"https://github.com/jbampton/dita-to-pdf-with-eclipse","last_synced_at":"2025-07-21T13:34:24.551Z","repository":{"id":90825283,"uuid":"44464981","full_name":"jbampton/dita-to-pdf-with-eclipse","owner":"jbampton","description":"Transforms DITA XML into PDF with the DITA Open Toolkit, Eclipse, Apache Ant, Apache FOP, SaxonHE, XSL","archived":false,"fork":false,"pushed_at":"2017-03-23T15:03:58.000Z","size":78974,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T04:40:51.716Z","etag":null,"topics":["apache-fop","dita-ot","dita-xml","eclipse","pdf-generation","saxon"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbampton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-18T04:01:49.000Z","updated_at":"2025-03-01T19:15:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2e83575-068d-4323-9e6b-d83838502e82","html_url":"https://github.com/jbampton/dita-to-pdf-with-eclipse","commit_stats":{"total_commits":59,"total_committers":1,"mean_commits":59.0,"dds":0.0,"last_synced_commit":"33cf52bb8bf1e78509d937a4ca259fe9a3c387db"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jbampton/dita-to-pdf-with-eclipse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fdita-to-pdf-with-eclipse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fdita-to-pdf-with-eclipse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fdita-to-pdf-with-eclipse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fdita-to-pdf-with-eclipse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbampton","download_url":"https://codeload.github.com/jbampton/dita-to-pdf-with-eclipse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbampton%2Fdita-to-pdf-with-eclipse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266312142,"owners_count":23909744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-fop","dita-ot","dita-xml","eclipse","pdf-generation","saxon"],"created_at":"2024-10-01T10:34:45.382Z","updated_at":"2025-07-21T13:34:24.524Z","avatar_url":"https://github.com/jbampton.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DITA TO PDF WITH ECLIPSE\n\nThis program runs inside [Eclipse](https://www.eclipse.org/), an [integrated development environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) and is mainly a [Java](http://www.oracle.com/technetwork/java/index.html) based project in that all the code libraries use Java ([Apache FOP](https://xmlgraphics.apache.org/fop/), [Saxon](https://sourceforge.net/projects/saxon/files/Saxon-HE/), [DITA Open Toolkit](http://www.dita-ot.org/), [Apache ANT](http://ant.apache.org/)) and it also uses [XSL](https://www.w3.org/Style/XSL/) and [XML](https://www.w3.org/XML/) heavily.   Development was originally done in [oXygen XML Editor](https://www.oxygenxml.com/) then ported to Eclipse.  Java is now ranked first on the [TIOBE Index](http://www.tiobe.com/tiobe_index).\n\nThis project takes DITA XML as input and transforms it to [PDF](https://acrobat.adobe.com/au/en/products/about-adobe-pdf.html) with the DITA Open Toolkit and a custom made plugin using Apache Ant.  Using PDF allows us to print a nicely formated documents on paper. Using Eclipse generating the PDF output can be done in one click by building the project and this creates a publishing pipeline making all the different PDF's one after the other.\n\n[Darwin Information Typing Architecture](https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture) (DITA) is an XML data model for authoring and using DITA-OT you can publish those ideas. The DITA standard is maintained by the [OASIS](https://en.wikipedia.org/wiki/OASIS_(organization)) DITA Technical Committee. Some of the largest and most successful companies in the world use DITA. The next link is an informal list of [companies using DITA](http://www.ditawriter.com/companies-using-dita/).\n\nThe Roadmap for this project is to make this into an easy to follow tutorial on how to build and customize DITA-OT PDF plugins and publish your DITA content using Eclipse.   I am currently using DITA-OT 2.2.2 and I am aiming at keeping the 'info.debrief' plugin compatible with the current version of DITA-OT. \n\nThe 'info.debrief' plugin has been extracted from another open source project I worked on. The other 'sample' plugin is a vanilla plugin that i created online on a DITA-OT plugin customization site.  \n\nIf you are not already Gung-Ho on Java and all things tech, then try a few short online courses:\n\n- https://www.codecademy.com/learn/learn-java\n- https://www.codecademy.com/learn/learn-the-command-line\n- https://www.codeschool.com/courses/try-git\n- https://www.codecademy.com/learn/learn-git\n\nAnd then come train in the [REAL DOJO](http://www.codewars.com) and reach your highest potential, become **faster**, **stronger** and **more powerful**......**JEDI MASTER LEVEL**.....**!??!?!!**  \n\nSo now that you are the new Java [Chuck Norris](https://en.wikipedia.org/wiki/Chuck_Norris) on the block, come and let's build.\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n## Build Instructions - Mac OS X\n\n### Install Java\n\nFirst you should check if Java is already installed on your system. \n\nIn a terminal type the following commands:\n\n#### java\n\nIf Java is installed you will see the Java help message like the image below.\n\n![java](documentation/images/java/java.png)\n\nIf Java is not installed you need to install the Java Development Kit (JDK) as Eclipse needs Java to run so you should first read the [Java Platform, Standard Edition Installation Guide](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html)\n\nSo then go to: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html\n\nChoose the JDK version for your [Operating System](https://en.wikipedia.org/wiki/Operating_system).\n\nIf it's installed you can read up about Java more by typing:\n\n#### java -version\n\n![java -version](documentation/images/java/java-version.png)\n\n\n#### man java\n\n![man java](documentation/images/man/man-java.png)\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n### Download Eclipse \n\nGo to: [Eclipse Downloads](https://www.eclipse.org/downloads/?osType=macosx)\n\n![Eclipse Downloads](documentation/images/eclipse/download_eclipse.png)\n\nIn the box near top labelled \"Try the Eclipse Installer\", click on \"64 bit\" under \"Mac OS X\".\n\nDownload Eclipse installer application.\n\nBefore you install Eclipse you should check the checksum of the Eclipse file.\n\nDepending on which type of checksum you choose: MD5, SHA1, SHA-512 the commands are slightly different:\n\nFirst you should click on the checksum type in the image below:\n\n![Eclipse checksums](documentation/images/eclipse/eclipse_checksums.png)\n\nI used SHA-512 so the in a terminal in the directory or folder where you downloaded the Eclipse package to, the command to type would be: \n\n### shasum -a 512 filename\n\n![shasum](documentation/images/terminal/example_shasum.png)\n\nYou should check the output of the shasum command matches what's displayed on the Eclipse website for the type of checksum you choose.  You can select the text in the terminal and then copy it and then find it on the Eclipse website.\n\nFor more information on the shasum or md5 command open a terminal and type:\n\n#### man shasum  \n![man shasum](documentation/images/man/man_shasum.png)\n\n#### man md5\n![man md5](documentation/images/man/man_md5.png)\n\nUse the up and down arrows on the keyboard to navigate through the man page documentation.\n\nTo exit from the man pages type: q\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n### Install Eclipse\n\nUnzip resulting download (eclipse-inst-mac64.tar.gz) by double-clicking on it if downloader did not already unzip it.\n\nRun \"Eclipse Installer\" application.\n\nChoose \"Eclipse IDE for Java Developers\" option. (Other options and Eclipse modules are not necessary for this build.)\n\n![Eclipse installer](documentation/images/eclipse/eclipse-installer-1.png)\n\nThis option allows you to specify an \"Installation Folder.\" The default option may be a folder within your individual directory.\n\n![Eclipse Installer install location](documentation/images/eclipse/eclipse-installer-2.png)\n\nIt will be more useful to change this and install Eclipse within a directory titled \"Eclipse\" within the system's main Application directory.\n\nClick on the folder icon to navigate to the Applications directory and create an \"Eclipse\" target sub-directory before installing.\n\n![Applications - Eclipse folder](documentation/images/osx/applications-folder-eclipse.png)\n\n![Eclipse Installer install location](documentation/images/eclipse/eclipse-installer-3.png)\n\nThen click the \"Install\" button.\n\nYou will be presented with the Eclipse Foundation Software User Agreement, so click \"Accept Now\" after reading it. \n\n![Eclipse Foundation Software User Agreement](documentation/images/eclipse/eclipse-software-user-agreement.png)\n\nThe installation process may take a few minutes and you will be presented with a green \"installing\" loading bar style indicator.\n\n![Installing Eclipse](documentation/images/eclipse/eclipse-installer-4.png)\n\nWhen Eclipse has finished installing you will be presented with the \"Launch\" green button.\n\n![Eclipse is now installed](documentation/images/eclipse/eclipse-installer-5.png)\n\nLaunch Eclipse for the first time. Doing so will ask you to Select a \"workspace.\" The default option \"/Users/[your username]/Documents/workspace\" will work fine.\n\n![Eclipse select workspace](documentation/images/eclipse/eclipse-select-workspace.png)\n\nQuit Eclipse for now.\t\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n### Install GitHub Desktop\n\nThe build's repository is found within GitHub, and the \"GitHub Desktop\" application will allow you to clone and work on the build more easily, while retaining a link to the primary source, and thus obtaining updates and having the option to submit modifications which could be candidates for inclusion.  GitHub Desktop is currently available for both OS X and Windows.\n\nGo to: [GitHub Desktop](https://desktop.github.com/)\n\n![GitHub Desktop](documentation/images/github/github_desktop.png)\n\nClick on the \"Download GitHub Desktop\" button.\n\nUnzip the resulting file: GitHub Desktop 216.zip\n\nThis expands to: GitHub Desktop\n\nMove this to your system's Applications directory.\n\n![Applications directory](documentation/images/osx/applications_folder.png)\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n### Clone GitHub repository\n\nSwitch your Eclipse workspace to the parent of the folder you cloned into\n\nThen go -\u003e File -\u003e New -\u003e Java Project -\u003e click next\n\nEnter 'dita-to-pdf-with-eclipse' in the Project Name field\n\nUn-check location checkbox and enter in the parent folder of the project. In project layout select -\u003e 'Use project folder as root for sources and class files' radio button and then click next.\n\nOn the next screen just click 'Finish'\n\nYou must add the JAR files from DITA-OT to Ant inside Eclipse. Go Preferences -\u003e Ant -\u003e Runtime -\u003e Classpath tab -\u003e click Global Entries -\u003e click Add JARs -\u003e navigate to 'libs/dita-ot-2.2.2/lib' and add all the JAR files from that directory.  Make sure to click Apply and then click Ok.\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n### Build and run project\t\n\t\nRight click on build.xml and select -\u003e Run As -\u003e Ant Build -\u003e (first one)\n\n![Run the build](documentation/images/ant/dita_ant_build.png)\n\nThis should run and build and use as input both the DITA XML in the 'dita-test-files/debrief/' folder and the three ditamap's from the 'libs/dita-ot-2.2.2/samples' directory and will produce four PDF's in the  'output' sub folders 'output/debrief/pdf' and 'output/samples/pdf' folder.\n\nTransformation and rendering (printing) occur in this step and the 'info.debrief' custom DITA-OT plugin produces a custom designed PDF via the DITA-OT base libraries, an XSL - Formatting Objects Processor (FO Processor) and the transformation engine SaxonHE.  The other plugin 'sample' is a vanilla plugin with very little customization that makes the three sample PDF's.\n\nI used Apache FOP 2.1 for the FO Processor and Saxon for the transformation engine that came bundled with DITA-OT 2.2.2. \n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n## How DITA-OT PDF Plugins work\n\nPlugins are placed in the DITA-OT plugins directory.  You can see the plugin I built in this directory named 'info.debrief' and the auto built vanilla plugin named 'sample'.\n\nWhen ready a plugin must be integrated into DITA-OT using Apache Ant. I built this project using OS X and I installed Ant through Homebrew. \n \nTo integrate a new plugin on the command line from inside the root DITA-OT folder it would be -\u003e ant -f integrator.xml\n\nYou can also run the integrator inside Eclipse as an Ant build by right clicking on '/libs/dita-ot-2.2.2/integrator.xml' and selecting -\u003e Run As -\u003e Ant Build and this should integrate the plugin with the toolkit.\n\nEvery plugin has a 'transtype' -\u003e the two transtype's are 'debrief' and 'sample'\n\nPDF Plugins are comprised of some XML config files, some artwork and some custom XSL (XSLT/XSL-FO/XPath) code \nDITA-OT provides that base XSL code that you 'override' with your custom work.\n\nThe two main files that configure plugins are plugin.xml and integrator.xml which should be in the root of the plugin folder.  The 'cfg' folder contains the rest of the customization.\n\nCustom XSL can be placed in two XSL files both named custom.xsl.  I placed all the custom code at 'libs/dita-ot-2.2.2/plugins/info.debrief/cfg/fo/xsl/custom.xsl' for this project.  The other file is seen in the adjacent 'attrs' directory. \n \nPlacing the custom code only in these two files follows best practice techniques on how to build a DITA-OT PDF plugin.\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n## Homebrew usage\n\n[Homebrew](http://brew.sh) is an amazing package management system for OS X that installs the stuff you need that Apple didn't.\n\n[Homebrew Formula](http://brewformulas.org) are written in Ruby.\n\nA made a [video on Homebrew](https://www.youtube.com/watch?v=IonWEFStPio) which runs for under minute that shows the typical brew update command.\n\nIf you install Homebrew you should try to run brew update daily.\n\nOnce you have installed Homebrew you can run through the basic commands below.\n\n### brew -v\n\n![brew -v](documentation/images/homebrew/brew-v.png)\n\n### man brew\n![man brew](documentation/images/man/man_brew.png)\n\n**Before using Homebrew you should ensure it's up to date. Run the next command:**\n\n### brew doctor\n![brew doctor](documentation/images/homebrew/brew_doctor.png)\n\n### brew update\n![brew update](documentation/images/homebrew/brew_update.png)\n\n### Example output of running a brew install command.  The image shows pouring brews from their bottles\n![pouring brews](documentation/images/homebrew/pouring_brews.png)\n\n### brew list\n![brew list](documentation/images/homebrew/brew_list.png)\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n\n## List of resources and technologies used on this GitHub project\n\t\nEclipse - https://eclipse.org/ \n\nThe Apache Software Foundation - http://www.apache.org/\n\nApache FOP - https://xmlgraphics.apache.org/fop/\n\nApache ANT - http://ant.apache.org\n\nSaxon XSLT - https://en.wikipedia.org/wiki/Saxon_XSLT\n\nSaxon - http://saxon.sourceforge.net/\n\nSaxonica - http://www.saxonica.com/welcome/welcome.xml\n\nOnline community for the Darwin Information Typing Architecture OASIS Standard - http://dita.xml.org/\n\nDITA - https://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture\n\nDITA-Open Toolkit - http://www.dita-ot.org/\n\nW3C - The Extensible Stylesheet Language Family (XSL) - http://www.w3.org/Style/XSL/\n\nW3C XSLT 2.0 - http://www.w3.org/TR/xslt20/ \n\nXSL Formatting Objects - https://en.wikipedia.org/wiki/XSL_Formatting_Objects\n\nXSL-FO Processors - http://www.w3.org/community/ppl/wiki/XSL-FO_Processors\n\nXML - https://en.wikipedia.org/wiki/XML\n\nAdobe PDF - https://en.wikipedia.org/wiki/Portable_Document_Format\n\nThe Organization for the Advancement of Structured Information Standards (OASIS) - https://en.wikipedia.org/wiki/OASIS_(organization)\n\noXygen XML Editor - http://www.oxygenxml.com\n\nDITA-OT installing plugins - http://dita-ot.sourceforge.net/1.7/dev_ref/plugins-installing.html\n\nGenerate sample DITA-OT plugin - https://dita-generator-hrd.appspot.com/pdf-plugin/\n\nCreating DITA-OT plugins - http://dita-ot.sourceforge.net/1.5.4/dev_ref/plugins-overview.html\n\nCustomizing PDF output - http://www.dita-ot.org/1.8/readme/dita2pdf-customization.html\n\nXSLT FAQ. Docbook FAQ. Braille. - http://www.dpawson.co.uk/\n\nHomebrew — The missing package manager for OS X - http://brew.sh/\n\nApache Ant Wikipedia - https://en.wikipedia.org/wiki/Apache_Ant\n\nInstall Ant with Homebrew - http://brewformulas.org/Ant\n\nInstalling Apache Ant - http://ant.apache.org/manual/install.html\n\nCodecademy - Learn the Command Line - https://www.codecademy.com/courses/learn-the-command-line\n\nCodecademy - Learn Java - https://www.codecademy.com/learn/learn-java\n\nGot 15 minutes and want to learn Git? https://try.github.io/levels/1/challenges/1\n\nRuby regular expression editor - http://rubular.com/\n\nEssential programmer training - http://www.codewars.com/\n\nMastering Markdown - https://guides.github.com/features/mastering-markdown/\n\nGitHub Desktop - https://desktop.github.com/\n\nMicrosoft File Checksum Integrity Verifier - https://www.microsoft.com/en-au/download/details.aspx?id=11533\n\nTechSmith Camtasia - https://www.techsmith.com/camtasia.html\n\nMD5 - https://en.wikipedia.org/wiki/MD5\n\nsha1sum - https://en.wikipedia.org/wiki/Sha1sum\n\nIDE - Integrated Development Environment - https://en.wikipedia.org/wiki/Integrated_development_environment\n\nGit (software) - https://en.wikipedia.org/wiki/Git_(software)\n\nman page - https://en.wikipedia.org/wiki/Man_page\n\nTerminal (OS X) - https://en.wikipedia.org/wiki/Terminal_(OS_X)\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse) [\u0026#8595;](#license)\n\n## License\n\nThe DITA Open Toolkit and Apache FOP are licensed for use under the the Apache Software Foundation License v2.0.\n\nSaxon uses the Mozilla Public License Version 2.0.\n\n[\u0026#8593;](#dita-to-pdf-with-eclipse)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbampton%2Fdita-to-pdf-with-eclipse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbampton%2Fdita-to-pdf-with-eclipse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbampton%2Fdita-to-pdf-with-eclipse/lists"}