Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77D1D11648 for ; Wed, 30 Apr 2014 15:55:05 +0000 (UTC) Received: (qmail 9674 invoked by uid 500); 30 Apr 2014 15:55:05 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 9642 invoked by uid 500); 30 Apr 2014 15:55:05 -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 9633 invoked by uid 99); 30 Apr 2014 15:55:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2014 15:55:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.25.134.81] (HELO mailout03.t-online.de) (194.25.134.81) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2014 15:54:58 +0000 Received: from fwd12.aul.t-online.de (fwd12.aul.t-online.de [172.20.26.241]) by mailout03.t-online.de (Postfix) with SMTP id 70E018E35 for ; Wed, 30 Apr 2014 17:54:35 +0200 (CEST) Received: from [192.168.2.102] (SOVR2eZlZhYvzNMUtlglrzovxPiiX5FK7zlH-MbIcUbibX4gtJffSXYAdSOtAvZZEm@[84.190.172.244]) by fwd12.t-online.de with esmtp id 1WfWq4-1UnjKy0; Wed, 30 Apr 2014 17:54:28 +0200 Message-ID: <53611CD1.7080700@t-online.de> Date: Wed, 30 Apr 2014 17:54:57 +0200 From: Tilman Hausherr User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: users@pdfbox.apache.org Subject: Re: Image from String References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: SOVR2eZlZhYvzNMUtlglrzovxPiiX5FK7zlH-MbIcUbibX4gtJffSXYAdSOtAvZZEm X-TOI-MSGID: bd8cee89-89ce-4d45-8b8f-45dc192f8c09 X-Virus-Checked: Checked by ClamAV on apache.org Hello, I see nobody answered; assuming that with "codebar" you mean a barcode, you can create an image by creating a BufferedImage object, then getting a graphics2d device from it, writing on it with your barcode font. Don't forget to dispose the graphics2d device. You can then use it as in the AddImageToPDF example. If you're doing a mass print (i.e. a PDF file with many pages), then it would be better to do it as text and include the font. See here: https://pdfbox.apache.org/cookbook/pdfacreation.html HTH Tilman Am 04.04.2014 22:04, schrieb Agustin Rios: > Hi, there is some way to transform a String to an image and inserting it > into a Page? > I'm working with codebar and I have problems opening the pdf in some > viewers, so I want to transform the codebar into an image. > The problem is that in adobe reader, sometimes show extrange symbols when > open the pdf. In linux doesn't happening. > > Thanks! >