Solved

pdf417 tag for coldfusion

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Build and evolve an interactive experience 1 99
AWS New EC2 Instance and EBS Storage 2 93
.dwt files not viewable in browser - why? 2 117
Nameserver and MX Record 2 80
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
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 Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

679 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