Custom document properties in exported pdf

Stimulsoft Reports.WEB discussion
Post Reply
Gandalf
Posts: 2
Joined: Fri Nov 21, 2014 9:29 am

Custom document properties in exported pdf

Post by Gandalf »

hi, is it possible to add custom document properties while exporting to pdf?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Custom document properties in exported pdf

Post by HighAley »

Hello.

To set PDF file properties you could use next report properties:

Code: Select all

Title - Report Name
Author - Report Author
Subject - Report Alias
Also you could set next properties for all exported PDF files

Code: Select all

Stimulsoft.Report.StiOptions.Export.Pdf.CreatorString
Stimulsoft.Report.StiOptions.Export.Pdf.KeywordsString
or use StiPdfExportSettings to set these properties for each report:

Code: Select all

Stimulsoft.Report.Export.StiPdfExportSettings.CreatorString
Stimulsoft.Report.Export.StiPdfExportSettings.KeywordsString
Thank you.
Gandalf
Posts: 2
Joined: Fri Nov 21, 2014 9:29 am

Re: Custom document properties in exported pdf

Post by Gandalf »

actually i was thinking about these props http://helpx.adobe.com/acrobat/using/pd ... properties. having such possibility would be great. thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Custom document properties in exported pdf

Post by HighAley »

Hello.

Unfortunately, it's impossible.
Please, send a request to support@stimulsoft.com.
After analyzing of our request we will write you if it's possible to implement.

Thank you.
lindsay
Posts: 4
Joined: Wed Aug 26, 2015 9:38 am

Re: Custom document properties in exported pdf

Post by lindsay »

Hi,

I believe this functionality has been added in Reports.Ultimate 2015.1: http://www.stimulsoft.com/en/changes/reports-ultimate
"Export to PDF. Now you can add custom properties."

Can you please supply some sample code to show how to add custom properties when you export to pdf? I can't find any documentation for this new feature and after downloading 2015.1.18 (pre-release) I couldn't figure it out either.

Many thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Custom document properties in exported pdf

Post by HighAley »

Hello.

You should use MetaTags of the report. The name of the tag should start from "pdf:".
Next code shows how to add Meta Tags:

Code: Select all

            report.MetaTags.Add(new StiMetaTag("pdf:Name1", "Value1"));
            report.MetaTags.Add(new StiMetaTag("pdf:Name2", "Test"));
Thank you.
lindsay
Posts: 4
Joined: Wed Aug 26, 2015 9:38 am

Re: Custom document properties in exported pdf

Post by lindsay »

Great, this seems to work ;)
I'm sure it would be useful to others if you guys added this to your documentation somewhere.

Thanks very much!
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Custom document properties in exported pdf

Post by Andrew »

Sure, we will definitely add this to our documentation.

Thank you.
Post Reply