Scan to Print

Hi,

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>

http://www.samsung.com/us/support/howtoguide/N0000191/9504/120232/SL-M2875FW/XAA

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.”:

http://www.xeroxscanners.com/en/us/products/item.asp?PN=DM3920

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

http://scanners.fcpa.fujitsu.com/scansnap11/compare_s1300i.html

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:
Calibri;mso-fareast-theme-font:minor-latin;color:#1F497D;mso-ansi-language:
EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>http://www.dickinson.edu/download/downloads/id/2652/printer_toshiba_scan_pdf


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,
JP.

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,
JP.

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();

wLic.setLicense("Aspose.Total.Java.lic");

// 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);

cloneSection.getPageSetup().setSectionStart(SectionStart.NEW_PAGE);

doc.appendChild(cloneSection);

// 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");

System.out.println("Done");

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

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

{

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

builder.moveToSection(section.getDocument().indexOf(section));

builder.moveToHeaderFooter(footerType);

// 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")));

builder.writeln();

builder.write("1234567890");

builder.insertField("PAGE");

// 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(ControlChar.TAB);

builder.insertField("PAGE");

builder.write(" of ");

builder.insertField("NUMPAGES");

}

Best Regards,