Convert Dia diagram to PDF for easy viewing

Dia is a useful tool for drawing diagrams like flow-chart.  There are options to export the diagrams into images (png, jpg, etc.).  But the result is less than satisfactory.  The export produces one big image containing all the diagrams.

What I want is to be able to view each diagram individually and all the texts in the diagram are shown clearly.  Export to image approach usually result in unclear text.  Luckily, I’ve found a way: print the diagrams to a file (postscript) then convert it to PDF.

  1. From the menu, click File > Page Setup
  2. Change the settings to your need.  Set the margin to as small as possible or parts of your diagram may be hidden.
  3. From the menu, click File > Print
  4. Select print to file and give it a file name, then click OK.
  5. Use the following command to convert the just created postscript file into PDF:
  6. $ ps2pdf output.pdf

6 responses to “Convert Dia diagram to PDF for easy viewing

  1. Frank May 3, 2009 at 11:12 pm

    Hey, many thanks for that. Exactly what I was looking for and it worked a treat!

  2. Eugene August 20, 2011 at 6:22 pm

    i don’t get why it’s not working. 😦
    i’m ok for the first 4 steps, i think, but have no clue how to do the fifth.


  3. Eugene August 20, 2011 at 6:23 pm

    perhaps i’m not too IT savvy, but what does “Use the following command” mean?

    • wenlong August 22, 2011 at 5:37 pm

      You need to open a terminal and run the command. It means, run a command (application) called `ps2pdf’ on the file `’ (the one you created by following the first 4 steps). The output file is called `output.pdf’ (this is the final PDF file you want).

  4. Suyash Srivastava January 31, 2016 at 8:33 pm

    You can also use a tool named “DiaTool” for this.
    Click on the following link if you want to download it.

  5. Dell Anderson July 17, 2017 at 3:33 am

    Apparently this is no longer necessary – at least with the Ubuntu repos version of dia I installed. Just choose:
    Print > PrinttoFile (click it!) > Output format PDF > Print
    NOTE: if you need to resize your diagram, do this first in print setup > scale (I couldn’t find an easier way to select all objects and resize them to fit on one page for example – there may be one).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: