Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Re: Text orientation in PDF-Format
Conf: (P-PDF) Developers, Msg: 58629
From: PeterKooi
Date: 5/29/2002 05:33 PM

Hi Frank!

I agree with Aandi that handling other than the base 13 fonts can be very difficult, especially if you want the font to be embedded in the PDF file. If you don't care about embedding (which means that all the fonts you use HAVE to be on the viewer's machine! This is ONLY acceptable when you're using
this files in a closed environment) you can use every font by just referring to its name. Insert a font object like this:

/Type=/Font
/Subtype=/TrueType
/BaseFont=/Arial,BoldItalic
/FirstChar=0
/LastChar=255
/Encoding=/WinAnsiEncoding
/Widths=[ 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 474 556 556 889 722 238 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 333 333 584 584 584 611 975 722 722 722 722 667 611 778
722 278 556 722 611 833 722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 333 584 556 333 556 611 556 611 556 333 611 611 278 278 556 278 889 611 611 611 611 389 556 333 611 556 778 556 556 500 389 280 389 584 750 750 750 278 556 500 1000 556 556 333 1000 667 333 1000 750 750 750 750 278
278 500 500 350 556 1000 333 1000 556 333 944 750 750 667 278 333 556 556 556 556 280 556 333 737 370 556 584 333 737 552 400 549 333 333 333 576 556 333 333 333 365 556 834 834 834 611 722 722 722 722 722 722 1000 722 667 667 667 667 278 278 278 278 722 722 778 778 778 778 778 584 778 722 722 722
722 667 667 611 556 556 556 556 556 556 889 556 556 556 556 556 278 278 278 278 611 611 611 611 611 611 611 549 611 611 611 611 611 556 611 556 ]

The widths array you can copy from an existing PDF file. Be sure not to violate the font-license. You're only allowed to do this with fonts you paid for! You can calculate the width of a character as follows:

(Characterwidth from table / (1000 / Size in points) )

With the characterwidths you can calculate the starting point for a centered or right-justified line.

Regards,

Peter Kooi,
Gopher Publishers.


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.