Forum How do I...?

Attach file in cmd line

redrising
Hello,
How do i attach a file with a certain name with the cmd line ?
Thank you.
mikeday
You can attach a file to the PDF with the --attach command-line option.
redrising
I want to attach with a certain name like in JS
PDF.attachFile("data.xls", "Latest sales figures.");

is it possible to do it with the -attach command-line option like
--attach="data.xls, name" ?


mikeday
Unfortunately the attachment description cannot be specified on the command-line at this time. It can be specified via the JSON job format used with the Prince control interface, so the Java and C# wrappers can do this. If we added an option for taking job description files on the command-line then that might be a convenient solution.
mikeday
In the latest build we have added a --job option that allows providing a JSON job format file that can include attachment descriptions.