Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 286E8200BF7 for ; Mon, 9 Jan 2017 23:28:36 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 271DC160B3E; Mon, 9 Jan 2017 22:28:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 70D17160B2F for ; Mon, 9 Jan 2017 23:28:35 +0100 (CET) Received: (qmail 14025 invoked by uid 500); 9 Jan 2017 22:28:34 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 14014 invoked by uid 99); 9 Jan 2017 22:28:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2017 22:28:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E0903C028C for ; Mon, 9 Jan 2017 22:28:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.219 X-Spam-Level: X-Spam-Status: No, score=-1.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 88zB-2fek6VS for ; Mon, 9 Jan 2017 22:28:30 +0000 (UTC) Received: from mailout09.t-online.de (mailout09.t-online.de [194.25.134.84]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C809D5F1BA for ; Mon, 9 Jan 2017 22:28:29 +0000 (UTC) Received: from fwd17.aul.t-online.de (fwd17.aul.t-online.de [172.20.27.64]) by mailout09.t-online.de (Postfix) with SMTP id 45E204234A5E for ; Mon, 9 Jan 2017 23:28:28 +0100 (CET) Received: from [192.168.2.105] (TnhWdqZF8hUJ0tadI5Nx5YujpEP6g2bKk0VMGcM03R-vRSVid-dzWMKUSUJ0cSxQUt@[217.231.138.165]) by fwd17.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1cQiQV-1oHB5c0; Mon, 9 Jan 2017 23:28:27 +0100 Subject: Re: Regarding Barcode Font To: users@pdfbox.apache.org References: <14dc5d84-0019-41a3-d217-cafc06186f8b@t-online.de> <397612867.83076.1483960846769@com4.strato.de> From: Tilman Hausherr Message-ID: Date: Mon, 9 Jan 2017 23:29:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-ID: TnhWdqZF8hUJ0tadI5Nx5YujpEP6g2bKk0VMGcM03R-vRSVid-dzWMKUSUJ0cSxQUt X-TOI-MSGID: 4468d7db-97ee-4fd0-8669-f5c2ebe24bf8 archived-at: Mon, 09 Jan 2017 22:28:36 -0000 If you want something quick then use the font solution (check the license). Technically, fonts are vector graphics. If you have used PDFBox before to create PDFs, then you can do this in an hour. Tilman Am 09.01.2017 um 22:46 schrieb Shivangi Singal: > Hi Andreas , > > Yes I did give barcode4j a try but it gives barcode as an image which is then placed onto pdf and then when printed might lose the graphics after so much re-rendering. > > I was trying to figure out a way if I achieve the same without adding barcode as an image. > > Thanks, > Shivangi > > -----Original Message----- > From: Andreas Lehmkühler [mailto:andreas@lehmi.de] > Sent: Monday, 9 January 2017 10:21 PM > To: users@pdfbox.apache.org > Subject: Re: Regarding Barcode Font > > >> Tilman Hausherr hat am 9. Januar 2017 um 08:11 geschrieben: >> >> >> Am 09.01.2017 um 08:02 schrieb Shivangi Singal: >>> Thank you Tilman for the options. >>> >>> Where I can find more info about implementing barcode as vector graphics .. any documentation supporting that ? >> For that (which would be a lot of work!) you'd need to get the >> specification for the barcode type that you want to do. For "3 of 9", >> start here: >> >> https://en.wikipedia.org/wiki/Code_39 and then click on the links at >> the bottom. >> >> then you just draw filled rectangles at the correct position in the >> correct size. See the ShowColorBoxes.java example on how to draw a >> filled rectangle. >> >> Or have a look at this: >> https://www.pdflabs.com/tools/gnu-barcode-plus-pdf/ >> > barcode4j might help as well > > http://barcode4j.sourceforge.net/index.html > > BR > Andreas > >> Tilman >> >>> Thanks, >>> Shivangi >>> >>> -----Original Message----- >>> From: Tilman Hausherr [mailto:THausherr@t-online.de] >>> Sent: Monday, 9 January 2017 5:32 PM >>> To: users@pdfbox.apache.org >>> Subject: Re: Regarding Barcode Font >>> >>> Am 09.01.2017 um 03:18 schrieb Shivangi Singal: >>>> Hello , >>>> >>>> We have a project requirement where we need to display a label which consists of some text and a barcode . We don't want to display barcode as an buffered image but generate barcode may be using barcode font . I am not able to find any references in the examples as to if PDFBox has any way to add barcodes in pdf without being a image . I would really appreciate your help in the same . >>> Then get a barcode font. You can draw that one like any text. Usually this is done like this: *12345* , the "*" is for the beginning and end. Be careful to leave enough space before and after the barcode. >>> >>> Don't forget to embed the font. (See the embeddedfonts.java example) >>> >>> A completely different alternative would be to draw the barcode as vector graphics. There's no example for this yet AFAIK. >>> >>> Tilman >>> >>> >>> -------------------------------------------------------------------- >>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org >>> >>> >>> -------------------------------------------------------------------- >>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >> For additional commands, e-mail: users-help@pdfbox.apache.org >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org