PopUp while converting document to PDF/A

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
nihu
Posts: 2
Joined: Wed Feb 11, 2009 12:10 pm

PopUp while converting document to PDF/A

Post by nihu »

Hello

I have a problem by exporting a pdf/a using the OpenOffice API calling ole-automation over LotusScript (VB-Like language in Lotus Notes). If a document contains an image with transparency, a popup appears, even though executing OpenOffice in hidden mode! How can I disable that behaviour?


At the moment, I istantiate the OO-objects and open the OO-document as follows:

Code: Select all


Dim vServiceManager As Variant
Dim vCoreReflection As Variant
Dim vDesktop As Variant
Dim vDispatcher As Variant
Dim vDocument As Variant

Set vServiceManager = CreateObject("com.sun.star.ServiceManager")
Set vCoreReflection = vServiceManager.createInstance("com.sun.star.reflection.CoreReflection")	
Set vDesktop = vServiceManager.createInstance("com.sun.star.frame.Desktop")
Set vDispatcher = vServiceManager.createInstance("com.sun.star.frame.DispatchHelper")

...

Function openDocumentFromURL(sURL As String, bAsTemplate As Boolean, bHidden As Boolean)

	Dim sURLToOpen As String
	Dim vOpenPar(3) As Variant

	sURLToOpen = fileName2URL(sURL, False)

	Set vOpenPar(0) = makePropertyValue("AsTemplate", bAsTemplate)
	Set vOpenPar(1) = makePropertyValue("Author", CommonUserName)
	Set vOpenPar(2) = makePropertyValue("URL", sURLToOpen)
	Set vOpenPar(3) = makePropertyValue("Hidden", bHidden)

	Set vDocument = vDesktop.loadComponentFromURL(sURLToOpen, "_blank", 0, vOpenPar)

End Function

This program should run on a server, too. So it's important, that running this code without this warningbox, wether the document contains a transparent object. Otherwise the program whould be interrupted.

Here a related topic in an other forum http://www.oooforum.org/forum/viewtopic.phtml?t=79678


Thanks in advance.
nihu
OOo 3.0.X on Ms Windows XP + Linux
nihu
Posts: 2
Joined: Wed Feb 11, 2009 12:10 pm

Re: PopUp while converting document to PDF/A

Post by nihu »

OOo 3.0.X on Ms Windows XP + Linux
Post Reply