pdf output with dynamic filename

Post here questions and problems related to oXygen frameworks/document types.
Patrik
Posts: 228
Location: Hamburg/Germany

pdf output with dynamic filename

Thu Dec 11, 2014 6:02 pm

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
Radu
Posts: 5760

Re: pdf output with dynamic filename

Fri Dec 12, 2014 10:56 am

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/#topics/editor-variables.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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Patrik
Posts: 228
Location: Hamburg/Germany

Re: pdf output with dynamic filename

Fri Dec 12, 2014 2:26 pm

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
Radu
Posts: 5760

Re: pdf output with dynamic filename

Fri Dec 12, 2014 3:04 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests