[Solved] How to sign a document via UNO
[Solved] How to sign a document via UNO
How to sign a document via UNO ??
Last edited by alex_lip on Fri Aug 08, 2014 8:35 am, edited 1 time in total.
OpenOffice 3.4 on Windows XP
Re: How to sign a document via UNO
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: How to sign a document via UNO
If you call methods from com.sun.star.security.XDocumentDigitalSignatures to sign to some document, Digital Sign dialog is opened. So it seems no way to do it without GUI.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: How to sign a document via UNO
Not work (( Error in last row.
Code: Select all
sub sign_doc
sFileURL = "c:\0_foxpro_oo\test.odt"
sf = CreateUnoService("com.sun.star.embed.StorageFactory")
oDocStorage = sf.createInstanceWithArguments(Array(sFileURL, 4))
oDDS = CreateUnoServiceWithArguments("com.sun.star.security.DocumentDigitalSignatures", _
Array("1.2", True))
oDDS.signDocumentContent(oDocStorage, Null)
end sub
OpenOffice 3.4 on Windows XP
Re: How to sign a document via UNO
Work only with property ((((
Code: Select all
sub sign_doc
sFileURL = "c:\0_foxpro_oo\test.odt"
Dim aProps(0) as new com.sun.star.beans.PropertyValue
aProps(0).Name = "StorageFormat"
aProps(0).Value = "ZipFormat"
sf = CreateUnoService("com.sun.star.embed.StorageFactory")
oDocStorage = sf.createInstanceWithArguments(Array(sFileURL, 4, aProps))
oDDS = CreateUnoServiceWithArguments("com.sun.star.security.DocumentDigitalSignatures", _
Array("1.2", True))
oDDS.signDocumentContent(oDocStorage, Null)
end sub
OpenOffice 3.4 on Windows XP