![]() |
Applying overlay to even/odd pages in a document |
Post Reply
|
| Author | |
mattucg
Newbie
Joined: 28 Sep 2010 Posts: 32 |
Post Options
Quote Reply
Topic: Applying overlay to even/odd pages in a documentPosted: 09 Sep 2011 at 2:59pm |
|
I have several documents in DAL job, and I would like to apply an overlay to each document separately. Each document has two different overlays. One for odd pages and one for even pages. I am able to do this with if I use even/odd rule and exclude every other doc, but with many documents, the exclude list gets too long. I tried using 'include' instead, but the overlay is then applied to all even pages as well as the desired doc. Here is an example DAL (with only two docs) that is not working:
<xfj:job xmlns:xfj="http://www.ecrion.com/xfj/1.0"> <xfj:output mime-type="application/pdf"/> <xfj:overlay id="overlay1" z-index="1"> <xfj:apply-rules> <xfj:match rule="include(Doc1)" /> <xfj:match rule="even" /> </xfj:apply-rules> <xfj:external-content src="url(C:\FO\Doc1even.fo)" /> </xfj:overlay> <xfj:overlay id="overlay2" z-index="1"> <xfj:apply-rules> <xfj:match rule="include(Doc1)" /> <xfj:match rule="odd" /> </xfj:apply-rules> <xfj:external-content src="url(C:\FO\Doc1odd.fo)" /> </xfj:overlay> <xfj:document id="Doc1"> <xfj:external-content src="url(C:\PDF\Doc1.pdf)" /> </xfj:document> <xfj:document id="Doc2"> <xfj:external-content src="url(C:\PDF\Doc2.pdf)" /> </xfj:document> </xfj:job> Edited by mattucg - 09 Sep 2011 at 3:00pm |
|
![]() |
|
radup
Admin Group
Adminstrator Joined: 19 May 2008 Posts: 83 |
Post Options
Quote Reply
Posted: 12 Sep 2011 at 10:13am |
|
Hi mattucg, You can use odd(DocumentID) and even(DocumentID) functions in match rule. More information about xfj:match is available here: http://www.ecrion.com/Products/XFRenderingServer/XFUltrascaleHelp/xfjmatch.htm When trying to satisfy the match condition, the server tries every one, in order, until one is satisfied. If no one is satisfied, then the overlay is not applied. To obtain the functionality required you need to use the following syntax:
Edited by radup - 12 Sep 2011 at 10:15am |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |