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

Free Support Forum - aspose.com

Scan to Print


I really enjoy aspose words, cells and barcode. Now, I intend to use all of them with scanning.

A number of printers have a scan to print feature:

Samsung sends 1
pdf file with multiple pages:<o:p></o:p>


Xerox isn’t very clear about but I suspect that it’s one pdf file with multiple pages:

http://www.support.xerox.com/support/workcentre-3225/support/enus.html (see file format).

This other Xerox printer states “With an Auto Document Feeder (ADF), the DocuMate 3920 allows a 50-page document stack to be continuously scanned and transmitted at one time in reliable quality to increase your efficiency.”:


Some Fujitsu models with ADF seem to support multiple page scanning:


It seems that Toshiba also supports multiple pages in one PDF:

<span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;mso-fareast-font-family:

I intend to print documents with aspose barcodes on it. Do you know how to add one bar code per page in aspose words with reference number and page number?

Has any of your existing clients asked for a method so documents could be printed with bar codes (one bar code per page with document reference number), be scanned with a modern scanner with “scan to email” feature and then be added back to a document repository? If yes, what is the path that you propose?

I have already java code to print bar codes and to decode bar codes from pdfs. But I don’t know how to print a document with one bar code per page including page number.

I have the same problem with excel files: how to include one bar code per printed excel file page.

I hope I’m not flooding you too much with my questions.

Long and Prosper Life,

Hi JP,

Can you please share if you want to print same barcode image on all pages or print a different barcode on each page?

Best Regards,

Hi Muhammad,

I intend to print one bar code per page as I intent to include the page number in the bar code.

Kind regards,

Hi JP.,

We are working on the code examples and will update you soon. Sorry for the inconvenience.

Best Regards,

Hi JP.

You can use the following Java code to insert a different barcode on each page. In this code, I have inserted the same barcode on each page but you can provide a different barcode based on the pageId in the InsertBarcodeIntoFooter method.

public static void main(String[] args) {

try {

<?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" />

com.aspose.words.License wLic = new com.aspose.words.License();


// Create a blank documenet.

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

// The number of pages the document should have.

int numPages = 4;

// The document starts with one section, insert the barcode into this existing section.

InsertBarcodeIntoFooter(builder, doc.getFirstSection(), 1, HeaderFooterType.FOOTER_PRIMARY);

int i = 1;

while (i < numPages)


// Clone the first section and add it into the end of the document.

Section cloneSection = (Section)doc.getFirstSection().deepClone(false);



// Insert the barcode and other information into the footer of the section.

InsertBarcodeIntoFooter(builder, cloneSection, i, HeaderFooterType.FOOTER_PRIMARY);

i += 1;


// Save the document as a PDF to disk. You can also save this directly to a stream.

doc.save("Document out.docx");


} catch (Exception e) {

// TODO Auto-generated catch block




private static void InsertBarcodeIntoFooter(DocumentBuilder builder, Section section, int pageId, int footerType) throws Exception


// Move to the footer type in the specific section.



// Insert the barcode, then move to the next line and insert the ID along with the page number.

// Use pageId if you need to insert a different barcode on each page. 0 = First page, 1 = Second page etc.

builder.insertImage(ImageIO.read(new File("C:\\Barcode1.png")));




// Create a right aligned tab at the right margin.

double tabPos = section.getPageSetup().getPageWidth() - section.getPageSetup().getRightMargin() - section.getPageSetup().getLeftMargin();

builder.getCurrentParagraph().getParagraphFormat().getTabStops().add(new TabStop(tabPos, TabAlignment.RIGHT, TabLeader.NONE));

// Move to the right hand side of the page and insert the page and page total.



builder.write(" of ");



Best Regards,