Set default file name when exporting from Preview to PDF

I’m using LL 27 and VCL component in C++Builder. When I preview a report and choose Export in the Ribbon export to PDF, the suggested file name is always Preview.pdf. I have tried different parameters with no success (LlXSetParameter.PDF.Export.File, LlSetOptionString(LL_OPTIONSTR_SAVEAS_PATH,…)
Any help, please?
Thank you very much in advance.

Hi Edorta, this should help:

Automatic Storage of Form Data

tldr: you need to set

LlPrintSetProjectParameter(hJob,"SaveAs.Format","PDF",
       LL_PARAMETERFLAG_VALUE);
LlPrintSetProjectParameter(hJob,"SaveAs.Filename","...",
       LL_PARAMETERFLAG_VALUE);

If you work with databinding, you need to do this in the OnDefinePrintOptions event. Otherwise, make sure to call these APIs after starting the print job with LlPrint(WithBox)Start.

Thank you very much and have a nice weekend.

1 Like