4

I am currently drawing some charts and diagrams using MS Visio. But when I convert them into pdf for using in Latex-Documents, I get the whole page of the vsd-file, and not just the diagrams etc. So the entire page will be converted into pdf. Since I don't have access to tools such as Adobe Acrobat Pro etc., I also can't cut the diagram from the pdf-file just so. Adobe Reader hasn't got any alike function except the snapshot, which only helps if I copy it into MS Word or so. I am not an expert of MS Office, so I also can't convert to the pdf from MS Word, without having page background.

So the question is, is it possible to only convert the diagrams/charts or selections into pdf in -preferably- Visio or Word?

Thanks!

DanglingElse
  • 243
  • 5
  • 12
  • I know next to nothing about "Visio" and if it's possible to export selection, but you can post-process PDF and I think disabling first white fill in page content stream will work for you. – user2846289 Dec 01 '13 at 11:45
  • Thanks for the reply, but sorry, I didn't get what you mean by "disabling first white fill in page content stream". Could you be more specific? – DanglingElse Dec 01 '13 at 17:57

2 Answers2

6

You can resize the page to precisely fit the drawing. If you're using Visio 2010, you'll find it under the Design tab in the Size menu. That should get rid of the extra white surrounding the shapes in the diagram.

Mike Woolf
  • 1,210
  • 7
  • 11
  • Thanks, but unfortunately I'm using Visio 2007 and I couldn't find any option under "Design" to resize the page. Have any further ideas? – DanglingElse Dec 04 '13 at 13:27
  • Ok, I have found it when I googled for "resize page visio 2007". :) I guess what I needed was the concept of resizing the underlying page. http://office.microsoft.com/en-us/visio-help/change-the-drawing-page-or-printer-paper-size-HP001231127.aspx – DanglingElse Dec 04 '13 at 13:32
  • Thanks! I wish I found this comment earlier! – Javad May 07 '15 at 01:36
2

Old question, but if some still struggles, here is a different approach. Instead of manually resizing the visio page, I just crop the finished pdf. You can do so by using pdfcrop src dest. pdfcrop is a command line tool included in latex, so if you already use latex you should be able to use is straight away.

If you are on windows, below you can see a simple batch script which crops all pdf files in the current folder and all sub folders:

For /R %cd% %%G IN (*.pdf) do pdfcrop "%%G" "%%G"
pause
Jakob
  • 369
  • 1
  • 3
  • 11
  • Thanks, this is great solution. Just to note that I had to use `pdfcrop --ini` to get this to work, see [pdfcrop fails to run on a file](https://tex.stackexchange.com/questions/70138/pdfcrop-fails-to-run-on-a-file). – Skeve Oct 04 '20 at 11:28