File Conversion

Divooka converts files between formats in two ways: Save as… on any open file in Divooka Compute and Divooka Explore, and the File Conversion nodes, which do the same inside a graph - a programmable converter for documents, pictures, sounds, films and 3D models.

Every conversion is done by Divooka's own libraries, written in C# and shipped with the editors: nothing is installed beside them and no other program is run. A direction those libraries cannot do is not offered (see Not offered).

Save as

Right-click a file's tab and choose Save as…, or press the toolbar's Save as button (the disk with a pencil). In Divooka Explore, which shows one file at a time, right-click the file's name in the title bar.

The dialogue's list of types starts with the file's own format and then lists every format the file converts into. Choose one and a name:

  • The file's own format saves the file under the new name. A file you edit here - text, or a PDF you are marking in Divooka Compute - goes on in its tab under the new name; a file you only look at is copied.
  • Any other format writes a new file, and the tab stays on the file it shows. What is converted is what you see: text you typed and have not saved, and marks you made on a PDF and have not saved, are in the new file, and the file on disk is not changed.

The status bar says when the conversion starts and how it ended. A long one, such as a film, runs while you keep working.

Divooka documents (.dvk, .dvj) are not converted: their Save as offers the document's own forms - in Divooka Compute the binary form and the JSON form, in Divooka Explore the binary form.

What each file converts into

Text and code

File Saves as
Plain text (.txt) PDF, Word
Logs (.log), code (.cs, .py, .lua, .js, .ts, .ps1, .sh, .glsl, .c, .cpp, .h, .hpp, .java, .rs) and data written as text (.json, .yaml, .xml, .csv, .ini, .toml) PDF, Word
Markdown (.md) PDF, Word

Every text file becomes a PDF set in a monospaced face with its lines kept, so it reads exactly as it does in the editor.

Plain text becomes a Word document of prose paragraphs in the document's normal font. A text file has no other way to show where a paragraph ends, so a blank line ends one and the other line breaks are read as the wrapping of lines too long for the editor they were typed in, and joined:

  • Lines join into one paragraph, with a space between them, until a blank line ends it. Several blank lines end it once. Lines of Chinese or Japanese join with no space.
  • A line indented with spaces or a tab starts a paragraph of its own, its first line set in as far: a tab, or four spaces, is half an inch. The lines under it that are not indented continue it, which is how text that indents each paragraph's first line is written; several indented lines in a row each stay a paragraph of their own.
  • A line that starts like a list item - - , * , + , • , or a number and . or ) - starts a paragraph of its own, its marker kept as you typed it, and the items of a list are set close together. The lines under it continue the item until a blank line or the next item, and an indented item is set in as a whole, so a nested list stays nested.
  • A line longer than 100 characters is a paragraph by itself: nobody wraps a line that long by hand, so it is text saved a paragraph to a line.

Logs, code and data are not prose: their line breaks are their meaning, so they become a Word document with one paragraph per line in a monospaced face, exactly as the editor shows them.

A Markdown file becomes a PDF laid out as the editors' preview shows it, its code coloured and its Dhole diagrams drawn, and a Word document with its headings, lists, tables and code.

Documents

File Saves as
PDF Pictures of its pages: PNG, JPEG, BMP, TGA, QOI
Word (.docx) PDF, EPUB, PowerPoint, RTF, OpenDocument Text, HTML, and pictures of its pages
EPUB PDF, Word, PowerPoint, and pictures of its pages
PowerPoint (.pptx) PDF, and pictures of its slides
RTF, OpenDocument Text (.odt), HTML, Word 97-2003 (.doc) Word

Pages become one picture each, numbered: saving report.pdf as report.png writes report_0001.png, report_0002.png and so on, a document of one page too.

Pictures

File Saves as
PNG, JPEG, WebP, BMP, GIF, TGA, TIFF, QOI, ICO, Netpbm PNG, JPEG, WebP, BMP, GIF, TGA, TIFF, QOI, and a PDF of one page

Sounds and films

File Saves as
WAV, MP3, FLAC, Ogg, Opus, M4A, AAC, AIFF MP3, M4A, Ogg Vorbis, Opus, FLAC, WAV
MP4, WebM, Matroska (.mkv), QuickTime (.mov) MP4, WebM, Matroska, QuickTime, and the film's sound alone as MP3, M4A, Ogg Vorbis, Opus, FLAC or WAV

