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 E932117C89 for ; Wed, 8 Apr 2015 20:58:44 +0000 (UTC) Received: (qmail 84154 invoked by uid 500); 8 Apr 2015 20:58:44 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 84132 invoked by uid 500); 8 Apr 2015 20:58:44 -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 84113 invoked by uid 99); 8 Apr 2015 20:58:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 20:58:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.192.181] (HELO mail-pd0-f181.google.com) (209.85.192.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2015 20:58:38 +0000 Received: by pdbnk13 with SMTP id nk13so127851662pdb.0 for ; Wed, 08 Apr 2015 13:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jahewson.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=uh7M53N0XdoOzasPagEmglyFN0F6NChm9DiLmog4yss=; b=Cmc4fG7ndIYMXF+2mkm+4mIOkLKl646XQnjtPc8E3j3laEKj9OlQoEHtEgaOpuq0bk djY4FtCPlF/utLSow2XEFRxDtzUEfo5nJTOu/bcT0qbtOSMf1EEldQx8okK0ZQ81t7mr wDFuUDQRPOUuxFEPw8snT0ltQuuO8r3afa+tI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=uh7M53N0XdoOzasPagEmglyFN0F6NChm9DiLmog4yss=; b=SO05XpiFwsdSOKE6R3vGY4uIJsa0Clv5VhuqI+6IP/bnO06WrV2ovwdKdri66af0rD kU5Qdk1/+kZVDGOnhnu6+2E2z4cO6aUAN96qMfHKGINB0UvW6QR1fJoUQo0KuvQdiItm zdoJB5f2nBgU/VIwhXNoFP/oU6ElS1xMyoHZvcLYbErFpuM7JOXHZc/+k7Xw5JummQXm GIU9yF0XvcyWOvxZaief0hpBH15SdZXmbz/4hFqx9vNimFkkOV+5r2XKqmqUNz/IqEkH uvV5W6oljC5Os+TONSpuo9eR1fR+oz4Ey2nd+fizMaoBcmm1duPSsxCWelTgP2njyME0 6GnA== X-Gm-Message-State: ALoCoQnvIe/4Qpz+xwL8G0PZ6XqbjYjeMkdfeUGg2fRksV+/1DSCfiMLaC8t9jHv1M/sYJFZYdrP X-Received: by 10.68.222.131 with SMTP id qm3mr49620229pbc.55.1428526587554; Wed, 08 Apr 2015 13:56:27 -0700 (PDT) Received: from [10.0.1.9] (cpe-104-175-16-9.socal.res.rr.com. [104.175.16.9]) by mx.google.com with ESMTPSA id jw5sm11987193pbc.0.2015.04.08.13.56.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Apr 2015 13:56:26 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: pdfbox warnings From: John Hewson In-Reply-To: Date: Wed, 8 Apr 2015 13:56:22 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5514329F.2090803@t-online.de> <551B0FB2.4080604@t-online.de> <5522DD25.30402@t-online.de> <528E91AB-5628-44A3-9D53-0AA72F003F48@jahewson.com> <76B7CFCE-5D90-480C-A600-315A8247DD58@jahewson.com> <8489B6A3-C5D1-4E94-92C3-2EE85BC61D84@jahewson.com> To: users@pdfbox.apache.org X-Mailer: Apple Mail (2.2070.6) X-Virus-Checked: Checked by ClamAV on apache.org > On 8 Apr 2015, at 13:17, Eric Douglas wrote: >=20 > On Wed, Apr 8, 2015 at 3:59 PM, John Hewson wrote: >=20 >>> On 8 Apr 2015, at 10:59, Eric Douglas = wrote: >>>=20 >>> Where are you getting the Arial Unicode MS? It doesn't come with >> Windows, >>> that is, it's not installed on my Windows 8.1 Pro. >>> Previously when I referenced a unicode font I used Lucida Sans = Unicode. >>> My Windows Arial includes Arial Black, Arial Bold, Arial Bold = Italic, >> Arial >>> Italic, and Arial Regular. >>>=20 >> As you=E2=80=99ve spotted, Arial Unicode MS doesn=E2=80=99t ship with = Windows, but with >> Office, which >> kind of ruins my whole idea. We=E2=80=99ll need to take a closer look = at the fonts >> which really >> are shipped with Windows. I=E2=80=99m on a Mac, so it=E2=80=99s a = little tricky for me. >>=20 >> See: https://www.microsoft.com/typography/fonts/font.aspx?FMID=3D1081 >>=20 >>=20 >>> Windows likes to change their fonts, which is annoying when you have >>> programs that run on different operating systems and you want = consistent >>> output. >>> We used to reference fonts by name but even when it found the same = font >>> sometimes there were different versions. We once had 2 machines = running >>> the same OS, Windows 98 SE, which produced different output from the = same >>> Courier font file name. >>> I started writing Java with Windows XP Pro and copied the Lucida = font >> files >>> from the Windows Fonts folder to embed in my jar to make sure my = program >>> output wouldn't look different when we changed OS. >>> It is best if there's a free, redistributable font file you can = embed in >> a >>> jar. (as long as they can't guarantee we can find the same font = installed >>> on every OS) >>=20 >> The problem here is that platform-specific behaviour is actually >> desirable: a PDF >> opened in Acrobat on Windows will render Arial instead of Helvetica, = if >> PDFBox >> were to bundle its own Helvetica font, we=E2=80=99d be using the = wrong font for >> the platform, >> despite it being a perfectly acceptable font. We=E2=80=99ve had users = complain >> that PDFBox >> makes different substitutions from Evince and so the same PDF render = with >> different >> fonts on the same system when opened in different viewers - we=E2=80=99= ve tried to >> fix these >> kinds of issues, but the result is that fonts substitution really = should >> be platform-specific. >>=20 >> Having said that, you can always bundle your own fonts and use a = custom >> FontProvider >> and PDFBox will give you consistent cross-platfrom rendering, if = that=E2=80=99s >> what your >> project=E2=80=99s requirements call for, but out-of-the-box we have = to provide >> platform-specific >> behaviour. >>=20 >> =E2=80=94 John >>=20 >>=20 > I don't know about regular text substitutions, as you describe using = an > installed Arial in place of Helvetica. I was specifically looking for = a > custom replacement font to be included for symbols. If I create a PDF = with > iText with an editable check box object, it puts in a reference to > Zapfdingbats without giving me an option to embed the font. As = Windows > doesn't have this font installed by default, when I tried to read that = PDF > back in and render it to the screen with pdfbox, it didn't draw the = check > marks. If you view that same PDF in Adobe Reader on Windows without > Zapfdingbats installed, it says it's using it's actual font Adobe Pi = Std. > Assuming you can't package the Adobe font with pdfbox for that > substitution, the free redistributable Noto Sans Symbols font looks = like a > fine replacement. >=20 > Font replacement can also be an option, if a program wants to tell = pdfbox > to use font x in place of font y. Yes, in fact, we substitute all fonts except for the =E2=80=9Cfallback=E2=80= =9D font. My point is that It=E2=80=99s better to substitute with platform fonts rather than = bundling an otherwise alien font with PDFBox. It now looks like MS Gothic is a suitable substitute, as it=E2=80=99s = shipped with Windows itself, rather than with Office. =E2=80=94 John --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org