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

doc_converter macro. [linux 2.6 - OOo 1.1.3]

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


Joined: 12 Apr 2005
Posts: 8

PostPosted: Tue Apr 26, 2005 5:35 am    Post subject: doc_converter macro. [linux 2.6 - OOo 1.1.3] Reply with quote

Hello All,

i have download the Danny Brewer macro called Doc-converter.
Many thanks, it is works fine.

I need the same folders for sources and destinations documents.
I fix it in macro with the const. options, at begining of page. That s ok.

I need ppt input and pdf ouput. But i don t know how to do that. I try to cut some pages in macro.
but... i need some help to do that correctly !


( note : with some ppt files, OOo says "not enough central memory, close some applx", and crash after. Is it possible, when a file like that is discovered, to not work with and just pass at next file ? Just contineous the batch process with other file and leave problems ppt (no convert when no good open ?)
How do it ? -- I Know it is openoffice who crash, not macro.-- )
i had modified the memory settings in OOo, with maximum i can, but enough changes)
(I make a diff bash script to read what files has not been convert)

i make other script to rename pps in ppt before macro launch. But may it is possible to 'take' pps too, directly by macro ?

Thanks for your help.
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Mon May 02, 2005 9:18 am    Post subject: Reply with quote

What document type (source) are you trying to convert into what (target)?

Meanwhile, here are a number of past examples of simpler macros....

http://www.oooforum.org/forum/viewtopic.php?t=12922
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
akabuba
General User
General User


Joined: 12 Apr 2005
Posts: 8

PostPosted: Wed May 04, 2005 4:25 am    Post subject: Reply with quote

hi guru

-> I need ppt+pps input and pdf ouput.
on a OOo 1.1.3





another thing : i can t launch any macro with the v2.0 of OOo.
(try this because v2 work better with recent pps files, no ?)
install is ok. rights on /opt are ok, securities macro settings are ok.
any idea on that ?

thanks
regards
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed May 04, 2005 10:27 am    Post subject: Reply with quote

Code:
Sub Main
   ConvertPPTtoPDF( "c:\documents and settings\dbrewer\desktop\test.ppt" )
End Sub

Sub ConvertPPTtoPDF( cFile )
   cURL = ConvertToURL( cFile )
   
   ' Open the document.
   ' Just blindly assume that the document is of a type that OOo will
   '  correctly recognize and open -- without specifying an import filter.
   oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, Array(_
            MakePropertyValue( "Hidden", True ),_
            ) )



   cFile = Left( cFile, Len( cFile ) - 4 ) + ".pdf"
   cURL = ConvertToURL( cFile )
   
   ' Save the document using a filter.   
   oDoc.storeToURL( cURL, Array(_
            MakePropertyValue( "URL", cURL ),_
            MakePropertyValue( "FilterName", "impress_pdf_Export" ),_
            )
   
   oDoc.close( True )
End Sub


Function MakePropertyValue( Optional cName As String, Optional uValue ) As com.sun.star.beans.PropertyValue
   Dim oPropertyValue As New com.sun.star.beans.PropertyValue
   If Not IsMissing( cName ) Then
      oPropertyValue.Name = cName
   EndIf
   If Not IsMissing( uValue ) Then
      oPropertyValue.Value = uValue
   EndIf
   MakePropertyValue() = oPropertyValue
End Function



Here is a list of other conversion examples.

Current list of past examples.
http://www.oooforum.org/forum/viewtopic.php?t=12922
_________________
Want to make OOo Drawings like the colored flower design to the left?
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