Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

pdf417 tag for coldfusion

Posted on 2006-07-11
2
Medium Priority
?
496 Views
Last Modified: 2013-12-24
I am in need of a pdf417 (2d barcode) image generator.  It can't be an activex control.

Any suggestions?
0
Comment
Question by:polobruce
2 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 17083831
not tried it but it's java based...

http://www.idautomation.com/java/

(not free unfortunately)
0
 
LVL 12

Accepted Solution

by:
mmc98dl1 earned 1000 total points
ID: 17086594
http://www.fusionzone.com/applications/barcode/index.cfm

http://barbecue.sourceforge.net/ - free java based barcode genrator - very  good and pretty easy to use.

Here is some sample text that is used to generate barcode in the iText format (already in CF7 as the reportgenerator requires it):

<cfparam name="fileName" type="string" default="/tmp/pdf_#createUUID()#.pdf">
<cfparam name="barcode" type="string" default="0000154000607064">
<cfparam name="invbarcode" type="string" default="OESALES1000001157">
<CFSCRIPT>
      pageSize = createObject("java", "com.lowagie.text.PageSize").init();
    document = createObject("java", "com.lowagie.text.Document").init(pageSize.LETTER, 36, 36, 36, 36);
    pdfFile = createObject("java", "java.io.FileOutputStream").init(fileName);
    writer = createObject("java", "com.lowagie.text.pdf.PdfWriter").getInstance(document, pdfFile);
      FontFactory = createObject("java", "com.lowagie.text.FontFactory");
      
      barcode = ucase(barcode);
      
      document.open();
      
      cb = createObject("java", "com.lowagie.text.pdf.PdfContentByte");
      cb = writer.getDirectContent();
      
      code128 = createObject("java", "com.lowagie.text.pdf.Barcode128");
    code128.setCode("#invbarcode#");
    code128.setStartStopText(false);
      
      Color = createObject("java", "java.awt.Color");
    image128 = createObject("java", "com.lowagie.text.Image");
      image128 = code128.createImageWithBarcode(cb, Color.black, Color.black);
      
      rectangle = createObject("java", "com.lowagie.text.Rectangle").init(code128.getBarcodeSize());
      bar128X = rectangle.width();
      
      rectangle = pageSize.LETTER;
      letterX = rectangle.width();
      
      loc = (letterX - (bar128X + 75));
      
      p1 = createObject("java", "com.lowagie.text.Paragraph").init("");
      p1.add(createObject("java", "com.lowagie.text.Phrase").init(createObject("java","com.lowagie.text.Chunk").init(image128, loc, 0)));
      document.add(p1);
      
      document.add(createObject("java", "com.lowagie.text.Paragraph").init("* I N V O I C E *", FontFactory.getFont(FontFactory.HELVETICA_BOLD, javacast("float", 28.0) )));
      document.add(createObject("java", "com.lowagie.text.Paragraph").init(" "));
      
      document.close();
</cfscript>
<CFCONTENT TYPE="application/pdf" FILE="#fileName#" DELETEFILE="yes">

That should be more than enough for you to get on with.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
What You Need to Know when Searching for a Webhost Provider
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question