securedrop-client
securedrop-client copied to clipboard
[securedrop-export] Broaden printable filetypes to include more types
We currently convert Office/Libreoffice files using unoconv
to print them as PDFs. unoconv
(already installed in sd-devices) currently supports the following filetypes: [Edit: see comment below regarding moving away from unoconv]
The following list of document formats are currently available:
bib - BibTeX [.bib]
doc - Microsoft Word 97/2000/XP [.doc]
doc6 - Microsoft Word 6.0 [.doc]
doc95 - Microsoft Word 95 [.doc]
docbook - DocBook [.xml]
docx - Microsoft Office Open XML [.docx]
docx7 - Microsoft Office Open XML [.docx]
fodt - OpenDocument Text (Flat XML) [.fodt]
html - HTML Document (OpenOffice.org Writer) [.html]
latex - LaTeX 2e [.ltx]
mediawiki - MediaWiki [.txt]
odt - ODF Text Document [.odt]
ooxml - Microsoft Office Open XML [.xml]
ott - Open Document Text [.ott]
pdf - Portable Document Format [.pdf]
rtf - Rich Text Format [.rtf]
stw - Open Office.org 1.0 Text Document Template [.stw]
sxw - Open Office.org 1.0 Text Document [.sxw]
text - Text Encoded [.txt]
txt - Text [.txt]
uot - Unified Office Format text [.uot]
xhtml - XHTML Document [.html]
epub - Electronic Publication [.epub]
The following list of graphics formats are currently available:
bmp - Windows Bitmap [.bmp]
emf - Enhanced Metafile [.emf]
eps - Encapsulated PostScript [.eps]
fodg - OpenDocument Drawing (Flat XML) [.fodg]
gif - Graphics Interchange Format [.gif]
html - HTML Document (OpenOffice.org Draw) [.html]
jpg - Joint Photographic Experts Group [.jpg]
met - OS/2 Metafile [.met]
odd - OpenDocument Drawing [.odd]
otg - OpenDocument Drawing Template [.otg]
pbm - Portable Bitmap [.pbm]
pct - Mac Pict [.pct]
pdf - Portable Document Format [.pdf]
pgm - Portable Graymap [.pgm]
png - Portable Network Graphic [.png]
ppm - Portable Pixelmap [.ppm]
ras - Sun Raster Image [.ras]
std - OpenOffice.org 1.0 Drawing Template [.std]
svg - Scalable Vector Graphics [.svg]
svm - StarView Metafile [.svm]
swf - Macromedia Flash (SWF) [.swf]
sxd - OpenOffice.org 1.0 Drawing [.sxd]
tiff - Tagged Image File Format [.tiff]
wmf - Windows Metafile [.wmf]
xhtml - XHTML [.xhtml]
xpm - X PixMap [.xpm]
The following list of presentation formats are currently available:
bmp - Windows Bitmap [.bmp]
emf - Enhanced Metafile [.emf]
eps - Encapsulated PostScript [.eps]
fodp - OpenDocument Presentation (Flat XML) [.fodp]
gif - Graphics Interchange Format [.gif]
html - HTML Document (OpenOffice.org Impress) [.html]
jpg - Joint Photographic Experts Group [.jpg]
met - OS/2 Metafile [.met]
odg - ODF Drawing (Impress) [.odg]
odp - ODF Presentation [.odp]
otp - ODF Presentation Template [.otp]
pbm - Portable Bitmap [.pbm]
pct - Mac Pict [.pct]
pdf - Portable Document Format [.pdf]
pgm - Portable Graymap [.pgm]
png - Portable Network Graphic [.png]
potm - Microsoft PowerPoint 2007/2010 XML Template [.potm]
pot - Microsoft PowerPoint 97/2000/XP Template [.pot]
ppm - Portable Pixelmap [.ppm]
pptx - Microsoft PowerPoint 2007/2010 XML [.pptx]
pps - Microsoft PowerPoint 97/2000/XP (Autoplay) [.pps]
ppt - Microsoft PowerPoint 97/2000/XP [.ppt]
pwp - PlaceWare [.pwp]
ras - Sun Raster Image [.ras]
sda - StarDraw 5.0 (OpenOffice.org Impress) [.sda]
sxd - OpenOffice.org 1.0 Drawing (OpenOffice.org Impress) [.sxd]
sti - OpenOffice.org 1.0 Presentation Template [.sti]
svg - Scalable Vector Graphics [.svg]
svm - StarView Metafile [.svm]
swf - Macromedia Flash (SWF) [.swf]
sxi - OpenOffice.org 1.0 Presentation [.sxi]
tiff - Tagged Image File Format [.tiff]
uop - Unified Office Format presentation [.uop]
wmf - Windows Metafile [.wmf]
xhtml - XHTML [.xml]
xpm - X PixMap [.xpm]
The following list of spreadsheet formats are currently available:
csv - Text CSV [.csv]
dbf - dBASE [.dbf]
dif - Data Interchange Format [.dif]
fods - OpenDocument Spreadsheet (Flat XML) [.fods]
html - HTML Document (OpenOffice.org Calc) [.html]
ods - ODF Spreadsheet [.ods]
ooxml - Microsoft Excel 2003 XML [.xml]
ots - ODF Spreadsheet Template [.ots]
pdf - Portable Document Format [.pdf]
slk - SYLK [.slk]
stc - OpenOffice.org 1.0 Spreadsheet Template [.stc]
sxc - OpenOffice.org 1.0 Spreadsheet [.sxc]
uos - Unified Office Format spreadsheet [.uos]
xhtml - XHTML [.xhtml]
xls - Microsoft Excel 97/2000/XP [.xls]
xls5 - Microsoft Excel 5.0 [.xls]
xls95 - Microsoft Excel 95 [.xls]
xlt - Microsoft Excel 97/2000/XP Template [.xlt]
xlt5 - Microsoft Excel 5.0 Template [.xlt]
xlt95 - Microsoft Excel 95 Template [.xlt]
xlsx - Microsoft Excel 2007/2010 XML [.xlsx]
It would be easy to add support for more of these filetypes (see eg https://github.com/freedomofpress/securedrop-export/pull/109), would be helpful for users (see eg https://github.com/freedomofpress/securedrop-workstation/issues/836 or https://github.com/freedomofpress/securedrop-workstation/issues/834; though not about printing, the same concept applies), and would not require adding any additional dependencies. Let's discuss which formats are useful to include, as a stopgap while we figure out other formats such as webp support, or while we figure larger changes such as https://github.com/freedomofpress/securedrop-workstation/issues/842.
Note: unoconv
is also installed in sd-viewer, if we are looking for a quick way to add additional viewable filetypes without additional upstream dependencies.