Print from command line



Hello!

I would like to run dia from the command line and have it print the diagram provided as command line argument.

I found an old post form 2010 [1], which describes an acceptable method for having dia run python scripts on startup automatically. Assuming this still works, what does a python script, that has dia print the one opened diagram, look like? Is printing functionality even exposed to dia's python console?

This is why I want the print-with-python approach:

Apparently, when dia exports (especially) to svg and eps, it converts all text to paths. This is problematic in some ways:
* no embedded fonts (not directly problematic)
* files about 20 times the size they need to be (sometimes problematic, because diagrams tend to account for 50-80% of the final PDFs sizes)
* diagrams look ugly on paper (very bad!)

However, when I print my diagrams using the cups pdf-file-printer, I end up with PDFs I like much better:
* embedded fonts (one can copy&paste name/text; i am still hoping I
  will be able to replace all those subsets with just one embedding of
  the entire font ... or at least the superset of all subsets to avoid
  redundancy)
* small files (load/print/mail faster)
* the print out looks as good as the PDF promises (want!)

Cheers

Martin


[1] https://mail.gnome.org/archives/dia-list/2010-June/msg00017.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]