Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Save composite content as an image or pdf file
Save composite content as an image or pdf file [message #1716807] Tue, 08 December 2015 10:57 Go to next message
hortiz Mising name is currently offline hortiz Mising nameFriend
Messages: 96
Registered: July 2009
Member
Hi !

I'm trying to save a composite and its whole content into a file, a pdf or an image.
This composite may have an hidden part as it uses a vertical scroll bar, but I want that these hidden part to be include in the pdf or image file.
Any idea ?
Thanks !

Helene
Re: Save composite content as an image or pdf file [message #1716868 is a reply to message #1716807] Tue, 08 December 2015 17:11 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 693
Registered: January 2012
Senior Member

Always worth checking through the SWT Snippets:



Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Save composite content as an image or pdf file [message #1717132 is a reply to message #1716868] Thu, 10 December 2015 08:13 Go to previous messageGo to next message
hortiz Mising name is currently offline hortiz Mising nameFriend
Messages: 96
Registered: July 2009
Member
=> "Always worth checking through the SWT Snippets"

Always read carefully the question Wink

I've tested these snippets already...
My problem is that the hidden part is not taken into account while saving the image. Thought I was clear....
Re: Save composite content as an image or pdf file [message #1717204 is a reply to message #1717132] Thu, 10 December 2015 17:39 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 693
Registered: January 2012
Senior Member

Sorry Embarrassed

You can use Control#print(GC) where you pass in a GC on an Image. It seems to do the right thing for individual controls, like Tree or Table on OS X, and for Composites where content has a viewport with scrollbars (but not clipped).

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Save composite content as an image or pdf file [message #1717262 is a reply to message #1717204] Fri, 11 December 2015 08:28 Go to previous message
hortiz Mising name is currently offline hortiz Mising nameFriend
Messages: 96
Registered: July 2009
Member
Hi again,

I found a way to do it but it works on Windows but unfortunately not on Linux (I work on Debian 64 bits).
I'm going to post a new topic about this.
Thanks for your answer
Previous Topic:Posting event from linux doesn't work like with windows
Next Topic:How to make this snippet work on Linux ?
Goto Forum:
  


Current Time: Tue Dec 12 16:05:28 GMT 2017

Powered by FUDForum. Page generated in 0.02257 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software