Set Subject and Producer of a PDF-File

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
VBandOoffice
Posts: 33
Joined: Tue Jul 31, 2018 10:11 am

Set Subject and Producer of a PDF-File

Post by VBandOoffice »

Hi all,
I'm generating PDF-Files automatically from LibreOffice-Calc.
In the past, their are only some asian style characters mentioned at producer. Now, I get "LibreOffice 6.2".

I want to set Subject and Producer in my macro, while generating the PDF-File.
Does anyone know how to do it?

Thanks in advance!
VBandOoffice
LibreOffice 7.5, Windows 10, VB.net 2019, C#
VBandOoffice
Posts: 33
Joined: Tue Jul 31, 2018 10:11 am

Re: Set Subject and Producer of a PDF-File

Post by VBandOoffice »

Hi,
Subject, I found by myself, but Producer is not a property of DocumentProperties:

oDoc.DocumentProperties.Author=sAuthor
oDoc.DocumentProperties.Title=sTitle
oDoc.DocumentProperties.Subject=sTyp
oDoc.DocumentProperties.Description=sDescription
oDoc.DocumentProperties.Keywords=sKeywords()
REM oDoc.DocumentProperties.Producer="XXX GmbH"

Regards,
VBandOoffice
LibreOffice 7.5, Windows 10, VB.net 2019, C#
JeJe
Volunteer
Posts: 2780
Joined: Wed Mar 09, 2016 2:40 pm

Re: Set Subject and Producer of a PDF-File

Post by JeJe »

"LibreOffice 6.2" is what you should get for Producer when that is what is producing the document... if something else produced it that name would be in that field.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Set Subject and Producer of a PDF-File

Post by Zizi64 »

Please, download, install and use an object inspection tool, like the MRI or XrayTool.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply