Solved

pdf417 tag for coldfusion

Posted on 2006-07-11
2
456 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 250 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internal DNS Zone Issue 13 80
LAMP problem identifier tool ? 9 123
JVM encoding. How to change encoding. 27 113
Point a domain to a 4rd party web host without changing nameservers 2 41
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. 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 :…
The purpose of this video is to demonstrate how to Import and export files in WordPress. 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 : Click on Too…

837 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