Re: Printing barcode labels from CF
Followup, here's what I used to print to an HP m251w. Works great printing to Avery 5520 3x10 labels. Set margin to 0 when printing from within Chrome: [redacted] http://barcode-coder.com/js/jquery-1.3.2.min.js";> http://barcode-coder.com/js/jquery-ui-1.7.custom.min.js";> http://barcode-coder.com/js/jquery-barcode-last.min.js";> function bc() {$('##bcTarget#getRecord.memberID#').barcode('#getRecord.memberID#', 'code128', {barHeight:50, barWidth:1, showHRI:true, fontSize: 11}); } @media print { div.row {page-break-after: auto;} div.spacer {height: 90px;} } body {text-align: center; font-family: arial; font-size: 11px; margin-left: 0px; margin-right: 0px; margin-top: 45px; margin-bottom: 48px;} div.spacer {height: 90px; clear: both; border: 0px solid blue;} div.row {margin: 0px; padding: 0px; page-break-after: auto;} div.label {width: 232px; height: 83px; margin-left: 13px; border: 1px solid white; float: left; padding-top: 5px;} #getrecord.memberfirstname# #getrecord.memberLastName# #getrecord.memberNameSuffix# (DOB: #dateFormat(getRecord.memberDOB, "MM/DD/")#) On Tue, Mar 25, 2014 at 7:48 PM, Pete Ruckelshaus wrote: > Thanks. I think I'm going to try using CSS and print as an HTML file > first, and if I run into issues, I'll go with cfdocument. > > > On Tue, Mar 25, 2014 at 3:35 PM, Akos Fortagh wrote: > >> >> Sorry if I misunderstand the issue. I've used cfbarbecue >> http://cfbarbecue.riaforge.org/ in a number of apps with no problems. >> It simply uses to print the barcode to the screen. I opened >> that document in a small window and sent it to label printer using JS >> window.print(). >> Then using any label printer I have been able to print the barcode >> perfectly. >> HTH >> >> ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358680 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Printing barcode labels from CF
Thanks. I think I'm going to try using CSS and print as an HTML file first, and if I run into issues, I'll go with cfdocument. On Tue, Mar 25, 2014 at 3:35 PM, Akos Fortagh wrote: > > Sorry if I misunderstand the issue. I've used cfbarbecue > http://cfbarbecue.riaforge.org/ in a number of apps with no problems. > It simply uses to print the barcode to the screen. I opened that > document in a small window and sent it to label printer using JS > window.print(). > Then using any label printer I have been able to print the barcode > perfectly. > HTH > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358082 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Printing barcode labels from CF
Sorry if I misunderstand the issue. I've used cfbarbecue http://cfbarbecue.riaforge.org/ in a number of apps with no problems. It simply uses to print the barcode to the screen. I opened that document in a small window and sent it to label printer using JS window.print(). Then using any label printer I have been able to print the barcode perfectly. HTH ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358080 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Printing barcode labels from CF
Yay! I'm useful for something. I have much experience with barcodes printing. Part of the system I work on includes creating barcodes for E-Tickets to be used for admission to amusement parks. A couple resources for you to use: http://cfbarbecue.riaforge.org/. It's a CF wrapper to a Java library that can create images of barcodes. Once you install it into your CF server (copy some files to a directory, restart CF), you can call the component to create a CFIMAGE and it will spit out a PNG or JPG or what ever other format it supported. If you're planning on creating a PDF, a couple things you'll have to remember: CFIMAGE and CFDOCUMENT uses an HTTP call to generate those files (or something like that). You'll have to either A) edit your host files to accept your domain B) reference the image using "file:\\\". http://www.ravenglass.com/blog/index.cfm/2010/6/9/Including-Images-in-a-PDF-created-in-CFDOCUMENT & http://stackoverflow.com/questions/10637542/coldfusion-cfdocument-creates-a-red-x It isn't as complicated as it sounds, just a couple gotcha's you have to be prepared for. Hope that helps. >I'm building a membership system where I will need to print barcode labels >(Code128) from a CF app. I've got the barcode creation down (using a >JQuery plugin), but haven't started the label creation piece. I was >thinking of using CSS + cfdocument, but am concerned that PDF's crappy >support of CSS will cause me trouble. Has anyone else done something like >this? What do I need to look out for? > >Thanks > >Pete ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358079 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Printing barcode labels from CF
A number of years ago I accomplished a similar need through the utilization of a client side print ocx which allowed the user to select a printer to be used for label printing. Once they selected the printer, I was able to manipulate the required settings and query paper size information that I would pass back to my label designer and return the HTML that I would then send to the printer. It worked beautifully and the clients loved it. I do not remember the name of the control, but it was a commercial ocx. Our clients did a lot of label printing so installing the ocx was not an issue for them. I do not know how if you are intending for the client to print barcodes or not, but if this will be an administrative function it might be something to consider. David Phelan Web Developer IT Security & Web Technologies Emerging Health Montefiore Information Technology 3 Odell Plaza, Yonkers, NY 10701 914-457-6465 Office dphe...@emerginghealthit.com www.emerginghealthit.com www.montefiore.org From: Pete Ruckelshaus Sent: Tuesday, March 25, 2014 10:23 AM To: cf-talk Subject: Printing barcode labels from CF I'm building a membership system where I will need to print barcode labels (Code128) from a CF app. I've got the barcode creation down (using a JQuery plugin), but haven't started the label creation piece. I was thinking of using CSS + cfdocument, but am concerned that PDF's crappy support of CSS will cause me trouble. Has anyone else done something like this? What do I need to look out for? Thanks Pete ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358078 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm