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.

From the menu, click File > Page Setup

Change the settings to your need. Set the margin to as small as possible or parts of your diagram may be hidden.

From the menu, click File > Print

Select print to file and give it a file name, then click OK.

Use the following command to convert the just created postscript file into PDF:

Upon entering the page, your browser will warn you about some invalid certificate. That’s because you are using a self-sign certificate created in step 1 above.

To connect tomcat A to tomcat B via HTTPS

If you have a tomcat B that is offering some SOAP services via HTTPS but it is using self-sign certificate, you’ll get the following error when your servlet from tomcat A is trying to connect to tomcat B: