We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

QR-code in footer

I need to generate unique QR-code in footer of Page: “Number of Page of Number of page”.
Template of document has 3 pages, output-document has 2 pages.
In footer i use:
page {PAGE} of {NUMPAGES}

In output-document in QR-code there is “1 of 3” on all 2 pages.
So there are incorrect number of page and quantity of pages.

I have seen that same problem was fixed in version Aspose.Words for .NET 17.6 (https://docs.aspose.com/display/wordsnet/Aspose.Words+for+.NET+17.6+Release+Notes
I’m using version 18.4 but the problem is reproduced.
Can you help me?


Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output document that shows the undesired behavior.
  • Please attach the expected output document that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Files are uploaded
java.zip (182.6 KB)


Thanks for sharing the detail. Please note that Aspose.Words mimics the behavior of MS Word. If you insert an image (barcode) in the footer of document using MS Word and convert it to PDF, you will get the same output.

In your case, we suggest you following solution.

  • Convert the Word document to PDF using Aspose.Words.
  • Generate the barcode image for each page using Aspose.BarCode.
  • Insert the barcode image at your desired location of PDF using Aspose.PDF.

Hope this helps you.

thanks for your answer.
I’ll try discribed solutions.