Re: Print from command line

Am 14.08.2014 um 00:43 schrieb Martin Metzker:

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?
Maybe there is a similar hack like the one form [1] but I don't know.

Is printing functionality even exposed to dia's pythonconsole?

The only Dia Python console I know is a GUI. It has nothing to do with running Dia from command line.

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.
Actually only one of three SVG exporters does this. Also the PostScript exporter has a variant keeping text as text.

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)
Huh? You are creating SVG or EPS to create PDF with another program?
Why not go to PDF with Dia directly? Like:

        dia ..\samples\render-test.dia -e rt.pdf

* 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
* small files (load/print/mail faster)
* the print out looks as good as the PDF promises (want!)

I think all this is also available with PDF created directly by Dia.

> [1]

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert

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