I am trying to add data matrix on PDF where I have documents that can have multiple pages in such case I want data matrix on first page of that document only.
Also data matrix should only be on the front page of the document.
Hello @djinkal,
Do you still have all this? If yes, then you can simply add the barcode to the first page by adding it to the first page (of one) of the print section(s) of your template.
Tip: See the walkthrough Adding a barcode for more information about adding a barcode element.
Hello @Marten ,
This one is done differently than my previous post. I was able to do it that way. But as I am trying to optimize my process, I got to know that this is done in Connect designer itself by just adding proper output preset settings.
In the given image I have shown the settings I am doing. I just want to know, what condition I need to add so that I can get the datamatrix barcode on first page of each document for that job?
Changing the condition from page.nr % 2 == 1
to page.nr === 1
should add the barcode element to the first page in the document only.
Hello @Marten ,
This solution worked for me. Thank you so much.
Hello Marten,
I have another question regarding same context.
I have further parameters in my datamatrix. One of the parameters has the logic like if sheet.nr and document.count.sheet has same value then this parameter will hold 1 as value otherwise it would be 0. How can I set this up ?
When you would like to compare the values of sheet.nr and document.count.sheets with each other then you could apply something like:
${sheet.nr === document.count.sheets ? 1 : 0}
Hello Marten,
Thank you for this solution. it is working. I have another parameter for which I need to check above condition as well as check the Flag is 1 for such record then the value should be 3 rather than 0/1.
Ex:
Parameter A for which I need to assign value.
I have applied above condition now I want to check the ‘Flag’ is 1 or not and if it is 1 then the value of A should be 3.
I would really appreciate if you can help me this.
Thank you in advance.
Can you let us know please what ‘Flag’ is? Is it a record field, for example?
Yes you can consider it as the record field.
This shouldn’t be that difficult. Just make sure that the option Include meta data is checked and that the field Flag is added to the list of Document Tags on the Meta Data Options page of your job preset. Then you can simply insert the below in the Text textarea/input field of the Additional Barcode window of your output preset:
Caution: Please make sure that you test all these suggestions throughoutly as I haven’t tested them myself.
${(document.metadata.Flag === 1 ? 3 : (sheet.nr === document.count.sheets ? 1 : 0))}
Thank you for your response. I will try this and let you know the outcome.
Hii,
This solution worked well for me. I am facing issue where I am combining the pages on basis of name and address, they all should belong to same document set, there can be multiple page related to same piece.
when I am assigning ${document.nr,00} ${document.count.sheets,00}
it does not recognize all sheets of same group.
when I use sheet.nr instead of document.nr , it works for multipage document, but it does not work for same grouped document, it impacts my other parameters as well.
Please help me with this.
Hello Marten,
The solution was working in normal scenario. But now I have document set involved. so instead of document total sheet and sequence sheet, I need to compare document set total sheet and document set sequence page. Also the Flag is here. So if the flag is 1 and document set sequence count is equal to total sheet in that document set(as in the last page of that document set) then the value should be 3 otherwise it should be 1 or 0 depending on sheet sequence number if flag is 0.
That should not be that difficult either. Please take a look at the list of variables available in the output and check which variables you can use for that. I suppose that it will look something similar to the below in the end:
shouldn’t it be something like this:
${(document.metadata.change_flag ==1 ? 3 : (sheet.sequence.set === set.count.sheets ? 1 : 0))}
as I am using document set to group the documents?