OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Macro to Export Draw File with several pages to eps

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
marcstutt
Newbie
Newbie


Joined: 24 Aug 2006
Posts: 4

PostPosted: Sun Oct 15, 2006 4:16 am    Post subject: Macro to Export Draw File with several pages to eps Reply with quote

Hello,

I'm rather new to macro programming, nevertheless I'm trying to write a macro, which exports each page of a draw document to eps/png/... file.
I have started with the following code:


sub ExportPagesToPNG()

oDoc = ThisComponent
oDrawPages = oDoc.getDrawPages()
Dim numberOfPages as integer
numberOfPages = oDrawPages.getCount()

For i = 0 To numberOfPages -1
print i
oPage = oDrawPages.getByIndex(i)
print oPage.getName()
oPageSelection = ??????
oExportFilter = createUnoService( "com.sun.star.drawing.GraphicExportFilter" )
oExportFilter.setSourceDocument( oPageSelection )
cExportUrl = oDoc.getURL()
cExportUrl = Left( cExportUrl, Len(cExportUrl)-4 ) + "_" + i + ".png"
...
next i
end sub

How can I select everything on the page and assign it to the variable oPageSelection?

Best Regards
Marc
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group