Films in H.264, VP8 and VP9 convert; films in HEVC, AV1 and the professional codecs do not.

3D models

File Converts into
OBJ, FBX, glTF and GLB, STL, PLY, Collada, 3DS, 3MF, DirectX, Blender and some forty more glTF binary, glTF, OBJ, STL, PLY, FBX, Collada, 3MF, X3D, 3DS, DirectX

The editors do not open 3D models in a tab, so a model is converted with the Convert 3D Model node.

Settings

There is no options dialogue: every conversion uses these settings.

Conversion Setting
To JPEG Quality 100, colour at full resolution
Pages to pictures 150 dots per inch: a US Letter page is 1275 × 1650 pixels
Text, Markdown and EPUB to PDF US Letter paper; a Word document keeps its own
A picture to PDF One page the size the picture shows at 100%
To WebP, TIFF Lossless
To MP3 192 kbit/s
To M4A AAC, 128 kbit/s
To Ogg Vorbis, quality 3 (about 100 kbit/s)
To Opus 96 kbit/s
To FLAC Level 5
To WAV 16-bit
To MP4, QuickTime H.264 and AAC
To Matroska H.264 and Opus
To WebM VP9 and Opus
A sound or film already in the target's codec Copied as it is, with nothing lost
3D models Faces cut into triangles

What a conversion loses

  • A JPEG is compressed with a small loss even at quality 100, and has no transparency: what was transparent becomes white. The status bar says so when it happens.
  • A GIF holds at most 256 colours; a picture with more is reduced, and the status bar says so.
  • MP3, M4A, Ogg and Opus are compressed with a loss; FLAC and WAV are not (WAV is 16-bit).
  • A film encoded again loses a little; a stream copied loses nothing. Subtitles are left out.
  • Plain text into Word loses its line breaks inside a paragraph, which are joined, and blank lines past the first between paragraphs; indentation becomes the paragraph's indent, columns lined up with spaces do not stay lined up in the normal font, and a list keeps its markers as text rather than becoming a Word list.
  • Pages as pictures are pictures: their text can no longer be selected.
  • Between documents, what the target cannot hold - headers and footers, comments, tracked changes - is left out, and the status bar says something could not be kept.
  • 3D models become triangles; STL and PLY keep the shape only, with no materials or textures; OBJ, STL, PLY and 3MF keep no animation.

Not offered

Conversion Why
PDF to Word, EPUB or text A PDF holds letters at positions on a page, not paragraphs; its pages convert to pictures
PowerPoint to Word or EPUB A slide has no reading order; a deck converts to PDF and to pictures
Anything to Markdown or to Word 97-2003 No writer for them
Spreadsheets Not yet
Pictures to HEIC, AVIF, JPEG XL, JPEG 2000 or an icon No writer for them in Divooka
Animated pictures, and films to GIF Only a GIF's first picture is read
HEVC, AV1 and professional video codecs Not carried by the editors
Sounds to AIFF, AAC without a container, WMA, AC-3 Read only, or no codec
3D models to USD or Blender No writer through this converter

The nodes

In the File Conversion toolbox:

Node Does
Convert Converts a file into the format a target path - or just a new extension such as .pdf - names
Conversion Targets Lists the extensions a file converts into
Convert Document Text, Markdown and documents to PDF, Word, EPUB, PowerPoint, RTF, OpenDocument or HTML
Convert Image A picture to PNG, JPEG, WebP, BMP, GIF, TGA, TIFF, QOI or PDF
Convert Audio A sound, or a film's sound, to MP3, M4A, Ogg Vorbis, Opus, FLAC or WAV
Convert Video A film to MP4, WebM, Matroska or QuickTime
Convert 3D Model A 3D model to glTF, OBJ, STL, PLY, FBX, Collada, 3MF, X3D, 3DS or DirectX
PDF to Images Every page of a PDF, a Word document, a book or a deck as a numbered picture

The typed nodes write beside the file they convert, or into the folder on their Folder input, with the same name and the new extension. The example File Conversion/Batch Converter converts every file in a folder.