Book a Demo

Author Topic: Diagram Export to EPS/PDF  (Read 25520 times)

ssp

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Diagram Export to EPS/PDF
« on: December 03, 2009, 11:12:40 pm »
Hi everyone,
is there any way to export diagrams to EPS/PDF Format to use it in TeX-Documents? Maybe SVG would work too...

Many thanks
Soeren

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram Export to EPS/PDF
« Reply #1 on: December 03, 2009, 11:39:13 pm »
You can copy/past a diagram in a graphics editor and then save it in the required format, does that help?

Geert

ssp

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #2 on: December 04, 2009, 12:44:17 am »
Unfortunately not really. pasting it to inkscape for vector support crumbles the whole output (text gets put on wrong position) - pasting it to MS Paint destroys the colors and is in the end not the wanted vector graphic format for lossless scaling.

What's funny is that pasting to Visio looks great, but saving to SVG in Visio again destroys the text position in a new way?!

Has anybody any other ideas? Maybe using a PDF-Printer - but then the page layout must be adapted to the diagram....
« Last Edit: December 04, 2009, 12:45:14 am by ssp »

ssp

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #3 on: December 04, 2009, 12:48:08 am »
OK. In the end using FreePDF as Printer an changing the page layout to A5 Landscape kind of solved problem.

Is there anyway I can automate EA to print any diagram contained in the current selected model? Maybe via C# and the Automation Interface?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram Export to EPS/PDF
« Reply #4 on: December 04, 2009, 12:55:56 am »
I'm not sure about printing, but you surely can get the diagram image on the clipboard or in an image file.
See Project Interface for operations PutDiagramImageOnClipboard  or PutDiagramImageToFile

Geert

ssp

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #5 on: December 04, 2009, 01:43:47 am »
I did not find any PrintXXX method in Interop.EA.dll. I found PutDiagramImageToFile/ClipBoard, but thats apparently not working.

Is there any other way to print via automation interface?

Many thanks
Soeren

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram Export to EPS/PDF
« Reply #6 on: December 04, 2009, 02:57:14 am »
Soeren,

I've used the PutDiagramTo... methods before and I know they worked back then.
Maybe if you post the code you are using we can spot what's going wrong.

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #7 on: December 04, 2009, 08:21:38 am »
Quote
pasting it to inkscape for vector support crumbles the whole output (text gets put on wrong position)
Does the option at "Tools > Options > Diagram > Appearance > Invert rotated text for metafiles" help?
The Sparx Team
[email protected]

ssp

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #8 on: December 04, 2009, 08:29:53 pm »
Geert,
having

using Ctrl+C or Diagram|Copy Image or PutImageToClipBoard pretty much is the same function and leads to

Using Save To File produces

for emf

and wmf using InkScape.

Printing to PDF (which is the format of choice for my TeX-Document) produces


So my supposed way is to print the diagram to PDF . So again everybody: Is there any way to automate this? Clicking print for any of the about 30 diagrams is a bit annoying as they are subject to change

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #9 on: December 05, 2009, 01:55:20 am »
Hi,

I have asked for that feature, a print method in the object model for a specific diagram, a while ago. No response yet... More votes needed I assume.

// Magnus

maddec

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Diagram Export to EPS/PDF
« Reply #10 on: December 10, 2009, 05:50:35 am »
Hi there,

I definitely vote for this feature.

I use currently a pdf printer through the official Adobe Acrobat. But it is kind of boring because it needs to be done diagram by diagram and it miss header (diagram name and date, ...).

By the way when you export a pdf this way, it can be opened directly in Adobe Illustrator. Everything is maintained as vectors and even texts can be edited and font changed, the only exception are gradient, export is correct but they are not editable.

Since EA is purely vectorial I feel that they miss something big in not allowing their users to export vector high quality and size independant diagrams. Which can reveal useful for printed books content for instance...

Best regards.

maddec