Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable exporting plot directly into PPT #1527

Closed
aashish24 opened this issue Sep 9, 2015 · 11 comments
Closed

Enable exporting plot directly into PPT #1527

aashish24 opened this issue Sep 9, 2015 · 11 comments
Assignees
Milestone

Comments

@aashish24
Copy link
Contributor

  • research if this is possible
@aashish24 aashish24 self-assigned this Sep 9, 2015
@aashish24 aashish24 added this to the 3.0 milestone Sep 9, 2015
@durack1
Copy link
Member

durack1 commented Sep 9, 2015

@aashish24 just a question.. What renderer does VTK use for postscript exports? I was trying to edit fonts in a VCS-exported *.ps file and realised that the fonts didn't appear to be created correctly - they aren't text objects as would be normally defined in the (very large) exported file..

@aashish24
Copy link
Contributor Author

there is a module for GL2PS in vtk. @dlonie would know more about that. @dlonie can you point @durack1 to the source code?

@durack1
Copy link
Member

durack1 commented Sep 9, 2015

@aashish24 thanks, will await hints from @dlonie

For what it's worth, as a UV-CDAT user I would never use an option to directly export to a *.pptx file, as there is very little control exposed in that software (color space etc)..

It would be interesting to me to investigate the ability to export to *.svg however..

Here are some relevant links:
http://graphicdesign.stackexchange.com/questions/22423/why-does-illustrator-cs6-save-for-microsoft-office-use-png-format
https://en.wikipedia.org/wiki/Windows_Metafile (Hybrid Windows vector/bitmap format - looks like v12.0 was just released in 2015, so could be another output format to support)
https://en.wikipedia.org/wiki/Microsoft_Open_Specification_Promise#Graphics_formats
https://msdn.microsoft.com/en-us/library/windows/desktop/dd183519%28v=vs.85%29.aspx

@alliepiper
Copy link
Contributor

Text in VCS vector graphics is exported as a set of paths (that is, the characters are drawn as shapes in the file, rather than encoded as strings). This is to work around a number of export and portability issues regarding alignment, viewer font availability, portable regression testing, etc. If you'd like to modify them, you'll need to erase the path objects and replace them with a new text object using a post-processing editor.

@durack1
Copy link
Member

durack1 commented Sep 9, 2015

@dlonie ok, I was under the impression that *.ps text objects would be more like:

/Times-Roman findfont
12 scalefont
setfont
newpath
100 200 moveto
(Example 3) show

Rather than the alternate.. Is there a way of labeling the shapes as text objects, so that an import to vector editing software (e.g. Adobe Illustrator) will know about it being text? It would certainly aid the ability to tweak figures after exporting..

@alliepiper
Copy link
Contributor

We had it like that, but changed it to use paths as not all of the vector formats support things like text alignment/rotation, and fonts vary greatly from platform to platform. These issues leading to portability problems and bad-looking outputs.

It should be possible to add an option to the export methods in VCS to toggle between text objects and path exports. Check with @doutriaux1 about it, as it would require some API changes in the VCS library.

@durack1
Copy link
Member

durack1 commented Sep 9, 2015

@dlonie great, exposing the ability to write text as text objects rather than shape objects would be great.. I'd also imagine it'd reduce the file size of *.ps (and *.pdf #517) files a long way too..

What do you need to be done from the VCS API side?

@durack1
Copy link
Member

durack1 commented Sep 9, 2015

@aashish24 @dlonie should this be morphed into another issue - it seems I hijacked the original one..

@alliepiper
Copy link
Contributor

Yes, this should be a separate issue. There's nothing needed for this on the VTK side of things, there is an option on vtkGL2PSExporter to toggle between the two text styles. The VCS folks would need to add option to their library to switch between the modes.

@doutriaux1
Copy link
Contributor

@durack1 that doesn't sound too hard, mind creating the issue, I think we can put to toggle on the x.ps function and default it to @durack1 favorite mode.

@durack1
Copy link
Member

durack1 commented Sep 10, 2015

@doutriaux1 done #1537 - I would like both options exposed, maybe through an additional keyword argument?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants