Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that I can make Dia to fit a diagram into a page of a fixed size:

enter image description here

But I want the resulting / exported pdf-page to have no border. Currently, I use pdfcrop for this task, but I would like to do it with Dia. The export must be to a PDF with vector graphics.

Is this possible? How can I do it?

share|improve this question
What does "have no border" mean? – David Dec 5 '12 at 21:26
When you look at the image, you can see that there is some space below of the diagram on the page. I want the page to end at the end of the diagram. So I should perhaps call it "padding" instead of border? – Martin Thoma Dec 6 '12 at 6:08
So what you want is to set the image to stretch across the whole page, such that there is no extra room on the page? – David Dec 6 '12 at 19:51
No. I want the page to have the aspect ratio that my diagram has, not vice versa. – Martin Thoma Dec 6 '12 at 20:03
I just tried to do what you're asking for using Dia on Linux Mint, and it works. I set all margins to 0cm in Page Setup, then I exported to PDF with the fit to 1 by 1 option enabled. Output is an A4 PDF with no borders and the aspect ratio is correct. – misha256 Dec 9 '14 at 6:22

It is not possible to do this natively in Dia.

Being open source software, the feature could be implemented.

There is nothing that technically prevents a PDF from having custom dimensions (but it can't have no dimensions, that goes without saying I think).

Just in case Dia coders are reading this, the way I see the feature implemented would look like this:

  1. You would still have to select a paper size in Page Setup.
  2. You would set all margins to zero
  3. You would then tick a check-box named something like "Crop paper size to fit content"

On export, Dia would first scale the image to best fit the paper size, then adjust the paper size in one dimension to eliminate remaining empty space, then perform the render to PDF.

Who wants to implement this? If I had the coding expertise I would, because frankly this would be an excellent feature which I'd use myself too.

share|improve this answer

To get an image without any padding, you can export the image as a .png:

enter image description here

If you want to print the image as it appears in Dia, go to Page Setup and set the scale to 100 and the margins to whatever you like (It's not clear if you wanted to set them to 0 or not.) Make sure that the image falls within the blue lines, as that is your page outline.

enter image description here

share|improve this answer
This way it will only have one of the sizes / aspect ratios provided in "Paper size". So this is not a solution to my problem. – Martin Thoma Dec 6 '13 at 11:29
Making a custom page size in a PDF is a pretty non-standard thing to do, so I don't think you are going to have much luck getting it done in one step. – David Dec 6 '13 at 16:26
I know it's a non-standard thing to do, but the point it if I save in PNG, it's not vector graphic anymore. Later on if I want to embed it in a pdf built from latex, a pdf image would be the best, and that's why I prefer the pdf file with no ANY extra padding. – Jim Raynor Dec 3 '14 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .