Barcode based on current page number and total amount of pages


I have a problem that sounds simular to but is a bit different.

My document includes a barcode (not a Jaspersoft barcode but a custom font that results in a barcode), a part of the barcode is based on the following rules:

  • Firstpage and not the only page in the document = "01"
  • Firstpage that is also the last page in the document = "11"
  • Lastpage = "10"
  • Page in the middle of the document = "00"

As you can see based on the rules I need to know the current page and the totalpage count (in order to determine if we are working on the lastpage or not) both on the same time. The extra difficulty is that I don't insert the text 01, 11, 10 or 00 directly, I call a java function that will provide a special character based on the above values. For example the value 00 = "!" and that string printed as that font results on a barcode with the '00' value below it, because there are 99 possible characters that can be used inside that font I created the java function.

Therefor I'm looking for a way to provide the current page number and the total amount of pages (or a boolean value saying lastpage true/false) into a custom function.

Could somebody help me with this problem?



wub66's picture
Joined: Dec 12 2014 - 7:01am
Last seen: 6 years 8 months ago


We are facing the same problem ? Did you find a solution ?

Thanks in advance.

davide.mezzi - 2 years 10 months ago

0 Answers:

No answers yet