Page 1 of 1

pdf output with dynamic filename

Posted: Thu Dec 11, 2014 6:02 pm
by Patrik
Hi,

my current pdf transformation uses simply "${cfn}.pdf" as configured output file. However, I'd like to add the document version (coming from a specific element inside the document) to the filename. And for my diff it should be something like "${BookName}-Diff-v${NewerVersion}-to-${OlderVersion}.pdf".

I already implemented this for my pure xml transformation where I can use xsl:result-document and calculate the value fo @href inside the xslt. Is there any way to do the same when using the (apache-)fop?

Thanks and regards,

Patrik

Re: pdf output with dynamic filename

Posted: Fri Dec 12, 2014 10:56 am
by Radu
Hi Patrik,

Funny thing, there is somebody else on this forum with the user name patrick who had the same problem about a couple of weeks ago and he solved it using the xpath_eval editor variable:

http://www.oxygenxml.com/doc/ug-oxygen/ ... ables.html

which we added in Oxygen 16.0.

The forum thread is here:

http://www.oxygenxml.com/forum/topic11084.html

So initially I thought that you were asking again for an answer to the same problem.

Regards,
Radu

Re: pdf output with dynamic filename

Posted: Fri Dec 12, 2014 2:26 pm
by Patrik
Hi Radu,

thanks for the hint. But the xpath-expression would be quite complex and programming inside a single line edit field is not really confortable.

Now I use xproc including an additional xslt to calculate the filename and this works as well and feels easier to maintain.

Regards,

Patrik

Re: pdf output with dynamic filename

Posted: Fri Dec 12, 2014 3:04 pm
by Radu
Hi Patrik,

Yes, XProc is also an option. Or you can write an ANT build file with multiple stages and create a transformation scenario for it.

Regards,
Radu