Converting from Sandcastle to DITA usable format - sandcastle

Novice in DITA or XSL. I am faced with a challange of building documentation for API documentation. Currently I am able to product the HTML and CHM help using Sandcastle on a C# Assembly and an XML. I have a requirement to to produce it in DITA. Any leads?
Thanks

If I have understood correctly, there is a way to migrate HTML to DITA with DITA Open Toolkit. Would this be enough? http://dita-ot.sourceforge.net/1.5.2/readme/DITA-h2d.html

Related

Can a CSS file be used to generate PDF output?

Does DITA-OT support generation of PDF output with CSS customizations? I think it supports PDF generation using Apache FOP.
I generate both HTML and PDF output and want to use CSS.
Thanks...
The DITA Open Toolkit does not come with default support for using CSS to create PDF. But it can be done. Here is general info on a few ways to do it, to give you an idea:
If you have a late-model version of the Oxygen XML editor, you can use the transformation scenario called DITA Map PDF - based on HTML5 & CSS. This is probably the easiest way to go. If you want to have this capability on a server, there is an extra charge. See Oxygen PDF Chemistry for more info: https://www.oxygenxml.com/chemistry-html-to-pdf-converter.html
The XML Rocks DITA OT plugin, which requires a commercial PDF processor, one of these: Antenna House Formatter, PDFReactor, Vivliostyle or Prince. https://github.com/xmlrocks/dita-ot-pdf-css-page
Do it yourself. One way I have done this is to create normal XHTML output from the DITA OT, and then use a PDF processor and CSS to transform the XHTML to PDF. I have used Antenna House, but other commercial PDF processors (see above) can work also. You should make the XHTML all in one file (all DITA topics merged into one file) by adding this attribute to the <map> element: <map chunk="to-content">

How to add annotations to PDF using DITA-OT

I need to create a PDF from DITA with annotations embedded. Are there hooks in PDF2 to enable this?
You should read the docs of the args.draft parameter (DITA-OT - Common Parameters) and the Generating PDF comments using args.draft=yes XML forum post.

Is there a way to import HTML into JavaHelp?

I'm trying to automate JavaHelp generation from a book (HTML) already on the web to bundle as a NetBeans module. Is there a way to automate the conversion into JavaHelp format?
How are you writing your book? If you're using DocBook then you can generate JavaHelp directly from it.
It appears that you can use JHelpDev to create Java Help sets from existing HTML. It looks pretty simple to use but I can't attest to it's quality.

docx - markup / markup - docx conversion

I have to store some documents in the docx format, but can't stand using msword: I would like to edit some kind of plain text markup, anything except stuff based on XML (I don't like that either) and convert from/to that to/from docx.
Are there any options for this?
EDIT: since people think this is not programming related, I'll extend my question. What libraries do you suggest for writing a complete tex-docx/docx-tex converter?
If you're talking .net, I'd check out the OpenXML toolkit first. There are lots of "libraries" on the internet to do this, but they all seem to just be thin wrappers around the OpenXML stuff.
You might also check out
http://openxmldeveloper.org/
Aspose.Words for .NET allows you to create DOCX files from scratch using text or other content and then convert DOCX files to text etc. It doesn't require MS Office to be installed on the system. And the component is a simple .NET assembly with an easy to learn and implement API. Please try and see if it helps in your scenario.
Disclosure: I work as developer evangelist at Aspose.
You can try the DocxEditorKit http://java-sl.com/docx_editor_kit.html
Set the editor kit to JEditorPane, add styled text and store the document in docx format.

Programmatically convert DITA to FrameMaker

Is there a toolkit available (paid or otherwise) to help with programmatically converting a DITA document to a FrameMaker one?
I'm attempting to make an application that converts to multiple formats from DITA. I know I can use the DITA Open Toolkit for most of my needs, but I need to be able to create a native FrameMaker document as well.
Programing language doesn't matter, altho I prefer Java as my application will be web based.
Arbortext import-export is industrial strength and very flexible. You could also try MIFtoGo. Conversion is tricky because source documents are rarely consistent. Conversion without cleanup before and after is next to impossible.
DITA-FMx is what you need:
http://leximation.com/dita-fmx/
Using DITA-FMx, you generate a FrameMaker book from your ditamap (and then save the FM book as PDF).
There is a movie on YouTube that shows you how the process goes. Just search for "PDF Publishing with DITA-FMx 1.1" (Stack Overflow does not allow me to post a second URL here yet)
If you like to see an example, just send me a small sample of a ditamap and I'll generate a FrameMaker book for you.
The disclaimer is that if you're converting a lot of documents you'll be better off with a supported well-integrated solution that fully uses FrameMaker's DITA support. If you're looking to do it on the cheap though (and who isn't) you can do this conversion by using straight XSLT and framemaker templates.
First create the framemaker template to handle the appearance of the document, then use XSLT to map your DITA content to the content tags you've used in Framemaker.
You can use the free SAXON xslt interpretor to do the actual conversion.
Here is some of adobe's reference material on authoring new DITA documents:
http://help.adobe.com/en_US/FrameMaker/8.0/05h/dita.html
Info on Framemakers's native XML support is here:
http://www.adobe.com/products/framemaker/pdfs/xml_fm7.pdf
The framemaker manuals also cover the subject quite extensively. Hope that helps
Indeed FM supports loading DITA files (I tried FM10 and newer) but to automate conversion to .FM format you either use the internal scripting mechanism which is still some manual work.
I have found an existing free utility that can do most basic operations like opening a file, 'saving as' another format and closing it.
tool name is DZBatcher
Example DZbatcher batch file:
Open "c:\My Dita Files\Doc1.dita"
SaveAs -d "c:\My FM Files\Doc1.fm"
Close "c:\My FM Files\Doc1.fm"
Open "c:\My Dita Files\Doc2.dita"
SaveAs -d "c:\My FM Files\Doc2.fm"
Close "c:\My FM Files\Doc2.fm"
Exit
Adobe has a framework called RoboHelp which is probably the infrastructure for this, but I didn't dig deeper as this utility did the job perfectly.
In my SW flow, I created this batch file using a python script that scan all the docs in an input directory and added 3 lines per file as seen above.
I used FM2015 for this task.
Bryan, after a decade's experience converting Frame, Word, Interleaf, etc to XML, I'll tell you that Adobe doesn't have it fully covered. The DITA support in FrameMaker works best if you also have the Leximation plug-in or know how to program the Adobe proprietary EDD. You can't do DITA specialization without programming the EDD in FrameMaker.
FrameMaker has excellent support for DITA. You can open DITA topics, and save them (if you wish) as .fm files. You could also open DITAMAPS, and save them as FrameMaker book files, or as composite (monolithic) .fm files. There is no need to write a parser.
PS: I am talking about FM 12.