12.04.2014 Views

1 - PDFlib

1 - PDFlib

1 - PDFlib

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ABC<br />

<strong>PDFlib</strong>, <strong>PDFlib</strong>+PDI, PPS<br />

A library for generating PDF on the fly<br />

Version 8.0.1<br />

<br />

COM .NET REALbasic


Copyright © 1997–2010 <strong>PDFlib</strong> GmbH and Thomas Merz. All rights reserved.<br />

<strong>PDFlib</strong> <br />

<strong>PDFlib</strong> GmbH<br />

Franziska-Bilek-Weg 9, 80339 München, Germany<br />

www.pdflib.com<br />

+49 • 89 • 452 33 84-0<br />

FAX +49 • 89 • 452 33 84-99<br />

tech.groups.yahoo.com/group/pdflib <strong>PDFlib</strong> <br />

<br />

jp.sales@pdflib.com<br />

<strong>PDFlib</strong> jp.support@pdflib.com <br />

<br />

<strong>PDFlib</strong> GmbH <strong>PDFlib</strong> GmbH <br />

<br />

<br />

<br />

<strong>PDFlib</strong> <strong>PDFlib</strong> <strong>PDFlib</strong> GmbH <strong>PDFlib</strong> <strong>PDFlib</strong> <br />

<br />

Adobe Acrobat PostScript XMP Adobe Systems Inc. AIX IBM OS/390 WebSphere <br />

iSeries zSeries International Business Machines Corporation ActiveX Microsoft OpenType <br />

Windows Microsoft Corporation Apple Macintosh TrueType Apple Computer, Inc. <br />

Unicode Unicode Unicode, Inc. Unix The Open Group Java <br />

Solaris Sun Microsystems, Inc. HKS HKS Hostmann-Steinberg K+E Printing<br />

Inks Schmincke <br />

<br />

PANTONE® PANTONE <br />

PANTONE Color Publication <br />

PANTONE® Pantone, Inc. Pantone, Inc. © Pantone, Inc., 2003.<br />

Pantone, Inc. <strong>PDFlib</strong> GmbH <strong>PDFlib</strong> <br />

PANTONE <br />

<strong>PDFlib</strong> <br />

<br />

<strong>PDFlib</strong> <br />

ICClib Copyright © 1997-2002 Graeme W. Gill<br />

GIF Copyright © 1990-1994 David Koblas<br />

PNG libpng Copyright © 1998-2004 Glenn Randers-Pehrson<br />

Zlib Copyright © 1995-2002 Jean-loup Gailly and Mark Adler<br />

TIFFlib Copyright © 1988-1997 Sam Leffler Copyright © 1991-1997 Silicon Graphics, Inc.<br />

Eric Young Cryptographic Copyright © 1995-1998 Eric Young eay@cryptsoft.com<br />

Independent JPEG Group JPEG Copyright © 1991-1998, Thomas G. Lane<br />

Cryptographic Copyright © 1998-2002 The OpenSSL Project www.openssl.org<br />

Expat XML Copyright © 1998, 1999, 2000 Thai Open Source Software Center Ltd<br />

ICU International Components for Unicode Copyright © 1995-2009 International Business Machines<br />

Corporation and others<br />

sRGB ICC Copyright © 1998 Hewlett-Packard Company<br />

<strong>PDFlib</strong> RSA Security, Inc. MD5


0 <strong>PDFlib</strong> 9<br />

1 13<br />

1.1 13<br />

1.2 <strong>PDFlib</strong> 15<br />

1.3 <strong>PDFlib</strong>/<strong>PDFlib</strong>+PDI/PPS 8 17<br />

17<br />

18<br />

20<br />

21<br />

1.4 <strong>PDFlib</strong> 22<br />

1.5 <strong>PDFlib</strong>+PDI 26<br />

1.6 PPS 27<br />

1.7 28<br />

2 <strong>PDFlib</strong> 29<br />

2.1 29<br />

2.2 Cobol 30<br />

2.3 COM 31<br />

2.4 C 37<br />

2.5 C++ 38<br />

2.6 Java 39<br />

2.7 .NET 40<br />

2.8 Perl 43<br />

2.9 PHP 44<br />

2.10 Python 45<br />

2.11 REALbasic 46<br />

2.12 RPG 47<br />

2.13 Ruby 48<br />

2.14 Tcl 49<br />

3 <strong>PDFlib</strong> 51<br />

3.1 <strong>PDFlib</strong> 51<br />

51<br />

3


53<br />

55<br />

59<br />

59<br />

60<br />

3.2 61<br />

61<br />

63<br />

64<br />

66<br />

67<br />

3.3 PDF 68<br />

68<br />

69<br />

3.4 Web PDF 71<br />

3.5 72<br />

72<br />

73<br />

76<br />

3.6 79<br />

79<br />

81<br />

3.7 PDF 85<br />

85<br />

85<br />

86<br />

87<br />

4 Unicode 89<br />

4.1 Unicode 89<br />

4.2 8 91<br />

4.3 95<br />

4.4 <strong>PDFlib</strong> 97<br />

97<br />

97<br />

98<br />

4.5 99<br />

99<br />

100<br />

5 103<br />

5.1 103<br />

103<br />

4


103<br />

104<br />

105<br />

105<br />

5.2 Unicode 107<br />

107<br />

107<br />

108<br />

109<br />

5.3 110<br />

110<br />

111<br />

112<br />

5.4 113<br />

113<br />

115<br />

116<br />

120<br />

123<br />

5.5 126<br />

126<br />

127<br />

5.6 130<br />

130<br />

131<br />

132<br />

6 135<br />

6.1 135<br />

6.2 137<br />

137<br />

138<br />

139<br />

6.3 OpenType 142<br />

142<br />

144<br />

6.4 148<br />

148<br />

150<br />

152<br />

152<br />

154<br />

6.5 156<br />

156<br />

5


157<br />

158<br />

159<br />

7 PDF 163<br />

7.1 163<br />

163<br />

165<br />

168<br />

168<br />

170<br />

7.2 PDI PDF 172<br />

172<br />

172<br />

174<br />

7.3 PDF 176<br />

176<br />

176<br />

178<br />

180<br />

181<br />

182<br />

8 183<br />

8.1 183<br />

183<br />

184<br />

185<br />

187<br />

187<br />

188<br />

189<br />

8.2 191<br />

193<br />

194<br />

195<br />

197<br />

199<br />

200<br />

202<br />

203<br />

206<br />

207<br />

8.3 211<br />

212<br />

6


215<br />

216<br />

218<br />

221<br />

223<br />

8.4 226<br />

226<br />

227<br />

228<br />

9 pCOS 231<br />

9.1 pCOS 231<br />

9.2 PDF 233<br />

9.3 ID 235<br />

9.4 236<br />

9.5 238<br />

9.6 PDF 245<br />

10 PDF 247<br />

10.1 Acrobat PDF 247<br />

10.2 ISO 32000 250<br />

10.3 PDF/X 251<br />

251<br />

252<br />

255<br />

256<br />

10.4 PDF/A 258<br />

258<br />

258<br />

262<br />

263<br />

264<br />

266<br />

266<br />

10.5 PDF 267<br />

267<br />

269<br />

270<br />

273<br />

11 PPS <strong>PDFlib</strong> Block Plugin 275<br />

11.1 <strong>PDFlib</strong> Block Plugin 275<br />

7


11.2 <strong>PDFlib</strong> 277<br />

277<br />

277<br />

278<br />

11.3 <strong>PDFlib</strong> Block Plugin 280<br />

280<br />

283<br />

285<br />

286<br />

289<br />

11.4 Acrobat 290<br />

11.5 PPS 294<br />

11.6 298<br />

298<br />

298<br />

299<br />

301<br />

302<br />

304<br />

306<br />

306<br />

11.7 pCOS 308<br />

11.8 <strong>PDFlib</strong> 310<br />

310<br />

311<br />

313<br />

A 315<br />

317<br />

8


0<strong>PDFlib</strong> <br />

<br />

<br />

www.pdflib.com <br />

<br />

<br />

sales@pdflib.com <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

general/license_key <br />

Windows <br />

<br />

<br />

<br />

<br />

license <br />

<br />

> <br />

oPDF.set_parameter "license", "... ..."<br />

> <br />

p.set_parameter("license", "... ...");<br />

<br />

<br />

<br />

licensekeys.txt <br />

<strong>PDFlib</strong> license file 1.0<br />

# Licensing information for <strong>PDFlib</strong> GmbH products<br />

<strong>PDFlib</strong> 8.0.1 ... ...<br />

<br />

<br />

<br />

<br />

9


licensefile <br />

<br />

> <br />

oPDF.set_parameter "licensefile", "///licensekeys.txt"<br />

> <br />

p.set_parameter("licensefile", "///licensekeys.txt");<br />

PDFLIBLICENSEFILE <br />

<br />

<br />

<br />

<br />

HKLM\Software\<strong>PDFlib</strong>\PDFLIBLICENSEFILE<br />

<br />

<br />

HKLM\Software\<strong>PDFlib</strong>\<strong>PDFlib</strong>8\license<br />

HKLM\Software\<strong>PDFlib</strong>\<strong>PDFlib</strong>8\8.0.1\license<br />

<br />

<br />

64 Windows 64<br />

<strong>PDFlib</strong> Windows 64 64<br />

32 <strong>PDFlib</strong> 32 <br />

32 <br />

32 regedit <br />

... <br />

<br />

%systemroot%\syswow64\regedit<br />

<br />

<br />

<br />

<br />

<br />

<br />

8.0.x <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

10 0 : <strong>PDFlib</strong> COM .NET REALbasic


<strong>PDFlib</strong> GmbH, Licensing Department<br />

Franziska-Bilek-Weg 9, 80339 München, Germany<br />

www.pdflib.com<br />

<br />

jp.sales@pdflib.com<br />

jp.support@pdflib.com<br />

11


12 0 : <strong>PDFlib</strong> COM .NET REALbasic


1 <br />

1.1 <br />

<br />

Windows Vista Windows 7 <br />

Program Files Windows <br />

PDF <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <strong>PDFlib</strong> <br />

<br />

<br />

<br />

<strong>PDFlib</strong> Java 29 <br />

2 <strong>PDFlib</strong> <br />

C <strong>PDFlib</strong> <br />

<br />

<strong>PDFlib</strong> API <strong>PDFlib</strong> API <br />

<br />

<br />

<br />

<br />

php.net <br />

<strong>PDFlib</strong> API <br />

<strong>PDFlib</strong> <strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

1.1 13


www.pdflib.com/pdflib-cookbook/<br />

pCOS pCOS <br />

<br />

www.pdflib.com/pcos-cookbook/<br />

TET <br />

<br />

TET <br />

<br />

<br />

<br />

<br />

www.pdflib.com/tet-cookbook/<br />

14 1 : COM .NET REALbasic


1.2 <strong>PDFlib</strong> <br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

1.2 <strong>PDFlib</strong> 15


<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

<br />

> <br />

<br />

> <br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

<br />

16 1 : COM .NET REALbasic


1.3 <strong>PDFlib</strong>/<strong>PDFlib</strong>+PDI/PPS 8 <br />

<br />

<br />

<br />

1.3.1 Acrobat 9 PDF <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

AES-256 Unicode <br />

<br />

<br />

Acrobat 9 <br />

<br />

1.3 <strong>PDFlib</strong>/<strong>PDFlib</strong>+PDI/PPS 8 17


1.3.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

OpenType <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

SING <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

18 1 : COM .NET REALbasic


1.3 <strong>PDFlib</strong>/<strong>PDFlib</strong>+PDI/PPS 8 19


1.3.3 <strong>PDFlib</strong> Block Plugin <strong>PDFlib</strong> Personalization Server PPS<br />

<br />

<br />

PPS Acrobat <br />

<br />

<br />

<br />

<br />

<br />

<br />

PDF/A PDF/X <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> 8 <br />

<br />

<br />

20 1 : COM .NET REALbasic


1.3.4 <br />

<br />

<br />

<br />

<br />

PDF/X-4 PDF/X-5 <br />

<br />

<br />

<br />

<br />

TIFF PNG <br />

<br />

<br />

JBIG2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

PANTONE® Goe <br />

® <br />

<br />

<br />

> info_image( ) <br />

> <br />

<br />

> <br />

> <br />

> <br />

> <br />

> <br />

> info_font( ) <br />

> <br />

> wstring <br />

1.3 <strong>PDFlib</strong>/<strong>PDFlib</strong>+PDI/PPS 8 21


1.4 <strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

22 1 : COM .NET REALbasic


® ® ® <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

1.4 <strong>PDFlib</strong> 23


24 1 : COM .NET REALbasic


1.4 <strong>PDFlib</strong> 25


1.5 <strong>PDFlib</strong>+PDI <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

26 1 : COM .NET REALbasic


1.6 PPS <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

® ® <br />

<br />

1.6 PPS 27


1.7 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

end_document( ) linearize <br />

<br />

<br />

<br />

<br />

end_document( ) optimize <br />

<br />

begin_template_ext( ) open_pdi_page( ) <br />

reference <br />

<br />

<br />

<br />

add_portfolio_file( ) password <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

28 1 : COM .NET REALbasic


2<strong>PDFlib</strong> <br />

<strong>PDFlib</strong> <br />

<strong>PDFlib</strong> <br />

<br />

2.1 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

2.1 29


2.2 Cobol <br />

<br />

30 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.3 COM <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

> pdflib_com.dll <br />

> <br />

<br />

> <br />

<br />

> <br />

<strong>PDFlib</strong> MTS Microsoft Transaction Server <br />

MTS <br />

<strong>PDFlib</strong> COM <br />

<br />

> <br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

\<strong>PDFlib</strong> 8.0.1\bin\pdflib _<br />

com.dll <br />

> <br />

<br />

<strong>PDFlib</strong> MSI <br />

<br />

1. COM www.microsoft.com/com <br />

2.3 COM 31


.msi <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> pdflib_com.dll <br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

msiexec.exe /I <strong>PDFlib</strong>-8.0.1-com-dotnet.msi /qn<br />

<br />

<br />

ISP <strong>PDFlib</strong> COM <br />

<br />

<br />

<br />

<br />

<br />

> regsvr32 <br />

<br />

> <br />

HKEY_LOCAL_MACHINE\SOFTWARE\<strong>PDFlib</strong><br />

<br />

> <br />

set_parameter( ) <br />

SearchPath resourcefile license <br />

<br />

<br />

<br />

<strong>PDFlib</strong> COM <br />

<br />

<br />

<br />

<br />

32 2 : <strong>PDFlib</strong> COM .NET REALbasic


<br />

<br />

<br />

> pdflib.reg <br />

<br />

<br />

> pdflib_com.dll regsvr32 <br />

<br />

> set_parameter( ) <br />

license <br />

<br />

oPDF.set_parameter("license", " ")<br />

COM <br />

<br />

<br />

<br />

<br />

<br />

<br />

Active Server Pages <strong>PDFlib</strong> <br />

MapPath <br />

<br />

<br />

<br />

UNC IIS <br />

<br />

<br />

<br />

<strong>PDFlib</strong>_com <br />

<br />

<br />

CreateObject <br />

<br />

<br />


<strong>PDFlib</strong>_com <br />

> Object <strong>PDFlib</strong>_<br />

com.PDF <br />

34 2 : <strong>PDFlib</strong> COM .NET REALbasic


Dim oPDF As <strong>PDFlib</strong>_com.PDF<br />

Set oPDF = CreateObject("<strong>PDFlib</strong>_com.PDF")<br />

' : Set oPDF = New <strong>PDFlib</strong>_com.PDF<br />

<br />

> <br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

oPDF.circle 10, 10, 30<br />

<br />

pcircle (circle)<br />

pscale (scale)<br />

<br />

oPDF.[circle] 10, 10, 30<br />

<br />

<br />

circle<br />

scale<br />

<br />

long <br />

long <br />

int <br />

<br />

On Error GoTo <br />

Sub main()<br />

Dim oPDF As <strong>PDFlib</strong>_com.PDF<br />

On Error GoTo ErrExit<br />

...<strong>PDFlib</strong>...<br />

End<br />

ErrExit:<br />

MsgBox Hex(Err.Number) & ": " & Err.Description<br />

End Sub<br />

2.3 COM 35


.NET <strong>PDFlib</strong> COM <br />

<br />

tlbimp.exe <br />

<br />

tlbimp pdflib_com.dll /namespace:pdflib_com /out:Interop.pdflib_com.dll<br />

<br />

pdflib_com.dll <br />

<br />

Imports <strong>PDFlib</strong>_com<br />

...<br />

Dim p As <strong>PDFlib</strong>_com.IPDF<br />

...<br />

p = New PDF()<br />

...<br />

buf = p.get_buffer()<br />

<br />

using <strong>PDFlib</strong>_com;<br />

...<br />

static <strong>PDFlib</strong>_com.IPDF p;<br />

...<br />

p = New PDF();<br />

...<br />

buf = (byte[])p.get_buffer();<br />

get_buffer( ) <br />

<br />

<br />

create_pfv( ) <br />

36 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.4 C <br />

<br />

<strong>PDFlib</strong> C C++ <br />

<strong>PDFlib</strong> C++ <br />

C C++ <br />

<br />

<br />

2.4 C 37


2.5 C++ <br />

<br />

38 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.6 Java <br />

<br />

2.6 Java 39


2.7 .NET <br />

<br />

<br />

<br />

pdflib_dotnet.dll <br />

<br />

<strong>PDFlib</strong>.NET 32-bit 64-bit .NET Framework 2.0 <br />

<strong>PDFlib</strong> .NET <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

msiexec.exe /I <strong>PDFlib</strong>-8.0.1-com-dotnet.msi /qn<br />

<br />

<br />

pdflib_dotnet.dll<br />

<br />

IntelliSense <br />

pdflib_dotnet.xml <br />

<br />

pdflib_dotnet.dll <br />

pdflib_dotnet.dll <br />

pdflib_dotnet.xml <br />

.NET <br />

<br />

<br />

<br />

get_errnumget_errmsgget_apiname<br />

<strong>PDFlib</strong>_dotnet.<strong>PDFlib</strong>Exception <br />

<br />

<br />

C# <strong>PDFlib</strong> <br />

<br />

... ... <strong>PDFlib</strong>_dotnet.dll <br />

<br />

<br />

<br />

csc.exe /r:..\..\bin\<strong>PDFlib</strong>_dotnet.dll hello.cs<br />

40 2 : <strong>PDFlib</strong> COM .NET REALbasic


try<br />

catch <br />

try {<br />

...<strong>PDFlib</strong>...<br />

catch (<strong>PDFlib</strong>Exception e)<br />

{<br />

// <strong>PDFlib</strong><br />

Console.WriteLine("<strong>PDFlib</strong> exception occurred in hello sample:\n");<br />

Console.WriteLine("[{0}] {1}: {2}\n",<br />

e.get_errnum(), e.get_apiname(), e.get_errmsg());<br />

} finally {<br />

if (p != null) {<br />

p.Dispose();<br />

}<br />

}<br />

VB.NET <strong>PDFlib</strong> <br />

<br />

... ... <strong>PDFlib</strong>_<br />

dotnet.dll <br />

<br />

<br />

vbc.exe /r:..\..\bin\pdflib_dotnet.dll hello.vb<br />

<br />

> <br />

> <br />

<br />

<br />

try catch <br />

Try<br />

...<strong>PDFlib</strong>...<br />

Catch e As <strong>PDFlib</strong>Exception<br />

Console.WriteLine("<strong>PDFlib</strong> exception occurred in hello sample:")<br />

Console.WriteLine("[{0}] {1}: {2}",<br />

e.get_errnum(), e.get_apiname(), e.get_errmsg())<br />

Finally<br />

If Not p Is Nothing Then<br />

p.Dispose()<br />

End If<br />

End Try<br />

On Error GoTo <br />

<br />

Imports Microsoft.VisualBasic<br />

Public Shared Sub Main()<br />

On Error GoTo ErrExit<br />

...<strong>PDFlib</strong>...<br />

Exit Sub<br />

ErrExit:<br />

2.7 .NET 41


Console.WriteLine("<strong>PDFlib</strong> exception caught: {0}", Err.Description)<br />

End Sub<br />

ASP.NET <strong>PDFlib</strong> <br />

<strong>PDFlib</strong>_dotnet.dll <br />

bin <br />

bin <br />

C:\Inetpub\wwwroot\bin\pdflib_dotnet.dll<br />

C:\Inetpub\wwwroot\WebApplicationX\bin\pdflib_dotnet.dll<br />

<br />

MapPath <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

ASP.NET 2.0 <br />

<br />

Full <br />

<br />

<br />

Unicode <br />

<br />

Encoding <br />

<br />

public String(sbyte*, int, int, Encoding)<br />

42 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.8 Perl <br />

<br />

2.8 Perl 43


2.9 PHP <br />

<br />

44 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.10 Python <br />

<br />

2.10 Python 45


2.11 REALbasic 1<br />

<strong>PDFlib</strong> REALbasic <br />

<br />

<strong>PDFlib</strong>.rbx <br />

Plugins <br />

<strong>PDFlib</strong>.framework /Library/Frameworks <br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

REALbasic <br />

<br />

> <strong>PDFlib</strong> <br />

> <strong>PDFlib</strong>Exception RuntimeException <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

REALbasic <strong>PDFlib</strong>Exception <br />

<br />

try catch <br />

<br />

<br />

Exception err As <strong>PDFlib</strong>Exception<br />

MsgBox("<strong>PDFlib</strong> exception occurred in hello sample: [" + _<br />

Str(err.get_errnum()) + "] " + err.get_apiname() + ": " + err.get_errmsg())<br />

<br />

<strong>PDFlib</strong>Exception <br />

<br />

1. www.realbasic.com <br />

46 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.12 RPG <br />

<br />

2.12 RPG 47


2.13 Ruby <br />

<br />

48 2 : <strong>PDFlib</strong> COM .NET REALbasic


2.14 Tcl <br />

<br />

2.14 Tcl 49


50 2 : <strong>PDFlib</strong> COM .NET REALbasic


3<strong>PDFlib</strong><br />

3.1 <strong>PDFlib</strong> <br />

<strong>PDFlib</strong> <br />

general <br />

3.1.1 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

delete( ) get_apiname( ) get_errnum( ) get_errmsg( ) <br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

3.1 <strong>PDFlib</strong> 51


PDF <br />

<br />

<br />

<br />

<br />

get_errnum( ) get_errmsg( ) get_apiname( ) <br />

<br />

<br />

<br />

errorpolicy <br />

errorpolicy <br />

<br />

> errorpolicy=legacy <br />

fontwarning imagewarning <br />

<br />

<br />

legacy <br />

> errorpolicy=return <br />

<br />

<br />

<br />

<br />

> errorpolicy=exception <br />

<br />

<br />

<br />

<br />

<br />

errorpolicy=return <br />

<br />

<br />

font = p.load_font("MyFontName", "unicode", "errorpolicy=return");<br />

if (font == -1)<br />

{<br />

/* PDF*/<br />

errmsg = p.get_errmsg();<br />

/* */<br />

...<br />

}<br />

/* */<br />

52 3 : <strong>PDFlib</strong> COM .NET REALbasic


errorpolicy=exception <br />

<br />

font = p.load_font("MyFontName", "unicode", "errorpolicy=exception");<br />

/* <br />

* PDF<br />

*/<br />

general/error_handling <br />

<br />

<br />

<br />

<br />

<br />

<br />

p.set_parameter("logging", "filename=private.log");<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

3.1.2 <strong>PDFlib</strong> PVF<br />

general/starter_pvf <br />

<strong>PDFlib</strong> Virtual File System <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

filename <br />

<br />

<br />

> /pvf/image/filename<br />

> <br />

/pvf/font/filename<br />

> /pvf/iccprofile/filename<br />

> /pvf/codepage/filename<br />

> /pvf/pdf/filename<br />

3.1 <strong>PDFlib</strong> 53


create_pvf( ) <br />

copy <br />

delete( )<br />

<br />

<br />

<br />

<br />

<br />

<br />

close( ) <br />

delete_pvf( ) <br />

copy <br />

<br />

<br />

> <br />

delete_pvf( ) close( ) delete_pvf( ) <br />

<br />

<br />

<br />

<br />

<br />

delete_pvf( ) <br />

> <br />

<br />

<br />

<br />

delete_pvf( ) <br />

> delete_pvf( )<br />

delete( ) <br />

<br />

delete_pvf( ) <br />

delete( ) <br />

PDF <br />

begin_document( )<br />

createpvf <br />

<br />

<br />

54 3 : <strong>PDFlib</strong> COM .NET REALbasic


3.1.3 <br />

<br />

<br />

<br />

<br />

<br />

set_parameter( ) <br />

Unix<br />

PostScript Resource <br />

<br />

<br />

makepsres <br />

<br />

<br />

<br />

<br />

<br />

HostFont <br />

<br />

<br />

SearchPath <br />

CMap <br />

FontAFM <br />

FontPFM <br />

FontOutline <br />

Encoding <br />

<br />

HostFont <br />

ICCProfile <br />

StandardOutputIntent <br />

<br />

<br />

<br />

<br />

<br />

UPR <br />

<br />

<br />

3.1 <strong>PDFlib</strong> 55


> \ <br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

> <br />

<br />

> <br />

PS-Resources-1.0<br />

> <br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

SearchPath <br />

SearchPath <br />

<br />

<br />

<br />

SearchPath <br />

<br />

<br />

SearchPath <br />

SearchPath<br />

<br />

<br />

<br />

<br />

p.set_parameter("SearchPath", "///1");<br />

p.set_parameter("SearchPath", "///2");<br />

<br />

SearchPath <br />

<br />

> SearchPath <br />

<br />

<br />

56 3 : <strong>PDFlib</strong> COM .NET REALbasic


HKLM\Software\<strong>PDFlib</strong>\<strong>PDFlib</strong>8\8.0.1\SearchPath<br />

HKLM\Software\<strong>PDFlib</strong>\<strong>PDFlib</strong>8\SearchPath<br />

HKLM\Software\<strong>PDFlib</strong>\SearchPath<br />

> SearchPath <br />

<br />

<br />

C:\Program Files\<strong>PDFlib</strong>\<strong>PDFlib</strong> 8.0.1\resource<br />

UPR <br />

<br />

PS-Resources-1.0<br />

.<br />

SearchPath<br />

/usr/local/lib/fonts<br />

C:/psfonts/pfm<br />

C:/psfonts<br />

/users/kurt/my_images<br />

.<br />

FontAFM<br />

Code-128=Code_128.afm<br />

.<br />

FontPFM<br />

Corporate-Bold=corpb___.pfm<br />

Mistral=c:/psfonts/pfm/mist____.pfm<br />

.<br />

FontOutline<br />

Code-128=Code_128.pfa<br />

ArialMT=Arial.ttf<br />

.<br />

HostFont<br />

Wingdings=Wingdings<br />

.<br />

Encoding<br />

myencoding=myencoding.enc<br />

.<br />

ICCProfile<br />

highspeedprinter=cmykhighspeed.icc<br />

.<br />

UPR <br />

<br />

<br />

<br />

set_<br />

parameter( ) <br />

<br />

<br />

> PDFLIBRESOURCE <br />

<br />

> PDFLIBRESOURCE <br />

<br />

pdflib.upr<br />

3.1 <strong>PDFlib</strong> 57


<br />

HKLM\Software\<strong>PDFlib</strong>\<strong>PDFlib</strong>8\8.0.1\resourcefile<br />

HKLM\Software\<strong>PDFlib</strong>\<strong>PDFlib</strong>8\resourcefile<br />

HKLM\Software\<strong>PDFlib</strong>\resourcefile<br />

<br />

<br />

<br />

<br />

<br />

<br />

regedit <br />

... <br />

<br />

%systemroot%\syswow64\regedit<br />

64 Windows 64<br />

<strong>PDFlib</strong> Windows 64 64<br />

32 <strong>PDFlib</strong> 32 <br />

32 <br />

32 regedit <br />

... <br />

<br />

> resourcefile <br />

<br />

p.set_parameter("resourcefile", "///pdflib.upr");<br />

<br />

<br />

<br />

set_parameter( ) <br />

<br />

<br />

<br />

p.set_parameter("FontAFM", "Foobar-Bold=foobb___.afm");<br />

p.set_parameter("FontOutline", "Foobar-Bold=foobb___.pfa");<br />

116 5.4.3 <br />

get_parameter( ) <br />

<br />

<br />

s = p.get_parameter("SearchPath", n);<br />

58 3 : <strong>PDFlib</strong> COM .NET REALbasic


n <br />

n <br />

<br />

3.1.4 PDF <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

end_document( ) <br />

<br />

<br />

<br />

<br />

<br />

createpvf <br />

<br />

<br />

PDF begin_<br />

document( ) get_buffer( ) <br />

p.begin_document("", "");<br />

......<br />

p.end_document("");<br />

buf = p.get_buffer();<br />

... PDF ...<br />

p.delete();<br />

PDF <br />

3.1.5 PDF <br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

begin_document( )<br />

3.1 <strong>PDFlib</strong> 59


objectstreams={other} <br />

<br />

objectstreams <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

3.1.6 <strong>PDFlib</strong> EBCDIC <br />

<br />

60 3 : <strong>PDFlib</strong> COM .NET REALbasic


3.2 <br />

3.2.1 <br />

<br />

<br />

<br />

1 pt = 1/72 inch = 25.4/72 mm = 0.3528 mm<br />

<br />

<br />

<br />

rotate( ) scale( ) translate( ) skew( ) <br />

<br />

<br />

<br />

<br />

p.scale(28.3465, 28.3465);<br />

<br />

72 2.54 = 28.3465 <br />

begin/end_page_ext( ) userunit <br />

<br />

<br />

<br />

general/metric_topdown_coordinates <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

usercoordinates true <br />

p.set_parameter("usercoordinates", "true");<br />

<br />

<br />

<br />

<br />

<br />

usercoordinates true<br />

<br />

<br />

3.2 61


grid.pdf <br />

<br />

<br />

<br />

<br />

<br />

<br />

... <br />

<br />

<br />

<br />

<br />

<br />

> / : <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

fit_textline( ) fit_<br />

textflow( ) fit_image( ) fit_pdi_page( ) rotate <br />

<br />

orientate <br />

p.fit_textline("", 50.0, 700.0, "rotate=45");<br />

text_output/rotated_text <br />

translate( ) rotate( ) <br />

(200, 100) <br />

(0, 0) <br />

<br />

<br />

p.save();<br />

p.translate(200, 100);<br />

/* */<br />

p.rotate(45.0); /* */<br />

p.rect(0.0, 0.0, 75.0, 25.0); /* */<br />

p.stroke();<br />

p.restore();<br />

<br />

<br />

<br />

<br />

<br />

<br />

62 3 : <strong>PDFlib</strong> COM .NET REALbasic


topdown <br />

(0, 0) <br />

y <br />

y <br />

begin_page_ext( ) topdown <br />

<br />

p.begin_page_ext(595.0, 842.0, "topdown");<br />

topdown <br />

<br />

<br />

<br />

<br />

> <br />

moveto( ) x y circle( ) x y rect( ) x y width height <br />

add_note( ) llx lly urx ury<br />

<br />

> <br />

> <br />

<br />

> <br />

(0, 0) <br />

general/metric_topdown_coordinates <br />

<br />

3.2.2 <br />

pagination/page_sizes <br />

begin/end_page_ext( ) width height <br />

< >.width < <br />

>.height < > <br />

a4.width<br />

<br />

<br />

<br />

<br />

<br />

begin/end_page_ext( ) userunit <br />

<br />

<br />

<br />

<br />

3.2 63


userunit<br />

<br />

<br />

<br />

userunit <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

/* CropBox */<br />

p.begin_page_ext(595, 842, "cropbox={10 10 500 800}");<br />

<br />

<br />

<br />

3.2.3 <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

> <br />

<br />

64 3 : <strong>PDFlib</strong> COM .NET REALbasic


moveto( ) lineto( ) rect( ) <br />

<br />

stroke ( ) fill( ) clip( ) <br />

<br />

save( ) restore( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

p.setcolor("stroke", "rgb", 1, 0, 0, 0);<br />

p.moveto(100, 100);<br />

p.lineto(200, 100);<br />

p.stroke();<br />

<br />

<br />

graphics/starter_graphics <br />

<br />

<br />

add_path_point( ) <br />

add_path_point( ) <br />

<br />

<br />

> draw_path( ) <br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

> <br />

delete_path( ) <br />

info_path( ) <br />

<br />

<br />

path = p.add_path_point( -1, 0, 100, "move", "");<br />

path = p.add_path_point(path, 200, 100, "control", "");<br />

path = p.add_path_point(path, 0, 100, "circular", "");<br />

p.draw_path(path, 0, 0, "stroke");<br />

p.draw_path(path, 400, 500, "stroke");<br />

p.delete_path(path);<br />

3.2 65


image = p.load_image("auto", "image.tif", "clippingpathname={path 1}");<br />

/* */<br />

path = (int) p.info_image(image, "clippingpath", "");<br />

if (path == -1)<br />

throw new Exception(" : !");<br />

p.draw_path(path, 0, 0, "stroke");<br />

3.2.4 <br />

PDF XObject <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

fit_<br />

image( ) <br />

<br />

<br />

/* */<br />

template = p.begin_template_ext(template_width, template_height, "");<br />

......<br />

p.end_template_ext(0, 0);<br />

...<br />

p.begin_page(page_width, page_height);<br />

/* */<br />

p.fit_image(template, 0.0, 0.0, "");<br />

......<br />

p.end_page();<br />

...<br />

p.close_image(template);<br />

<br />

<br />

> load_image( ) <br />

<br />

66 3 : <strong>PDFlib</strong> COM .NET REALbasic


<br />

general/repeated_contents <br />

3.2.5 PDF <br />

pdfx/starter_pdfx5g <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

XObject <br />

<br />

<br />

<br />

<br />

<br />

<br />

> ... XObject <br />

<br />

> ... <br />

<br />

> ... <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

proxy = p.begin_template_ext(0, 0,<br />

"reference={filename=target.pdf pagenumber=1 strongref=true}");<br />

if (proxy == -1 )<br />

{<br />

/* */<br />

}<br />

3.2 67


3.3 PDF<br />

3.3.1 PDF <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

There is nothing inherent in PDF encryption that enforces the document permissions<br />

specified in the encryption dictionary. It is up to the implementors of PDF viewers to respect the<br />

intent of the document creator by restricting user access to an encrypted PDF file according to<br />

the permissions contained in the file. <br />

<br />

<br />

<br />

Unicode <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

68 3 : <strong>PDFlib</strong> COM .NET REALbasic


3.3.2 <strong>PDFlib</strong> <br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

begin_document( ) userpasswordmasterpassword <br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

<br />

<br />

<br />

> <br />

<br />

begin_document( ) permissions <br />

permissions <br />

masterpassword <br />

<br />

<br />

3.3 PDF 69


p.begin_document(filename, "masterpassword=abcd1234 permissions={noprint nocopy}");<br />

<br />

general/permission_settings<br />

<br />

<br />

3.4 begin_document( ) permissions <br />

<br />

noprint<br />

nomodify<br />

nocopy<br />

noannots<br />

noforms<br />

noaccessible<br />

noassemble<br />

nohiresprint<br />

plainmetadata<br />

<br />

Acrobat <br />

Acrobat <br />

Acrobat <br />

<br />

Acrobat <br />

PDF 1.4 nomodify noannots Acrobat <br />

<br />

PDF 1.4 Acrobat <br />

<br />

PDF 1.4 nomodify Acrobat <br />

<br />

PDF 1.4 Acrobat noprint <br />

<br />

<br />

PDF 1.5 XMP<br />

<br />

PDF <br />

<br />

PDF <br />

<br />

begin_document( ) <br />

attachmentpassword <br />

70 3 : <strong>PDFlib</strong> COM .NET REALbasic


3.4 Web PDF<br />

<br />

Web <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> begin_document( )linearize<br />

<br />

p.begin_document(outfilename, "linearize");<br />

<br />

Web <br />

> <br />

<br />

<br />

> <br />

<br />

... Web <br />

<br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

<br />

<br />

begin_document( ) inmemory <br />

<br />

3.4 Web PDF 71


3.5 <br />

<strong>PDFlib</strong> API <br />

<strong>PDFlib</strong> color <br />

color/starter_color <br />

<br />

3.5.1 <br />

<br />

<br />

<br />

<br />

<br />

<br />

> begin_pattern( ) end_pattern( ) <br />

<br />

> begin_pattern( ) setcolor( ) <br />

<br />

begin_pattern( ) painttype <br />

painttype <br />

painttype <br />

<br />

<br />

<br />

graphics/fill_patternimages/tiling_pattern <br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

<br />

shading( ) c1 c2 c3 c4 <br />

setcolor( ) <br />

shading( ) <br />

<br />

> shfill( ) <br />

<br />

clip( )<br />

<br />

> <br />

shading_pattern( ) <br />

<br />

72 3 : <strong>PDFlib</strong> COM .NET REALbasic


color/color_gradient <br />

3.5.2 Pantone HKS <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

makespotcolor( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

spotcolorlookup <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

<strong>PDFlib</strong> GmbH <br />

color/spot_color <br />

PANTONE® <br />

® <br />

<br />

®® <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

preserveoldpantonenames true <br />

3.5 73


PANTONE <br />

<br />

C <br />

<br />

<br />

<br />

<br />

spot = p.makespotcolor("PANTONE 281 U");<br />

p.setcolor("fill", "spot", spot, 0.7, 0, 0);<br />

® <br />

® <br />

Pantone, Inc. Pantone, Inc. © Pantone, Inc., 2003.<br />

® PDF/X-1a <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

74 3 : <strong>PDFlib</strong> COM .NET REALbasic


HKS® <br />

<br />

Farbfächer <br />

<br />

<br />

> (Kunstdruckpapier) (HKS 43<br />

K)<br />

> (Naturpapier) (HKS 43 N)<br />

> (Endlospapier) (HKS 43 E)<br />

> (Zeitungspapier) (HKS 43 Z)<br />

<br />

<br />

<br />

<br />

<br />

HKS <br />

<br />

N HKS<br />

<br />

<br />

<br />

<br />

<br />

spot = p.makespotcolor("HKS 38 E");<br />

p.setcolor("fill", "spot", spot, 0.7, 0, 0);<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

3.5 75


p.setcolor("fill", "cmyk", 0.2, 1.0, 0.2, 0); /* CMYK */<br />

spot = p.makespotcolor("CompanyLogo"); /* */<br />

p.setcolor("fill", "spot", spot, 1, 0, 0); /* */<br />

3.5.3 ICC <br />

<br />

<br />

color/iccprofile_to_image <br />

CIE L*a*b* setcolor( ) lab <br />

<br />

lab <br />

<br />

<br />

<br />

<br />

<br />

<br />

load_image( ) <br />

renderingintent <br />

create_<br />

gstate( ) renderingintent <br />

ICC <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

ICC www.pdflib.com <br />

ICC <br />

ICC load_iccprofile( ) profilename <br />

<br />

1. www.color.org <br />

76 3 : <strong>PDFlib</strong> COM .NET REALbasic


profilename=sRGB <br />

<br />

> ICCProfile profilename <br />

<br />

profilename <br />

> <br />

<br />

<br />

.icc<br />

.icm<br />

/<br />

/.icc<br />

/.icm<br />

colordir <br />

C:\WINNT\system32\ spool\drivers\color <br />

colordir <br />

/System/Library/ColorSync/Profiles<br />

/Library/ColorSync/Profiles<br />

/Network/Library/ColorSync/Profiles<br />

~/Library/ColorSync/Profiles<br />

colordir <br />

sRGB sRGB ICC <br />

<br />

<br />

<br />

<br />

<br />

<br />

load_iccprofile( ) profilename=sRGB <br />

ICC <br />

<br />

<br />

<br />

honoriccprofile <br />

<br />

<br />

<br />

<br />

<br />

image:iccprofile <br />

<br />

<br />

icccomponents <br />

<br />

3.5 77


ICC <br />

<br />

load_image( ) iccprofile <br />

ICC <br />

<br />

setcolor:iccprofilegray setcolor:iccprofilergb setcolor:iccprofilecmyk <br />

<br />

iccbasedgray iccbasedrgb <br />

iccbasedcmyk setcolor( ) <br />

<br />

p.set_parameter("errorpolicy", "return");<br />

icchandle = p.load_iccprofile(...);<br />

if (icchandle == -1)<br />

{<br />

return;<br />

}<br />

p.set_value("setcolor:iccprofilecmyk", icchandle);<br />

p.setcolor("fill", "iccbasedcmyk", 0, 1, 0, 0);<br />

ICC <br />

<br />

<br />

<br />

<br />

begin_page_ext( ) defaultgray defaultrgb defaultcmyk <br />

<br />

<br />

<br />

/* sRGB */<br />

icchandle = p.load_iccprofile("sRGB", 0, "usage=iccbased");<br />

p.begin_page_ext(595, 842, "defaultrgb=" + icchandle);<br />

PDF/X PDF/A <br />

load_<br />

iccprofile( ) usage=outputintent <br />

<br />

<br />

<br />

78 3 : <strong>PDFlib</strong> COM .NET REALbasic


3.6 <br />

<br />

<strong>PDFlib</strong> interactive <br />

<br />

3.6.1 <br />

<br />

<br />

<br />

<br />

> www.kraxi.com www.kraxi.com <br />

<br />

> <br />

<br />

> <br />

> <br />

<br />

<br />

> <br />

<br />

<br />

Web www.kraxi.com <br />

matchbox<br />

name=kraxi <br />

<br />

URI Web <br />

<br />

<br />

Link <br />

action activate <br />

act <br />

<br />

linewidth=0 <br />

3.1<br />

<br />

<br />

3.6 79


normalfont = p.load_font("Helvetica", "unicode", "");<br />

p.begin_page_ext(pagewidth, pageheight, "topdown");<br />

/* Kraxi Systems, Inc. */<br />

String optlist =<br />

"font=" + normalfont + " fontsize=8 position={left top} " +<br />

"matchbox={name=kraxi} fillcolor={rgb 0 0 1} underline";<br />

p.fit_textline("Kraxi Systems, Inc.", 2, 20, optlist);<br />

/* URI */<br />

optlist = "url={http://www.kraxi.com}";<br />

int act = p.create_action("URI", optlist);<br />

/* kraxiLink */<br />

optlist = "action={activate " + act + "} linewidth=0 usematchbox={kraxi}";<br />

/* 0 */<br />

p.create_annotation(0, 0, 0, 0, "Link", optlist);<br />

p.end_page_ext("");<br />

<br />

<br />

interactive/link_annotations <br />

<br />

<br />

paper_planes_catalog.pdf <br />

GoToR <br />

filename destination <br />

<br />

page 2 type fixed <br />

left 50 top 200 zoom 2 <br />

String optlist =<br />

"filename=paper_planes_catalog.pdf " +<br />

"destination={page 2 type fixed left 50 top 200 zoom 2}";<br />

goto_action = p.create_action("GoToR", optlist);<br />

action <br />

activate <br />

goto_action fontstyle bold <br />

textcolor {rgb 0 0 1} <br />

<br />

String<br />

optlist=<br />

"action={activate " + goto_action + " } fontstyle=bold textcolor={rgb 0 0 1}";<br />

catalog_bookmark = p.create_bookmark("Our Paper Planes Catalog", optlist);<br />

<br />

interactive/nested_bookmarks <br />

<br />

80 3 : <strong>PDFlib</strong> COM .NET REALbasic


FileAttachment <br />

filename mimetype image/gif <br />

<br />

iconname pushpin <br />

annotcolor {rgb 1 0 0} contents {Get the Kraxi Paper Plane!} <br />

display noprint<br />

String optlist =<br />

"filename=kraxi_logo.gif mimetype=image/gif iconname=pushpin " +<br />

"annotcolor={rgb 1 0 0} contents={Get the Kraxi Paper Plane!} display=noprint";<br />

p.create_annotation(left_x, left_y, right_x, right_y, "FileAttachment", optlist);<br />

iconname <br />

<br />

3.6.2 JavaScript<br />

<br />

<br />

Named <br />

<br />

<br />

print_action = p.create_action("Named", "menuname=Print");<br />

button_font = p.load_font("Helvetica-Bold", "unicode", "");<br />

action <br />

up <br />

print_action backgroundcolor {rgb 1 1 0} <br />

bordercolor {rgb 0 0 0} <br />

caption Print Print tooltip {Print the document} <br />

font button_font <br />

<br />

<br />

print_buttonpushbutton <br />

String optlist =<br />

"action {up " + print_action + "} backgroundcolor=yellow " +<br />

"bordercolor=black caption=Print tooltip={Print the document} font=" +<br />

button_font;<br />

p.create_field(left_x, left_y, right_x, right_y, "print_button", "pushbutton", optlist);<br />

Print <br />

print_<br />

icon.jpg icon <br />

print_icon <br />

<br />

print_icon = p.load_image("auto", "print_icon.jpg", "template");<br />

if (print_icon == -1)<br />

{<br />

3.6 81


* */<br />

return;<br />

}<br />

p.begin_page_ext(pagewidth, pageheight, "");<br />

...<br />

String optlist = "action={up " + print_action + "} icon=" + print_icon +<br />

" tooltip={Print the document} font=" + button_font;<br />

p.create_field(left_x, left_y, right_x, right_y, "print_button", "pushbutton", optlist);<br />

interactive/form_pushbutton <br />

<br />

<br />

<br />

textfield date<br />

<br />

textfield_font = p.load_font("Helvetica-Bold", "unicode", "");<br />

String optlist = "backgroundcolor={gray 0.8} font=" + textfield_font;<br />

p.create_field(left_x, left_y, right_x, right_y, "date", "textfield", optlist);<br />

auto <br />

<br />

<br />

<br />

interactive/form_textfield_layout <br />

interactive/form_textfield_height <br />

JavaScript <br />

<br />

JavaScript JavaScript <br />

script <br />

date <br />

<br />

String optlist =<br />

"script={var d = util.printd('mmm dd yyyy', new Date()); "<br />

"var date = this.getField('date'); date.value = d;}"<br />

show_date = p.create_action("JavaScript", optlist);<br />

action <br />

show_date open <br />

<br />

String optlist = "action={open " + show_date + "}";<br />

p.begin_page_ext(pagewidth, pageheight, optlist);<br />

<br />

<br />

textfield_font = p.load_font("Helvetica-Bold", "winansi", "");<br />

String optlist = "backgroundcolor={gray 0.8} font=" + textfield_font;<br />

p.create_field(left_x, left_y, right_x, right_y, "date", "textfield", optlist);<br />

82 3 : <strong>PDFlib</strong> COM .NET REALbasic


interactive/form_textfield_fill_with_js <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

create_field( ) action <br />

<br />

<br />

keystroke format <br />

<br />

<br />

keystroke format <br />

<br />

<br />

keystroke_action = p.create_action("JavaScript",<br />

"script={AFNumber_Keystroke(2, 0, 3, 0, \"EUR \", true); }");<br />

format_action = p.create_action("JavaScript",<br />

"script={AFNumber_Format(2, 0, 0, 0, \"EUR \", true); }");<br />

String optlist = "font=" + font + "action={keystroke " + keystroke_action +<br />

" format=" + format_action + "}";<br />

p.create_field(50, 500, 250, 600, "price", "textfield", optlist);<br />

interactive/form_textfield_input_format <br />

<br />

<br />

<br />

keystroke format <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

3.6 83


nDec<br />

sepStyle<br />

negStyle<br />

strCurrency<br />

<br />

<br />

<br />

0 1,234.56<br />

1 <br />

2 1.234,56<br />

3 1234,56<br />

<br />

0 <br />

1 <br />

2 <br />

3 <br />

\u20AC <br />

bCurrency-<br />

Prepend<br />

false<br />

true<br />

<br />

<br />

cFormat<br />

tFormat<br />

psf<br />

<br />

<br />

d <br />

dd <br />

ddd <br />

m <br />

mm <br />

mmm <br />

mmmm <br />

yyyy <br />

yy <br />

<br />

h <br />

hh <br />

H <br />

HH <br />

M <br />

MM <br />

s <br />

ss <br />

t <br />

tt <br />

<br />

0 <br />

1 <br />

2 <br />

3 <br />

84 3 : <strong>PDFlib</strong> COM .NET REALbasic


3.7 PDF<br />

interactive/starter_geospatial <br />

<br />

3.7.1 GeoPDF Acrobat <br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

> <br />

... <br />

<br />

> begin/end_page_ext( ) <br />

viewports <br />

georeference <br />

<br />

<br />

> load_image( ) georeference <br />

<br />

3.7.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

EPSG <br />

<br />

<br />

<br />

<br />

www.epsg.org<br />

3.7 PDF 85


WKT Well-known text <br />

OpenGIS®<br />

Implementation Specification: Coordinate Transformation Services <br />

<br />

<br />

www.opengeospatial.org/standards/ct<br />

<br />

<br />

<br />

<br />

<br />

www.spatialreference.org/ref/epsg<br />

3.7.3 <br />

<br />

georeference<br />

worldsystem <br />

worldsystem={type=geographic wkt={<br />

GEOGCS["WGS 84",<br />

DATUM["WGS_1984", SPHEROID["WGS 84", 6378137, 298.257223563]],<br />

PRIMEM["Greenwich", 0],<br />

UNIT["degree", 0.01745329251994328]]<br />

}}<br />

<br />

<br />

worldsystem={type=geographic wkt={<br />

GEOGCS["ETRS_1989",<br />

DATUM["ETRS_1989", SPHEROID["GRS_1980", 6378137.0, 298.257222101]],<br />

PRIMEM["Greenwich", 0.0],<br />

UNIT["Degree", 0.0174532925199433]]<br />

}}<br />

WGS84 ETRS EPSG Acrobat <br />

EPSG <br />

<br />

<br />

<br />

<br />

georeference <br />

worldsystem <br />

worldsystem={type=projected wkt={<br />

PROJCS["ETRS_1989_UTM_Zone_32N",<br />

GEOGCS["GCS_ETRS_1989",<br />

DATUM["D_ETRS_1989", SPHEROID["GRS_1980", 6378137.0, 298.257222101],<br />

TOWGS84[0, 0, 0, 0, 0, 0, 0]],<br />

PRIMEM["Greenwich", 0.0],<br />

86 3 : <strong>PDFlib</strong> COM .NET REALbasic


}}<br />

UNIT["Degree", 0.0174532925199433]],<br />

PROJECTION["Transverse_Mercator"],<br />

PARAMETER["False_Easting", 500000.0],<br />

PARAMETER["False_Northing", 0.0],<br />

PARAMETER["Central_Meridian", 9.0],<br />

PARAMETER["Scale_Factor", 0.9996],<br />

PARAMETER["Latitude_Of_Origin", 0.0],<br />

UNIT["Meter", 1.0]]<br />

<br />

<br />

worldsystem={type=projected epsg=25832}<br />

3.7.4 Acrobat 9 GeoPDF <br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

open_pdi_page( ) begin_template_ext( ) georeference <br />

<br />

<br />

begin_page_ext( ) viewports <br />

> <br />

<br />

<br />

<br />

load_image( ) <br />

<br />

<br />

<br />

<br />

> <br />

<br />

3.7 PDF 87


88 3 : <strong>PDFlib</strong> COM .NET REALbasic


4Unicode<br />

<br />

<br />

<br />

4.1 Unicode <br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

BMP PUA <br />

> BMP <br />

<br />

<br />

> PUA <br />

<br />

<br />

<br />

<br />

4.1<br />

<br />

<br />

4.1 Unicode 89


Unicode UTF <br />

<br />

<br />

<br />

<br />

> UTF-8 <br />

<br />

<br />

 à <br />

> UTF-16 <br />

<br />

<br />

<br />

<br />

<br />

> UTF-32 <br />

text_output/process_utf8 <br />

Unicode BOM <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

þÿ<br />

ÿþ<br />

þÿ<br />

ÿþ<br />

<br />

90 4 : Unicode COM .NET REALbasic


4.2 8 <br />

<br />

<br />

<br />

.notdef <br />

<br />

<br />

<br />

<strong>PDFlib</strong> chartab <br />

<br />

macroman <br />

<br />

<br />

macroman_apple <br />

macroman <br />

> macroman_apple <br />

<br />

> macroman_apple <br />

macroman_apple<br />

<br />

<br />

host <br />

<br />

<br />

> ebcdic <br />

> ebcdic_37 <br />

> winansi <br />

> iso8859-1 <br />

<br />

<br />

<br />

<br />

host <br />

<br />

<br />

<br />

<br />

<br />

auto <br />

<br />

> <br />

> iso8859-1 auto <br />

macroman <br />

> IBMCCSID000000000000<br />

4.2 8 91


winansi cp1252 ISO8859-1 <br />

macroman <br />

<br />

macroman_<br />

apple<br />

macroman <br />

<br />

<br />

ebcdic <br />

ebcdic_37 <br />

pdfdoc <br />

iso8859-1 <br />

iso8859-2 <br />

iso8859-3 <br />

iso8859-4 <br />

iso8859-5 <br />

iso8859-6 <br />

iso8859-7 <br />

<br />

iso8859-8 <br />

iso8859-9 <br />

iso8859-10 <br />

<br />

iso8859-13 <br />

iso8859-14 <br />

iso8859-15 <br />

<br />

iso8859-16 <br />

<br />

cp1250 <br />

cp1251 <br />

cp1252 <br />

cp1253 <br />

<br />

cp1254 <br />

cp1255 <br />

cp1256 <br />

<br />

cp1257 <br />

cp1258 <br />

<br />

<br />

<br />

<br />

<br />

92 4 : Unicode COM .NET REALbasic


ebcdic <br />

auto builtin <br />

<br />

<br />

<br />

8 <br />

<br />

<br />

<br />

<br />

<br />

<br />

encoding_<br />

set_char( )) <br />

> <br />

> <br />

set_parameter( ) <br />

> <br />

<br />

<br />

<br />

% <strong>PDFlib</strong><br />

% Unicode<br />

space 32 0x0020<br />

exclam 33 0x0021<br />

...<br />

<br />

<br />

% <strong>PDFlib</strong>Unicode<br />

% Unicode <br />

0x0020 32<br />

0x0021 33<br />

...<br />

<br />

<br />

> <br />

> <br />

0x <br />

<br />

<br />

<br />

> <br />

0x0000 .notdef <br />

<br />

4.2 8 93


<br />

*.enc <br />

*.cpg <br />

<br />

94 4 : Unicode COM .NET REALbasic


4.3 <br />

<br />

<br />

<br />

<br />

<br />

CMap <br />

CMap <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Unicode Unicode CMap UCS2 UTF16 <br />

CMap 97 4.4.2 Unicode <br />

<br />

CMap <br />

<br />

<br />

<br />

CMap <br />

<br />

4.3 95


resource/cmap <br />

> <br />

SearchPath <br />

<br />

p.set_parameter("SearchPath", "///resource/cmap");<br />

SearchPath <br />

PDFLIBRESOURCEFILE <br />

96 4 : Unicode COM .NET REALbasic


4.4 <strong>PDFlib</strong> <br />

4.4.1 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

text <br />

<br />

<br />

<br />

show( ) fit_textline( ) add_textflow( ) text <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

add_table_cell( ) fieldname <br />

define_layer( ) name <br />

create_action( ) destname <br />

create_bookmark( ) text <br />

<br />

<br />

begin_document( ) create_pvf( ) filename <br />

load_font( ) fontname <br />

load_iccprofile( ) profilename <br />

filenamehandling <br />

<br />

4.4.2 Unicode <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

4.4 <strong>PDFlib</strong> 97


> <br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

> <br />

utf16 unicode <br />

<br />

> <br />

<br />

> unicode <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

Unicode <br />

<br />

<br />

<br />

4.4.3 Unicode <br />

<br />

98 4 : Unicode COM .NET REALbasic


4.5 <br />

winansi <br />

macroman ebcdic <br />

<br />

<br />

<br />

<br />

4.5.1 <br />

<br />

<br />

<br />

\t <br />

<br />

<br />

<br />

<br />

\ <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

\f <br />

\n <br />

\r <br />

\t <br />

\v <br />

\\ <br />

\xNN \FF<br />

\NNN \377<br />

<br />

escapesequence true <br />

<br />

p.set_parameter("escapesequence", "true");<br />

fonts/escape_sequences <br />

4.5 99


\x <br />

glyphcheck errorpolicy <br />

<br />

<br />

<br />

4.5.2 <br />

fonts/character_references<br />

<br />

<br />

<br />

<br />

<br />

<br />

HTML <br />

<br />

<br />

www.w3.org/TR/REC-html40/charset.html#h-5.3<br />

<br />

&shy;<br />

&euro;<br />

&lt;<br />

&gt;<br />

&amp;<br />

&Alpha;<br />

U+00AD <br />

U+00AD ()<br />

U+00AD <br />

U+00AD <br />

U+00AD <br />

U+0391 <br />

<br />

<br />

<br />

&#173;<br />

&#xAD;<br />

&#229;<br />

&#xE5;<br />

&#Xe5;<br />

&#x20AC;<br />

&#8364;<br />

U+00AD <br />

U+00AD <br />

U+00AD a (10)<br />

U+00E5 a (16x)<br />

U+00E5 a (16X)<br />

U+20AC (16)<br />

U+20AC (10)<br />

128 159 10 0x80 0x9F 16 winansi <br />

Unicode <br />

<br />

<strong>PDFlib</strong> <br />

<br />

> <br />

> <br />

> <br />

100 4 : Unicode COM .NET REALbasic


&linefeed;<br />

&hortab;<br />

&ZWNJ;<br />

U+000A <br />

U+0009 <br />

U+200C <br />

<br />

> <br />

> <br />

<br />

<br />

<br />

&.three;<br />

&.mapleleaf;<br />

&.T.swash;<br />

U+0033 3<br />

PUA UnicodeCarta<br />

PUA Unicode2<br />

<br />

> <br />

<br />

<br />

<br />

> uniXXXX u1XXXX <br />

<br />

<br />

<br />

charref true <br />

<br />

p.set_parameter("charref", "true");<br />

font = p.load_font("Helvetica", "winansi", "");<br />

if (font == -1) { ... }<br />

p.setfont(font, 24);<br />

p.show_xy("Price: 500&euro;", 50, 500);<br />

<br />

> <br />

<br />

<br />

> builtin unicode<br />

<br />

<br />

> Unichar <br />

&; <br />

charref <br />

> &# & <br />

<br />

glyphcheck errorpolicy glyphcheck=none <br />

<br />

4.5 101


102 4 : Unicode COM .NET REALbasic


5 <br />

5.1 <br />

5.1.1 TrueType <br />

TrueType <br />

<br />

<br />

<br />

<br />

> *.ttf <br />

> *.ttc <br />

<br />

<br />

<br />

> *.tte <br />

eudcedit.exe <br />

> .dfont <br />

<br />

TrueType <br />

<br />

<br />

<br />

TimesNewRomanPSMT Times<br />

New Roman<br />

5.1.2 OpenType <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

*.otf <br />

<br />

> <br />

*.ttf <br />

.ttf <br />

<br />

5.1 103


<br />

<br />

<br />

<br />

<br />

<br />

<br />

5.1.3 PostScript Type 1 <br />

PostScript <br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

PostScript <br />

<br />

<br />

> *.pfa *.pfb /FontName <br />

\ <br />

<br />

> <br />

<br />

> FontName<br />

PostScript Windows <br />

AvantGarde-Demi PostScript AvantGarde, Bold Windows <br />

<br />

104 5 : COM .NET REALbasic


5.1.4 SING <br />

Smart Independent Glyphlets <br />

<br />

<br />

<br />

Adobe Glyphlet Development Kit (GDK) for SING Gaiji Architecture <br />

<br />

www.adobe.com/devnet/opentype/gdk/topic.html<br />

<br />

<br />

<br />

<br />

maingid = (int) p.info_font(font, "maingid", "");<br />

uv = (int) p.info_font(font, "unicode", "gid=" + maingid);<br />

load_font( ) fallbackfonts forcechars gaiji<br />

<br />

<br />

fonts/starter_fallback <br />

<br />

<br />

www.fontlab.com/font-utility/sigmaker/<br />

5.1.5 Type 3 <br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

p.begin_font("Fuzzyfont", 0.001, 0.0, 0.0, 0.001, 0.0, 0.0, "");<br />

p.begin_glyph("circle", 1000, 0, 0, 1000, 1000);<br />

5.1 105


p.arc(500, 500, 500, 0, 360);<br />

p.fill();<br />

p.end_glyph();<br />

p.begin_glyph("ring", 400, 0, 0, 400, 400);<br />

p.arc(200, 200, 200, 0, 360);<br />

p.stroke();<br />

p.end_glyph();<br />

p.end_font();<br />

fonts/starter_type3font fonts/type3_<br />

bitmaptext fonts/type3_rasterlogo fonts/type3_vectorlogo <br />

load_font( ) <br />

<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

x <br />

x glyphname glyphname begin_glyph( ) <br />

<br />

> <br />

.notdef <br />

.notdef <br />

.notdef <br />

> <br />

<br />

mask <br />

<br />

> interpolate <br />

<br />

> <br />

load_font( ) <br />

<br />

106 5 : COM .NET REALbasic


5.2 Unicode <br />

5.2.1 ID<br />

<br />

<br />

.notdef <br />

.notdef <br />

<br />

info_font( ) numglyphs <br />

<br />

<br />

> <br />

<br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

5.2.2 Unicode <br />

Unicode <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

PUA <br />

<br />

<br />

<br />

info_font( ) unmappedglyphs <br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

5.2 Unicode 107


<br />

> <br />

<br />

<br />

TrueType OpenType SING Unicode <br />

cmap cmap load_<br />

font( ) <br />

<br />

<br />

cmap <br />

post <br />

<br />

cmap post <br />

<br />

<br />

<br />

<br />

Type 1 Unicode <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Type 3 Unicode <br />

<br />

begin_glyph( ) glyphname <br />

<br />

<br />

<br />

<br />

5.2.3 Unicode <br />

<br />

<br />

1. AGL partners.adobe.com/public/developer/en/opentype/glyphlist.txt <br />

108 5 : COM .NET REALbasic


<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

&NBSP; &SHY; encoding=glyphid <br />

<br />

5.2.4 <br />

<br />

<br />

<br />

<br />

<br />

> unicode <br />

&euro; &#x20AC; <br />

> winansi <br />

> iso8859-1 <br />

iso8859-15 iso8859-1 <br />

<br />

> macroman <br />

<br />

<br />

macroman macroman_apple <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

5.2 Unicode 109


5.3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

5.3.1 Unicode <br />

encoding=glyphid <br />

<br />

> <br />

<br />

<br />

> cp932 <br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

glyphcheck errorpolicy <br />

glyphid builtin <br />

110 5 : COM .NET REALbasic


5.3.2 Unicode ID <br />

<br />

encoding=glyphid <br />

<br />

> <br />

> encoding=glyphid replacementchar glyphcheck=replace <br />

glyphcheck=none glyphcheck=error <br />

<br />

fallbackfonts forcechars<br />

<br />

<br />

ID <br />

<br />

glyphcheck <br />

<br />

> glyphcheck=none .notdef <br />

.notdef <br />

<br />

<br />

<br />

> glyphcheck=replace <br />

<br />

> glyphcheck=error errorpolicy=return <br />

<br />

add/create_textflow( ) errorpolicy=exception <br />

<br />

glyphcheck=replace <br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

U+00A0 () U+0020 ()<br />

U+00AD () U+002D (-)<br />

U+2010 () U+002D (-)<br />

U+03BC () U+00C5 ()<br />

U+212B () U+00B5 (A)<br />

U+220F () U+03A0 ()<br />

U+2126 () U+03A9 ()<br />

5.3 111


ff <br />

f f <br />

> <br />

<br />

A.swash A g.alt g <br />

replacementchar <br />

<br />

replacementchar <br />

<br />

<br />

<br />

<br />

fonts/glyph_replacement <br />

5.3.3 ID <br />

<br />

<br />

<br />

keepnative=true <br />

<br />

<br />

vert <br />

<br />

OpenType <br />

<br />

<br />

<br />

<br />

features <br />

<br />

<br />

<br />

shaping <br />

112 5 : COM .NET REALbasic


5.4 <br />

5.4.1 <br />

load_font( ) add/<br />

create_textflow( ) fill_textblock( ) fontnameencoding <br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Unicode encoding=unicode <br />

<br />

<br />

<br />

<br />

<br />

encoding=unicode <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

encoding=unicode <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

font doesn't support encoding <br />

1. www.unicode.org <br />

5.4 113


<br />

<br />

> <br />

encoding_set_char( ) <br />

<br />

> <br />

<br />

<br />

<br />

<br />

encoding=builtin <br />

<br />

<br />

> cmap <br />

(3, 0) <br />

> <br />

<br />

> <br />

> <br />

<br />

info_font( ) symbolfont <br />

false <br />

<br />

symbolfont true <br />

<br />

<br />

encoding=builtin <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

encoding=unicode <br />

<br />

keepnative true <br />

<br />

114 5 : COM .NET REALbasic


ID encoding=glyphid <br />

<br />

<br />

<br />

info_font( ) maxcode <br />

<br />

<br />

<br />

encoding=glyphid <br />

<br />

5.4.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> encoding=unicode <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

encoding=builtin <br />

<br />

<br />

encoding=unicode <br />

<br />

> <br />

> <br />

<br />

> <br />

charmap <br />

<br />

5.4 115


info_font( ) <br />

<br />

<br />

encoding=builtin <br />

<br />

<br />

<br />

<br />

<br />

encoding=unicode <br />

encoding=builtin <br />

5.4.3 <br />

load_font( ) <br />

fontname <br />

encoding <br />

<br />

<br />

info_font( ) apiname <br />

load_font( ) <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

<br />

> <br />

> begin_font( ) <br />

fonts/font_resources <br />

<br />

<br />

<br />

> <br />

<br />

> begin_font( ) <br />

<br />

> <br />

FontOutline <br />

> <br />

FontAFM FontPFM <br />

> <br />

HostFont <br />

116 5 : COM .NET REALbasic


<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

Font file (AFM, PFM, TTF, OTF etc.) or host font not found<br />

<br />

<br />

<br />

TrueType OpenType <br />

FontOutline <br />

<br />

p.set_parameter("FontOutline", "Arial=/usr/fonts/Arial.ttf");<br />

font = p.load_font("Arial", "unicode", "embedding");<br />

<br />

p.set_parameter("FontOutline", "f1=/usr/fonts/Arial.ttf");<br />

font = p.load_font("f1", "unicode", "embedding");<br />

set_parameter( ) FontOutline <br />

<br />

SearchPath <br />

SearchPath <br />

p.set_parameter("SearchPath", "/usr/fonts");<br />

p.set_parameter("FontOutline", "f1=Arial.ttf");<br />

font = p.load_font("f1", "unicode", "");<br />

TrueType <br />

<br />

<br />

p.set_parameter("FontOutline", "MS-Gothic=msgothic.ttc");<br />

font = p.load_font("MS-Gothic", "unicode", "embedding");<br />

<br />

n n<br />

<br />

p.set_parameter("FontOutline", "f1=msgothic.ttc");<br />

font = p.load_font("f1:0", "unicode", "");<br />

5.4 117


PostScript Type 1 <br />

FontAFM<br />

FontPFM <br />

p.set_parameter("FontPFM", "lucidux=LuciduxSans.pfm");<br />

font = p.load_font("lucidux", "unicode", "embedding");<br />

<br />

FontOutline <br />

<br />

p.set_parameter("FontPFM", "lucidux=LuciduxSans.pfm");<br />

p.set_parameter("FontOutline", "lucidux=LuciduxSans.pfa");<br />

font = p.load_font("lucidux", "unicode", "embedding");<br />

FontOutline <br />

<br />

<br />

SearchPath<br />

<br />

<br />

<br />

<br />

<br />

Courier Courier-Bold Courier-Oblique Courier-BoldOblique <br />

Helvetica Helvetica-Bold Helvetica-Oblique Helvetica-BoldOblique <br />

Times-Roman Times-Bold Times-Italic Times-BoldItalic <br />

Symbol ZapfDingbats<br />

<br />

<br />

embedding FontOutline<br />

<br />

<br />

font = p.load_font("Times-Roman", "unicode", "");<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

font = p.load_font("Verdana", "unicode", "");<br />

<br />

<br />

118 5 : COM .NET REALbasic


font = p.load_font("Verdana,Bold", "unicode", "");<br />

<br />

HostFont <br />

<br />

<br />

<br />

p.set_parameter("HostFont", "Symbol=Symbol");<br />

font = p.load_font("Symbol", "unicode", "embedding");<br />

<br />

<br />

<br />

<br />

<br />

SearchPath <br />

<br />

<br />

<br />

> <br />

<br />

<br />

.tte .ttf .otf .gai .afm .pfm .ttc<br />

.TTE .TTF .OTF .GAI .AFM .PFM .TTC<br />

> <br />

<br />

<br />

.pfa .pfb<br />

.PFA .PFB<br />

<br />

<br />

Font cannot be embedded (PFA or PFB font file not found)<br />

> SearchPath <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

p.set_parameter("FontOutline", "Arial=/usr/fonts/Arial.ttf");<br />

font = p.load_font("Arial", "unicode", "");<br />

<br />

5.4 119


p.set_parameter("SearchPath", "/usr/fonts");<br />

font = p.load_font("Arial", "unicode", "");<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> embedding <br />

<br />

<br />

<br />

font = p.load_font("KozGoPro-Medium", "90msp-RKSJ-H", "");<br />

Type 3 <br />

<br />

begin_font( ) load_font( ) <br />

<br />

<br />

p.begin_font("<strong>PDFlib</strong>LogoFont", 0.001, 0.0, 0.0, 0.001, 0.0, 0.0, "");<br />

...<br />

p.end_font();<br />

...<br />

font = p.load_font("<strong>PDFlib</strong>LogoFont", "logoencoding", "");<br />

5.4.4 Windows Mac OS X <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Windows <br />

<br />

<br />

<br />

Bold <br />

Fett <br />

Arial Fett <br />

<br />

<br />

Arial Bold <br />

120 5 : COM .NET REALbasic


,Bold <br />

Font properties<br />

extension <br />

<br />

Windows <br />

<br />

<br />

font = p.load_font("Verdana,Bold", "unicode", "");<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

none, thin, extralight, ultralight, light, normal, regular, medium,<br />

semibold, demibold, bold, extrabold, ultrabold, heavy, black<br />

<br />

italic <br />

<br />

font = p.load_font("Verdana,Bold,Italic", "unicode", "");<br />

<br />

<br />

0 (none), 100 (thin), 200 (extralight), 300 (light), 400 (normal), 500 (medium), 600<br />

(semibold), 700 (bold), 800 (extrabold), 900 (black)<br />

<br />

font = p.load_font("Verdana,700", "unicode", "");<br />

Windows <br />

<br />

<br />

Windows fontstyle <br />

<br />

Windows <br />

<br />

1. www.microsoft.com/typography/TrueTypeProperty21.mspx <br />

5.4 121


... <br />

Fonts <br />

<br />

<br />

<br />

<br />

Fonts <br />

Fonts <br />

<br />

<br />

<br />

<br />

Mac Font Book <br />

<br />

<br />

ftxinstalledfonts <br />

<br />

<br />

<br />

> <br />

<br />

<br />

ftxinstalledfonts -q<br />

> <br />

<br />

<br />

<br />

<br />

ftxinstalledfonts -u<br />

> <br />

<br />

ftxinstalledfonts -p<br />

<strong>PDFlib</strong> Leopard Mac OS X 10.5 3 <br />

Leopard QuickDraw <br />

Mac <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

1. developer.apple.com/textfonts/download <br />

122 5 : COM .NET REALbasic


5.4.5 <br />

text_output/starter_fallback <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

fallbackfonts <br />

<br />

fallbackfonts load_font( ) <br />

<br />

<br />

fallbackfonts <br />

<br />

info_font( ) <br />

<br />

<br />

> <br />

<br />

<br />

> fallbackfonts <br />

<br />

<br />

> <br />

<br />

> shaping script locale <br />

features script language <br />

5.4 123


<br />

<br />

<br />

fit_textline( ) add/create_textflow( ) <br />

underlineposition underlinewidth <br />

<br />

<br />

<br />

<br />

fallbackfonts <br />

<br />

fallbackfonts={{fontname=Symbol encoding=unicode}}<br />

<br />

<br />

<br />

<br />

<br />

fallbackfonts <br />

<br />

<br />

fallbackfonts={<br />

{fontname=Times-Greek encoding=unicode embedding forcechars={U+0391-U+03F5}}<br />

{fontname=Times-Cyrillic encoding=unicode embedding forcechars={U+0401-U+0490}}<br />

}<br />

8 <br />

<br />

<br />

<br />

<br />

fallbackfonts <br />

<br />

fallbackfonts={{fontname=Helvetica encoding=unicode forcechars=euro}}<br />

<br />

&euro; <br />

<br />

<br />

fallbackfonts <br />

<br />

<br />

124 5 : COM .NET REALbasic


fallbackfonts={{fontname=Helvetica encoding=unicode forcechars=euro textrise=-5%}}}<br />

textrise <br />

<br />

<br />

<br />

<br />

fallbackfonts <br />

<br />

fallbackfonts={<br />

{fontname=Times-Italic encoding=unicode forcechars={U+0020-U+00FF} fontsize=120%}<br />

}<br />

fallbackfonts <br />

<br />

fallbackfonts={<br />

{fontname=ZapfDingbats encoding=unicode forcechars=.a12 fontsize=150% textrise=-15%}<br />

}<br />

fontsize textrise <br />

<br />

fallbackfonts <br />

<br />

<br />

fallbackfonts={<br />

{fontname=Courier-Bold encoding=unicode forcechars={U+0020-U+007E}}<br />

}<br />

<br />

<br />

<br />

Unicode BMP Fallback SIL <br />

<br />

fallbackfonts <br />

<br />

<br />

fallbackfonts={{fontname={Unicode BMP Fallback SIL} encoding=unicode}}<br />

<br />

<br />

5.4 125


5.5 <br />

5.5.1 <br />

Acrobat PDF <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

AdobeSansMM AdobeSerifMM <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

embedding <br />

<br />

font = p.load_font("WarnockPro", "winansi", "embedding");<br />

<br />

<br />

<br />

<br />

<br />

<br />

optimizeinvisible <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

embedding=true <br />

<br />

<br />

<br />

<br />

<br />

<br />

embedding=true <br />

<br />

126 5 : COM .NET REALbasic


5.5.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

autosubsetting <br />

> autosubsetting <br />

true <br />

<br />

true <br />

> autosubsetting=true subsetlimit <br />

<br />

<br />

1. OS/2 fsType 2 <br />

5.5 127


p.set_value("subsetlimit", 75); /* 75% */<br />

subsetlimit <br />

load_font( ) <br />

<br />

> autosubsetting=true subsetminsize <br />

<br />

subsetminsize <br />

<br />

TrueType winansi <br />

macroman <br />

<br />

autocidfont <br />

false <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

load_font( ) initialsubset <br />

<br />

<br />

<br />

<br />

<br />

<br />

initialsubset={U+0020-U+00FF}<br />

<br />

<br />

<br />

<br />

begin_document( ) optimize <br />

<br />

Type 3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

128 5 : COM .NET REALbasic


egin_font( ) widthsonly <br />

begin_<br />

font( ) begin_glyph( ) wx <br />

<br />

begin_glyph( ) end_glyph( ) <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

load_font( ) <br />

fonts/type3_subsetting <br />

5.5 129


5.6 <br />

info_font( ) <br />

<br />

<br />

<br />

info_font( ) <br />

<br />

int uv;<br />

int c;<br />

int gid;<br />

int cid;<br />

String gn;<br />

int gn_idx;<br />

String enc;<br />

int font;<br />

<br />

<br />

unicode=euro <br />

<br />

<br />

<br />

<br />

<br />

gn_idx <br />

<br />

gn = p.get_parameter("string", gn_idx);<br />

<br />

load_font( ) <br />

info_font( )<br />

<br />

<br />

<br />

<br />

<br />

5.6.1 Unicode <br />

<br />

info_font( ) font gn<br />

<br />

<br />

<br />

<br />

c = (int) p.info_font(-1, "code", "unicode=" + uv + " encoding=" + enc);<br />

c = (int) p.info_font(-1, "code", "glyphname=" + gn + " encoding=" + enc);<br />

<br />

uv = (int) p.info_font(-1, "unicode", "code=" + c + " encoding=" + enc);<br />

uv = (int) p.info_font(-1, "unicode", "glyphname=" + gn + " encoding=" + enc);<br />

<br />

130 5 : COM .NET REALbasic


gn_idx = (int) p.info_font(-1, "glyphname", "code=" + c + " encoding=" + enc);<br />

gn_idx = (int) p.info_font(-1, "glyphname", "unicode=" + uv + " encoding=" + enc);<br />

/* */<br />

gn = p.get_parameter("string", gn_idx);<br />

Unicode info_font( ) <br />

<br />

<br />

<br />

<br />

uv = (int) p.info_font(-1, "unicode", "glyphname=" + gn + " encoding=unicode");<br />

<br />

gn_idx = (int) p.info_font(-1, "glyphname", "unicode=" + uv + " encoding=unicode");<br />

/* */<br />

gn = p.get_parameter("string", gn_idx);<br />

5.6.2 Unicode <br />

<br />

gn <br />

<br />

<br />

<br />

<br />

c = (int) p.info_font(font, "code", "unicode=" + uv);<br />

c = (int) p.info_font(font, "code", "glyphid=" + gid);<br />

c = (int) p.info_font(font, "code", "glyphname=" + gn);<br />

c = (int) p.info_font(font, "code", "cid=" + cid);<br />

<br />

uv = (int) p.info_font(font, "unicode", "code=" + c);<br />

uv = (int) p.info_font(font, "unicode", "glyphid=" + gid);<br />

uv = (int) p.info_font(font, "unicode", "glyphname=" + gn);<br />

uv = (int) p.info_font(font, "unicode", "cid=" + cid);<br />

<br />

gid = (int) p.info_font(font, "glyphid", "code=" + c);<br />

gid = (int) p.info_font(font, "glyphid", "unicode=" + uv);<br />

gid = (int) p.info_font(font, "glyphid", "glyphname=" + gn);<br />

gid = (int) p.info_font(font, "glyphid", "cid=" + cid);<br />

<br />

<br />

gid = (int) p.info_font(font, "glyphid", "code=" + c + " encoding" + enc);<br />

gid = (int) p.info_font(font, "glyphid", "unicode=" + uv + " encoding=" + enc);<br />

gid = (int) p.info_font(font, "glyphid", "glyphname=" + gn + " encoding=" + enc);<br />

5.6 131


gn_idx = (int) p.info_font(font, "glyphname", "code=" + c);<br />

gn_idx = (int) p.info_font(font, "glyphname", "unicode=" + uv);<br />

gn_idx = (int) p.info_font(font, "glyphname", "glyphid=" + gid);<br />

gn_idx = (int) p.info_font(font, "glyphname", "cid=" + cid);<br />

/* */<br />

gn = p.get_parameter("string", gn_idx);<br />

info_font( ) <br />

<br />

<br />

/* "unicode=U+20AC" */<br />

if (p.info_font(font, "code", "unicode=euro") == -1)<br />

{<br />

/* */<br />

}<br />

fonts/glyph_availability <br />

info_textline( ) <br />

<br />

<br />

<br />

<br />

<br />

String optlist = "font=" + font + " charref";<br />

if (p.info_textline("&euro;", "unmappedchars", optlist) == 1)<br />

{<br />

/* */<br />

}<br />

5.6.3 <br />

info_font( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

String cp="cp1254";<br />

result = (int) p.info_font(font, "codepage", "name=" + cp);<br />

132 5 : COM .NET REALbasic


if (result == -1)<br />

System.err.println("");<br />

else if (result == 0)<br />

System.err.println("");<br />

else<br />

System.err.println("");<br />

<br />

<br />

cp_idx = (int) p.info_font(font, "codepagelist", "");<br />

if (cp_idx == -1)<br />

System.err.println("");<br />

else<br />

{<br />

System.err.println(":");<br />

System.err.println(p.get_parameter("string", cp_idx));<br />

}<br />

<br />

cp1252 cp1250 cp1251 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp874 cp932 cp936 cp949<br />

cp950 cp1361<br />

info_font( ) <br />

<br />

<br />

<br />

result = p.info_font(basefont, "fallbackfont", "unicode=U+03A3");<br />

/* result== */<br />

if (result == -1)<br />

{<br />

/* */<br />

}<br />

else<br />

{<br />

idx = p.info_font(result, "fontname", "api");<br />

fontname = p.get_parameter("string", idx);<br />

}<br />

5.6 133


134 5 : COM .NET REALbasic


6 <br />

6.1 <br />

<br />

> show( ) <br />

> fit_textline( ) <br />

<br />

> fit_textflow( ) <br />

<br />

<br />

> <br />

<br />

show( ) <br />

<br />

<br />

<br />

<br />

<br />

font = p.load_font("Helvetica", "unicode", "");<br />

p.setfont(font, 12);<br />

p.set_text_pos(50, 700);<br />

p.show("Hello world!");<br />

p.continue_text("(says Java)");<br />

fit_textline( ) <br />

<br />

<br />

<br />

load_font( ) <br />

<br />

p.fit_textline(text, x, y, "fontname=Helvetica encoding=unicode fontsize=12");<br />

<br />

<br />

fit_textflow( ) <br />

<br />

<br />

<br />

tf = p.add_textflow(tf, text, optlist);<br />

result = p.fit_textflow(tf, llx, lly, urx, ury, optlist);<br />

p.delete_textflow(tf);<br />

6.1 135


136 6 : COM .NET REALbasic


6.2 <br />

6.2.1 <br />

<br />

textx/texty currentx/currenty <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

leading <br />

<br />

capheight T H <br />

xheight x <br />

ascender f d <br />

descender j p <br />

xheight capheight <br />

ascender descender <br />

<br />

gaplen <br />

gaplen <br />

<br />

<br />

<br />

<br />

info_font( ) faked xheight <br />

<br />

font = p.load_font("Times-Roman", "unicode", "");<br />

capheight = p.info_font(font, "capheight", "");<br />

ascender = p.info_font(font, "ascender", "");<br />

6.1 <br />

font size<br />

capheight<br />

ascender<br />

baseline<br />

descender<br />

6.2 137


descender = p.info_font(font, "descender", "");<br />

xheight = p.info_font(font, "xheight", "");<br />

<strong>PDFlib</strong> <br />

fonts/font_metrics_info <br />

CPI <br />

<br />

<br />

<br />

<br />

<br />

<br />

12 600 1000 7.2 <br />

<br />

<br />

<br />

<br />

<br />

6.2.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

6.2 <br />

<br />

<br />

<br />

138 6 : COM .NET REALbasic


load_font( ) readkerning false <br />

<br />

> kerning <br />

<br />

<br />

<br />

<br />

<br />

features={tnum} <br />

<br />

<br />

<br />

6.2.3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Adobe Acrobat PDF <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

> winansi macroman <br />

<br />

<br />

> embedding false <br />

> <br />

<br />

<br />

<br />

load_font( ) fontstyle <br />

normal bold italic bolditalic <br />

<br />

6.2 139


font = p.load_font("HeiseiKakuGo-W5", "UniJIS-UCS2-H", "fontstyle bold");<br />

fontstyle <br />

<br />

<br />

<br />

<br />

fonts/artificial_fontstyles <br />

<br />

fontstyle <br />

<br />

fakebold <br />

fonts/simulated_fontstyles<br />

<br />

<br />

fontstyle italicangle <br />

<br />

<br />

<br />

<br />

<br />

italicangle <br />

<br />

italicangle <br />

italicangle <br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

fit_textline( ) <br />

shadow <br />

<br />

<br />

<br />

<br />

set_parameter( )<br />

underlineoverlinestrikeout <br />

underlineposition underlinewidth <br />

<br />

<br />

<br />

<br />

140 6 : COM .NET REALbasic


text_output/starter_textline <br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong><br />

API textrendering <br />

<br />

<br />

<br />

<br />

<br />

output/invisible_text <br />

text_output/text_as_clipping_path text_<br />

setcolor( ) <br />

<br />

<br />

<br />

text_output/starter_textline <br />

<br />

6.2 141


6.3 OpenType <br />

text_output/starter_opentype <br />

<br />

6.3.1 OpenType <br />

<br />

<br />

liga f f i <br />

smcp <br />

<br />

onum <br />

<br />

<br />

<br />

<br />

www.microsoft.com/typography/developers/opentype/default.htm<br />

<br />

> features <br />

<br />

> <br />

features <br />

<br />

> <br />

shaping script <br />

vert vertical <br />

> <br />

<br />

<br />

readkerning kerning <br />

<br />

www.microsoft.com/typography/otspec/featuretags.htm<br />

OpenType <br />

<br />

> <br />

www.fontlab.com <br />

> www.fonttools.org <br />

<br />

> <br />

<br />

> info_font( ) <br />

<br />

1. www.microsoft.com/typography/TrueTypeProperty21.mspx <br />

142 6 : COM .NET REALbasic


_none <br />

afrc <br />

c2pc<br />

c2sc<br />

case<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

dlig <br />

<br />

dnom <br />

frac <br />

hist <br />

<br />

hlig <br />

liga <br />

<br />

lnum <br />

locl <br />

script language <br />

<br />

<br />

mgrk <br />

<br />

numr <br />

<br />

onum<br />

<br />

<br />

<br />

ordn <br />

<br />

ornm <br />

pcap<br />

pnum<br />

salt<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

6.3 OpenType 143


sinf <br />

<br />

smcp<br />

ss01<br />

...<br />

ss20<br />

<br />

<br />

<br />

<br />

<br />

salt <br />

<br />

<br />

<br />

subs <br />

sups <br />

<br />

swsh <br />

titl <br />

tnum <br />

unic <br />

<br />

zero<br />

<br />

<br />

<br />

6.3.2 OpenType <br />

<br />

show( ) <br />

OpenType <br />

<br />

> *.ttf *.otf *.ttc <br />

<br />

<br />

> <br />

<br />

> encoding=unicode glyphid <br />

<br />

> load_font( ) readfeatures false <br />

> load_font( ) fallbackfonts <br />

<br />

<br />

<strong>PDFlib</strong> GSUB 1 4 OpenType<br />

<strong>PDFlib</strong> GPOS OpenType <br />

<br />

<br />

<br />

144 6 : COM .NET REALbasic


6.3<br />

Microsoft font property extension <br />

OpenType <br />

> features script language <br />

<br />

<br />

> <br />

<br />

<br />

OpenType <br />

<br />

features no <br />

<br />

<br />

ffi


f+i Schilfinsel<br />

<br />

<br />

features <br />

<br />

<br />

<br />

<br />

&zwnj features<br />

<br />

f+i <br />

Schilf&zwnj;insel<br />

OpenType <br />

<br />

<br />

features script language <br />

<br />

<br />

f i <br />

i i<br />

<br />

<br />

<br />

fi<br />

<br />

<br />

fi<br />

locl liga <br />

<br />

:<br />

&#x0431;<br />

:<br />

&#x0662;&#x0663;&#x0664;&#x0665;<br />

<br />

<br />

OpenType <br />

<br />

146 6 : COM .NET REALbasic


features <br />

shaping script language<br />

OpenType info_font( ) <br />

<br />

<br />

result = (int) p.info_font(font, "featurelist", "");<br />

if (result != -1)<br />

{<br />

/* */<br />

featurelist = p.get_parameter("string", result);<br />

}<br />

else<br />

{<br />

/* */<br />

}<br />

<br />

liga <br />

result = (int) p.info_font(font, "feature", "name=liga");<br />

if (result == 1)<br />

{<br />

/* <strong>PDFlib</strong> */<br />

}<br />

6.3 OpenType 147


6.4 <br />

scripts/starter_shaping <br />

6.4.1 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

> <br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

shaping <br />

script language <br />

<br />

<br />

shaping script=arab<br />

<br />

> shapingscript <br />

<br />

> shaping script language <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

148 6 : COM .NET REALbasic


script <br />

<br />

<br />

<br />

_none<br />

<br />

<br />

_latn _none <br />

_auto<br />

<br />

<br />

latn<br />

grek<br />

cyrl<br />

<br />

<br />

arab<br />

<br />

hebr<br />

syrc<br />

thaa<br />

<br />

<br />

<br />

deva<br />

beng<br />

guru<br />

gujr<br />

orya<br />

taml<br />

telu<br />

knda<br />

mlym<br />

thai<br />

lao <br />

khmr<br />

hani<br />

hira<br />

kana<br />

hang<br />

<br />

<br />

<br />

www.microsoft.com/typography/developers/OpenType/scripttags.aspx<br />

1. <br />

6.4 149


<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> encoding=unicode glyphid <br />

> load_font( ) monospacevertical readshaping<br />

<br />

> load_font( ) fallbackfonts <br />

<br />

6.4.2 <br />

<br />

<br />

> script <br />

<br />

script=latn<br />

script=cyrl<br />

script=arab<br />

script=hebr<br />

script=deva<br />

script={lao }<br />

script=_auto <br />

<br />

<br />

info_textline( ) scriptlist <br />

<br />

> language <br />

<br />

language=ARA<br />

language=URD<br />

language=ZHS<br />

language=HIN<br />

shaping script <br />

language <br />

<br />

<br />

script language <br />

<br />

150 6 : COM .NET REALbasic


OpenType <br />

<br />

script language <br />

liga script language<br />

<br />

206 8.2.9 <br />

language <br />

locale locale <br />

<br />

language <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

_none FIN NEP <br />

AFK FRA ORI <br />

SQI GAE PAS <br />

ARA DEU PLK <br />

HYE ELL PTG <br />

ASM GUJ ROM <br />

EUQ HAU RUS <br />

BEL IWR SAN <br />

BEN HIN SRB <br />

BGR HUN SND <br />

CAT IND SNH <br />

CHE ITA SKY <br />

ZHP JAN SLV <br />

ZHS KAN ESP <br />

ZHT KSH SVE <br />

COP KHM SYR <br />

HRV KOK TAM <br />

CSY KOR TEL <br />

DAN MLR THA <br />

NLD MAL TIB <br />

DZN MTS TRK <br />

ENG MNI URD <br />

ETI MAR WEL <br />

FAR MNG JII <br />

<br />

<br />

6.4 151


6.4.3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

6.4.4 <br />

complex_scripts/bidi_formatting <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

script <br />

<br />

<br />

<br />

1. www.unicode.org/unicode/reports/tr9/ <br />

152 6 : COM .NET REALbasic


> <br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

position={right center}<br />

> <br />

leader={alignment=left text=.}<br />

> begin/end_document( ) <br />

<br />

viewerpreferences={direction=r2l}<br />

<br />

> info_textline( ) startx/startyendx/endy <br />

<br />

> info_textline( ) writingdirx <br />

<br />

<br />

> info_textline( )position auto <br />

<br />

6.4 153


oxsize={width 0} position={auto bottom}<br />

6.4.5 <br />

complex_scripts/arabic_formatting <br />

<br />

<br />

<br />

<br />

<br />

> rlig <br />

script=arab shaping <br />

<br />

> liga dlig <br />

features={liga} <br />

<br />

<br />

<br />

<br />

script shaping feature <br />

<br />

shaping script=arab features={liga}<br />

<br />

<br />

<br />

script <br />

<br />

<br />

<br />

<br />

<br />

&#x0623;&#x064A;&ZWNJ;&#x0628;&#x064A;&ZWNJ;&#x0625;&#x0645;<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

fallbackfonts <br />

<br />

154 6 : COM .NET REALbasic


fallbackfonts <br />

<br />

<br />

fallbackfonts={<br />

{fontname=Helvetica encoding=unicode forcechars={U+0021-U+00FF}}<br />

}<br />

6.4 155


6.5 <br />

6.5.1 <br />

<br />

<br />

<br />

<br />

<br />

<br />

Unicode<br />

encoding=unicode <br />

CMap UCS2 UTF16 <br />

Acrobat <br />

139 6.2.3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

keepnative=true <br />

<br />

keepnative=true <br />

keepnative <br />

<br />

keepnative=false <br />

<br />

<br />

<br />

<br />

> <br />

-H <br />

-V <br />

156 6 : COM .NET REALbasic


vertical <br />

<br />

> <br />

<strong>PDFlib</strong> <br />

continue_text( ) <br />

<br />

load_font( ) <br />

encoding <br />

<br />

<br />

KozMinPro-Regular-Acro <br />

<br />

font = p.load_font("KozMinPro-Regular-Acro", "UniJIS-UCS2-H", "");<br />

if (font == -1) { ... }<br />

p.setfont(font, 24);<br />

p.set_text_pos(50, 500);<br />

p.show("\u65E5\u672C\u8A9E");<br />

Ext-RKSJ<br />

H fontname <br />

encoding <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

load_font( ) monospace <br />

<br />

<br />

font = p.load_font("KozMinPro-Regular-Acro", "UniJIS-UCS2-H", "monospace=1000");<br />

monospace <br />

6.5.2 <br />

<strong>PDFlib</strong> GmbH MS MS www.pdflib.com <br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

> embedding true <br />

<br />

6.5 157


load_font( ) <br />

<br />

> keepnative false <br />

keepnative=false <br />

keepnative=true embedding=true <br />

Unicode <br />

<br />

<br />

<br />

font = p.load_font("Arial Unicode MS", "unicode", "");<br />

p.setfont(font, 24);<br />

p.set_text_pos(50, 500);<br />

p.show("\u4e00\u500b\u4eba");<br />

TrueType Collection TTC <br />

<br />

<br />

<br />

<br />

msgothic.ttc <br />

load_font( ) <br />

<br />

msgothic:0 MS Gothic msgothic:<br />

msgothic:1 MS PGothic<br />

msgothic:2 MS UI Gothic<br />

msgothic <br />

<br />

<br />

<br />

<br />

msgothic.ttc <br />

<br />

<br />

p.set_parameter("FontOutline", "msgothic=msgothic.ttc");<br />

6.5.3 EUDC SING <br />

<br />

*.tte *.gai <br />

<br />

<br />

<br />

<br />

158 6 : COM .NET REALbasic


fallbackfonts <br />

<br />

fallbackfonts<br />

<br />

<br />

<br />

fallbackfonts={<br />

{fontname=EUDC encoding=unicode forcechars=U+E000 fontsize=140% textrise=-20%}<br />

}<br />

<br />

<br />

<br />

<br />

fallbackfonts={<br />

{fontname=<strong>PDFlib</strong>Wing encoding=unicode forcechars=gaiji}<br />

}<br />

EUDC <br />

<br />

> eudcedit.exe <br />

<br />

> \Windows\fonts EUDC.TTE <br />

<br />

dir copy <br />

<br />

<br />

p.set_parameter("FontOutline", "EUDC=EUDC.TTE");<br />

p.set_parameter("SearchPath", "......");<br />

EUDC.TTE <br />

<br />

<br />

<br />

<br />

p.set_parameter("FontOutline", "EUDC=C:\Windows\fonts\EUDC.TTE");<br />

> fallbackfonts <br />

<br />

<br />

font = p.load_font("EUDC", "unicode", "");<br />

<br />

6.5.4 OpenType <br />

<br />

<br />

6.5 159


vert load_font( ) vertical <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

expt <br />

<br />

fwid <br />

<br />

hkna <br />

hngl <br />

hojo<br />

<br />

<br />

<br />

<br />

hwid <br />

<br />

ital <br />

jp04 nlck <br />

jp78 <br />

<br />

jp83 <br />

<br />

jp90 <br />

<br />

locl <br />

script language <br />

nalt <br />

<br />

nlck<br />

pkna<br />

pwid<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

qwid <br />

<br />

ruby <br />

<br />

smpl <br />

160 6 : COM .NET REALbasic


tnam trad <br />

<br />

trad <br />

twid <br />

vert <br />

vkna <br />

vrt2<br />

<br />

<br />

vrt2 vert <br />

<br />

<br />

6.5 161


162 6 : COM .NET REALbasic


7 PDF <br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> images <br />

<br />

7.1 <br />

7.1.1 <br />

<br />

load_image( ) <br />

fit_image( ) <br />

<br />

image = p.load_image("auto", "image.jpg", "");<br />

if (image == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

p.fit_image(image, 0.0, 0.0, "");<br />

p.close_image(image);<br />

fit_image( ) <br />

<br />

<br />

images/starter_image <br />

<br />

<br />

<br />

<br />

fit_image( ) <br />

<br />

<br />

<br />

dpi <br />

<br />

<br />

<br />

<br />

<br />

images/image_dimensions <br />

<br />

7.1 163


load_image( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

load_<br />

image( ) page <br />

image = p.load_image("tiff", filename, "page=2");<br />

page <br />

load_image( ) <br />

<br />

TIFF PDF <br />

images/multi_page_tiff <br />

<br />

<br />

<br />

<br />

<br />

<br />

load_image( ) inline <br />

<br />

inline load_<br />

image( ) <br />

p.fit_image(image, 0, 0, "");<br />

p.close_image(image);<br />

imagetype=ccitt jpeg raw <br />

inline <br />

OPI <br />

load_image( ) <br />

<br />

<br />

<br />

<br />

String optlist13 =<br />

"OPI-1.3 { ALDImageFilename bigfile.tif " +<br />

"ALDImageDimensions {400 561} " +<br />

"ALDImageCropRect {10 10 390 550} " +<br />

"ALDImagePosition {10 10 10 540 390 540 390 10} }";<br />

image = p.load_image("tiff", filename, optlist13);<br />

164 7 : PDF COM .NET REALbasic


Helios EtherShare OPI PDF XObject<br />

OPI <strong>PDFlib</strong> XObject <br />

load_image( ) template <br />

XObject <br />

XMP <br />

<br />

<br />

<br />

load_image( ) <br />

<br />

metadata={keepxmp=false}<br />

<br />

<br />

7.1.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Read less image data than expected <br />

load_image( ) passthrough <br />

load_image( ) <br />

get_errmsg( ) <br />

<br />

PNG <br />

<br />

<br />

JPEG <br />

<br />

load_image( )<br />

passthrough <br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

> <br />

> <br />

<br />

7.1 165


honoriccprofile <br />

false iccprofile <br />

<br />

JPEG 2000 <br />

<br />

<br />

> *.jp2 *.jpf <br />

<br />

<br />

<br />

<br />

> <br />

*.j2k <br />

> mask <br />

<br />

> iccprofile <br />

<br />

honoriccprofile true <br />

JBIG2 <br />

<br />

<br />

<br />

<br />

<br />

load_image( ) <br />

<br />

<br />

> load_<br />

image( ) <br />

page=1 copyglobals=all<br />

> <br />

<br />

load_image( ) <br />

<br />

page=2 imagehandle=<br />

<br />

copyglobals/imagehandle <br />

copyglobals <br />

<br />

166 7 : PDF COM .NET REALbasic


GIF <br />

<br />

<br />

TIFF <br />

> <br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

ignoreorientation true <br />

ignoreclippingpath <br />

<br />

<br />

<br />

BMP <br />

<br />

> <br />

> <br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

CCITT <br />

<br />

<br />

<br />

<br />

load_<br />

image( ) <br />

RAW <br />

<br />

<br />

7.1 167


7.1.3 <br />

<br />

load_<br />

image( ) clippingpathname <br />

<br />

<br />

<br />

<br />

<br />

load_<br />

image( ) honorclippingpath false <br />

<br />

fit_image( ) ignoreclippingpath <br />

<br />

<br />

images/integrated_clipping_path <br />

<br />

7.1.4 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

7.1<br />

<br />

<br />

168 7 : PDF COM .NET REALbasic


image = p.load_image("tiff", filename, "alphachannelname={apple}");<br />

> <br />

<br />

> <br />

<br />

<br />

Photoshop <br />

<strong>PDFlib</strong> <strong>PDFlib</strong><br />

Photoshop TIFF TIFF <br />

<br />

<br />

ignoremask <br />

<br />

image = p.load_image("tiff", filename, "ignoremask");<br />

<br />

<br />

<br />

<br />

> <br />

> load_image( ) nopassthrough <br />

<br />

> <br />

<br />

<br />

<br />

masked <br />

mask = p.load_image("png", maskfilename, "");<br />

if (mask == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

String optlist = "masked=" + mask;<br />

image = p.load_image(type, filename, optlist)<br />

if (image == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

p.fit_image(image, x, y, "");<br />

<br />

<br />

<strong>PDFlib</strong> TIFF PDF <br />

<br />

<br />

7.1 169


images/image_mask <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

> <br />

x <br />

> <br />

mask <br />

<br />

mask = p.load_image("tiff", maskfilename, "mask");<br />

p.setcolor("fill", "rgb", 1.0, 0.0, 0.0, 0.0);<br />

if (mask != -1)<br />

{<br />

p.fit_image(mask, x, y, "");<br />

}<br />

colorize <br />

<br />

7.1.5 <br />

<br />

<br />

<br />

<br />

<br />

<br />

colorize <br />

<br />

makespotcolor( ) <br />

p.setcolor("fillstroke", "cmyk", 1, .79, 0, 0);<br />

spot = p.makespotcolor("PANTONE Reflex Blue CV");<br />

170 7 : PDF COM .NET REALbasic


String optlist = "colorize=" + spot;<br />

image = p.load_image("tiff", "image.tif", optlist);<br />

if (image != -1)<br />

{<br />

p.fit_image(image, x, y, "");<br />

}<br />

7.1 171


7.2 PDI PDF <br />

<strong>PDFlib</strong>+PDI PDF <br />

PDI <strong>PDFlib</strong> PDI <strong>PDFlib</strong> <br />

PDI PPS PPS PDI <br />

<br />

7.2.1 PDI <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

> <br />

<br />

> <br />

> <br />

> <br />

> <br />

<br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

7.2.2 <strong>PDFlib</strong> PDI <br />

PDF <strong>PDFlib</strong> pdf_import <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

172 7 : PDF COM .NET REALbasic


PDF <br />

<br />

<br />

<br />

int doc, page, pageno = 1;<br />

String filename = "input.pdf";<br />

if (p.begin_document(outfilename, "") == -1) {...}<br />

...<br />

doc = p.open_pdi_document(infilename, "");<br />

if (doc == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

page = p.open_pdi_page(doc, pageno, "");<br />

if (page == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* adjustpage */<br />

p.begin_page_ext(20, 20, "");<br />

p.fit_pdi_page(page, 0, 0, "adjustpage");<br />

p.close_pdi_page(page);<br />

...<strong>PDFlib</strong>...<br />

p.end_page_ext("");<br />

p.close_pdi_document(doc);<br />

fit_pdi_page( ) <br />

<br />

<br />

PDF <br />

fit_pdi_page( ) <br />

<br />

<br />

7.2 PDI PDF 173


<br />

> <br />

cloneboxes <br />

<br />

<br />

pdiusebox <br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

GeoPDF PDI <br />

<br />

> load_image( ) georeference <br />

> <br />

<br />

<br />

> begin/end_page_ext( ) viewports <br />

> <br />

OPI PDF <br />

<br />

<br />

<br />

<br />

<br />

<br />

begin_document( ) optimize <br />

<br />

<br />

7.2.3 PDF <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

open_pdi_document( ) open_pdi_<br />

page( ) get_<br />

errmsg( ) errorpolicy <br />

true <br />

174 7 : PDF COM .NET REALbasic


infomode <br />

true <br />

> <br />

<br />

<br />

begin_document( ) <br />

compatibility <br />

<br />

<br />

<br />

<br />

> infomode <br />

<br />

<br />

> begin_document( ) tagged true <br />

> <br />

<br />

<br />

<br />

7.2 PDI PDF 175


7.3 PDF <br />

fit_image( ) <br />

fit_pdi_page( ) <br />

<br />

<br />

<strong>PDFlib</strong> API <br />

load_<br />

image( ) fit_<br />

image( ) <br />

<br />

open_pdi_page( ) fit_pdi_page( ) <br />

<br />

<br />

<br />

<br />

fit <br />

load_image( ) open_pdi_document( ) open_pdi_<br />

page( ) <br />

<br />

PDF <strong>PDFlib</strong> imagespdf_<br />

import <br />

7.3.1 <br />

<br />

<br />

(0, 0) <br />

p.fit_image(image, 0, 0, "position={center bottom}");<br />

position left right center top bottom <br />

<br />

<br />

<br />

<br />

<br />

p.fit_image(image, 0, 0, "scale=0.5");<br />

(0, 0) <br />

x y <br />

<br />

images/starter_image <br />

7.3.2 <br />

<br />

<br />

<br />

176 7 : PDF COM .NET REALbasic


(0, 0) <br />

<br />

<br />

7.2 <br />

<br />

fit_image <br />

a) boxsize={70 45} position={right top}<br />

b) boxsize={70 45} position={center bottom}<br />

<br />

<br />

<br />

(0, 0) <br />

<br />

<br />

<br />

<br />

position=center boxsize={70 45} <br />

fitmethod=meet <br />

<br />

<br />

<br />

fitmethod=meet <br />

<br />

<br />

fitmethod=entire <br />

<br />

fitmethod=clip <br />

<br />

<br />

<br />

<br />

position={right top} <br />

<br />

7.3 PDF 177


7.3 <br />

<br />

fit_image <br />

a) boxsize={70 45} position=center<br />

b) boxsize={35 45} position=center<br />

c) boxsize={70 45} position=center fitmethod=meet<br />

d) boxsize={35 45} position=center fitmethod=meet<br />

e) boxsize={70 45} position=center fitmethod=entire<br />

f) boxsize={30 30} position=center fitmethod=clip<br />

g) boxsize={30 30} position={right top} fitmethod=clip<br />

<br />

<br />

<br />

p.fit_image(image, 0, 0, "boxsize={595 842} position={left bottom} fitmethod=slice");<br />

<br />

<br />

<br />

fitmethod=slice <br />

fitmethod=clip <br />

position fitmethod <br />

7.3.3 <br />

<br />

orientate=west <br />

(0, 0) <br />

<br />

<br />

178 7 : PDF COM .NET REALbasic


7.4<br />

rotate <br />

7.5<br />

orientate <br />

<br />

<br />

fitmethod=meet <br />

orientate=west <br />

<br />

orientate north east <br />

west south <br />

orientate <br />

<br />

7.6 <br />

<br />

fit_image <br />

a) boxsize={70 45} orientate=west<br />

b) boxsize={70 45} orientate=west fitmethod=meet<br />

c) boxsize={70 45} orientate=east fitmethod=meet<br />

d) boxsize={70 45} orientate=south fitmethod=meet<br />

e)<br />

boxsize={70 45} position={center bottom} orientate=east<br />

fitmethod=clip<br />

7.3 PDF 179


orientate=east<br />

position={center bottom} <br />

fitmethod=clip <br />

<br />

7.3.4 <br />

<br />

<br />

<br />

(50, 0) <br />

<br />

<br />

<br />

rotate <br />

<br />

<br />

fitmethod=meet <br />

<br />

<br />

7.7 <br />

<br />

fit_image <br />

a) boxsize={70 45} rotate=90<br />

(x, y)<br />

b) boxsize={70 45} rotate=30<br />

(x, y)<br />

c) boxsize={70 45} rotate=90 fitmethod=meet<br />

(x, y)<br />

d) boxsize={70 45} rotate=30 fitmethod=meet<br />

(x, y)<br />

180 7 : PDF COM .NET REALbasic


7.8<br />

<br />

<br />

<br />

<br />

7.3.5 <br />

<br />

<br />

(x, y) <br />

<br />

<br />

<br />

<br />

p.fit_image(image, 0, 0, "adjustpage");<br />

x y <br />

<br />

p.fit_image(image, 40, 40, "adjustpage");<br />

x y <br />

<br />

<br />

p.fit_image(image, -40, -40, "adjustpage");<br />

x y <br />

<br />

<br />

boxsize fitmethod position <br />

PDF <br />

<br />

cloneboxes open_pdi_page( ) <br />

fit_pdi_page( )<br />

<br />

/* */<br />

inpage = p.open_pdi_page(indoc, 1, "cloneboxes");<br />

...<br />

/* */<br />

p.begin_page_ext(10, 10, "");<br />

...<br />

/*<br />

* <br />

* begin_page_ext()<br />

* <br />

*/<br />

p.fit_pdi_page(inpage, 0, 0, "cloneboxes");<br />

7.3 PDF 181


7.3.6 PDF <br />

info_image( ) <br />

<br />

<br />

<br />

<br />

<br />

String optlist = "boxsize={300 400} fitmethod=meet orientate=west";<br />

p.fit_image(image, 0.0, 0.0, optlist);<br />

imagewidth = (int) p.info_image(image, "imagewidth", optlist);<br />

imageheight = (int) p.info_image(image, "imageheight", optlist);<br />

System.err.println(": " + imagewidth + " x " + imageheight);<br />

width = p.info_image(image, "width", optlist);<br />

height = p.info_image(image, "height", optlist);<br />

System.err.println(": " + width + " x " + height);<br />

PDF info_pdi_page( ) <br />

<br />

<br />

<br />

<br />

<br />

String optlist = "boxsize={400 500} fitmethod=meet";<br />

p.fit_pdi_page(page, 0, 0, optlist);<br />

pagewidth = p.info_pdi_page(page, "pagewidth", optlist);<br />

pageheight = p.info_pdi_page(page, "pageheight", optlist);<br />

System.err.println(": " + pagewidth + " x " + pageheight);<br />

width = p.info_pdi_page(page, "width", optlist);<br />

height = p.info_pdi_page(page, "height", optlist);<br />

System.err.println(": " + width + " x " + height);<br />

182 7 : PDF COM .NET REALbasic


8 <br />

8.1 <br />

fit_textline( ) <br />

<br />

<strong>PDFlib</strong> API <br />

fit_textline( ) fit_image( ) <br />

<br />

<br />

fit_textline( ) <br />

<br />

fit_textline( ) <br />

<br />

matchbox <br />

<br />

fit_textline( ) x y <br />

fit_textline( ) <br />

x y boxsize position rotate <br />

margin <br />

<br />

<strong>PDFlib</strong> text_output <br />

<br />

8.1.1 <br />

<br />

<br />

(30, 20) <br />

p.fit_textline(text, 30, 20, "position={center bottom}");<br />

left right <br />

center top bottom position <br />

<br />

<br />

˚ <br />

(0, 0) <br />

8.1<br />

<br />

<br />

y<br />

Kraxi<br />

y<br />

Kraxi<br />

8.2<br />

<br />

<br />

x<br />

x<br />

8.1 183


20<br />

<br />

Kraxi 5022<br />

<br />

20 Kraxi 500<br />

30<br />

20<br />

8.3 <br />

p.fit_textline(text, 0, 0, "orientate=west");<br />

<br />

8.1.2 <br />

<br />

<br />

<br />

<br />

(30, 20) <br />

<br />

<br />

<br />

margin <br />

<br />

<br />

<br />

8.4 <br />

<br />

fit_textline( ) <br />

Kraxi<br />

a) boxsize={50 22} position={right top}<br />

b) boxsize={50 22} position={center bottom}<br />

Kraxi<br />

Kraxi<br />

c) boxsize={50 22} position={center bottom} margin={0 3}<br />

d) boxsize={50 0} position={center bottom}<br />

Kraxi<br />

Kraxi<br />

e) boxsize={0 35} position={left center} orientate=west<br />

184 8 : COM .NET REALbasic


8.1.3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

fitmethod=auto <br />

<br />

<br />

<br />

auto shrinklimit <br />

<br />

<br />

<br />

meet meet <br />

<br />

<br />

<br />

fitmethod=meet <br />

<br />

<br />

fitmethod=entire <br />

<br />

<br />

<br />

<br />

fitmethod=clip <br />

<br />

8.1 185


8.5 <br />

<br />

fit_textline( ) <br />

Kraxi Systems<br />

a) boxsize={100 35} position=center fontsize=12<br />

Kraxi Systems<br />

b) boxsize={50 35} position=center fontsize=12<br />

c)<br />

Kraxi Systems<br />

boxsize={100 35} position=center fontsize=12<br />

fitmethod=auto<br />

d)<br />

Kraxi Systems<br />

boxsize={58 35} position=center fontsize=12<br />

fitmethod=auto<br />

e)<br />

Kraxi Systems<br />

boxsize={30 35} position=center fontsize=12<br />

fitmethod=auto<br />

f)<br />

Kraxi Systems<br />

boxsize={100 35} position=center fontsize=12<br />

fitmethod=meet<br />

g)<br />

Kraxi Systems<br />

boxsize={100 35} position=center fontsize=12<br />

fitmethod=entire<br />

h)<br />

Kraxi Sys<br />

boxsize={50 35} position={left center}<br />

fontsize=12 fitmethod=clip<br />

fit_textline( ) <br />

H <br />

<br />

<br />

fit_textline( ) matchbox <br />

<br />

boxheight <br />

boxheight <br />

matchbox={boxheight={capheight none}} <br />

<br />

<br />

<br />

xheight <br />

<br />

186 8 : COM .NET REALbasic


oxheight <br />

<br />

8.6 <br />

<br />

fit_textline( ) <br />

Kraxi Systems<br />

a) boxsize={80 20} position=center fitmethod=auto<br />

b)<br />

c)<br />

d)<br />

e)<br />

f)<br />

Kraxi Systems<br />

Kraxi Systems<br />

Kraxi Systems<br />

Kraxi Systems<br />

Kraxi Systems<br />

boxsize={80 20} position=center fitmethod=auto<br />

matchbox={boxheight={capheight none}<br />

fillcolor={rgb 1 0.8 0.8}}<br />

boxsize={80 20} position=center fitmethod=auto<br />

matchbox={boxheight={xheight none}<br />

fillcolor={rgb 1 0.8 0.8}}<br />

boxsize={80 20} position=center fitmethod=auto<br />

matchbox={boxheight={ascender none}<br />

fillcolor={rgb 1 0.8 0.8}}<br />

boxsize={80 20} position=center fitmethod=auto<br />

matchbox={boxheight={ascender descender}<br />

fillcolor={rgb 1 0.8 0.8}}<br />

boxsize={80 20} position=center fitmethod=auto<br />

matchbox={boxheight={fontsize none}<br />

fillcolor={rgb 1 0.8 0.8}}<br />

8.1.4 <br />

<br />

<br />

fit_textline( ) alignchar=. <br />

<br />

position <br />

position={left bottom} <br />

<br />

8.7 <br />

<br />

fit_textline( ) <br />

127.123<br />

a)<br />

12.01<br />

123.0<br />

boxsize={70 8} position={center bottom} alignchar=.<br />

4025.20<br />

127.123<br />

b)<br />

12.01<br />

123.0<br />

boxsize={70 8} position={left bottom} alignchar=.<br />

4025.20<br />

8.1.5 <br />

text_output/simple_stamp <br />

8.1 187


fit_textline( ) stamp <br />

stamp=ll2ur <br />

stamp=ul2lr <br />

showborder=true <br />

<br />

8.8 <br />

<br />

Giant Wing<br />

8.1.6 <br />

fit_textline( ) <br />

fontsize=8 boxsize={160 50} stamp=ll2ur showborder=true<br />

<br />

<br />

<br />

fit_textline( ) leader alignment={none right} <br />

<br />

<br />

<br />

<br />

text_output/leaders_in_textline <br />

<br />

text_output/dot_leaders_with_tabs <br />

<br />

<br />

<br />

alignment={left right} <br />

<br />

8.9 <br />

<br />

fit_textline( ) <br />

<br />

a)<br />

Features of Giant Wing ....................................................<br />

Description of Long Distance Glider.................................<br />

Benefits of Cone Head Rocket .........................................<br />

boxsize={200 10}<br />

leader={alignment={none right}}<br />

188 8 : COM .NET REALbasic


Long Distance Glider with sensational range!<br />

<br />

fit_textline( ) <br />

<br />

b)<br />

+ + + + + + + + + Giant Wing in purple! + + + + + + + + +<br />

+ + Long Distance Glider with sensational range! + +<br />

+ + + + + Cone Head Rocket incredibly fast! + + + + +<br />

boxsize={200 10}<br />

position={center bottom}<br />

leader={alignment={left right}<br />

text={+ }}<br />

8.1.7 <br />

<br />

<br />

fit_textline( ) textpath <br />

<br />

add_path_point( ) <br />

<br />

<br />

<br />

/* */<br />

path = p.add_path_point( -1, 0, 0, "move", "");<br />

path = p.add_path_point(path, 100, 100, "control", "");<br />

path = p.add_path_point(path, 200, 0, "circular", "");<br />

/* */<br />

p.fit_textline("Long Distance Glider with sensational range!", x, y,<br />

"textpath={path=" + path + "} position={center bottom}");<br />

/* */<br />

p.draw_path(path, x, y, "stroke");<br />

text_output/text_on_a_path<br />

<br />

<br />

<br />

<br />

honorclippingpath <br />

<br />

clippingpathname load_image( ) <br />

8.10<br />

<br />

8.1 189


Long Distance Glider with sensational range!<br />

image = p.load_image("auto", "image.tif", "clippingpathname={path 1}");<br />

/* */<br />

path = (int) p.info_image(image, "clippingpath", "");<br />

if (path == -1)<br />

throw new Exception(" : !");<br />

/* */<br />

p.fit_textline("Long Distance Glider with sensational range!", x, y,<br />

"textpath={path=" + path + "} position={center bottom}");<br />

<br />

<br />

matchbox <br />

boxheight <br />

<br />

p.fit_textline("Long Distance Glider with sensational range!", x, y,<br />

"textpath={path=" + path + "} position={center bottom} " +<br />

"matchbox={boxheight={capheight descender}}");<br />

8.11<br />

<br />

<br />

190 8 : COM .NET REALbasic


8.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Kraxi Systems, Inc.<br />

Paper Planes<br />

17, Aviation Road<br />

Paperfield<br />

Phone 7079-4301<br />

Fax 7079-4302<br />

info@kraxi.com<br />

www.kraxi.com<br />

Kraxi Systems, Inc. 17, Aviation Road Paperfield<br />

John Q. Doe<br />

255 Customer Lane<br />

Suite B<br />

12345 User Town<br />

Everland<br />

INVOICE 14.03.2004<br />

hortabmethod ruler<br />

tabalignment right left right right right<br />

ruler 30 45 275<br />

375<br />

475<br />

8.12<br />

<br />

<br />

ITEM DESCRIPTION QUANTITY PRICE AMOUNT<br />

1 Super Kite 2 20,00 40,00<br />

2 Turbo Flyer 5 40,00 200,00<br />

3 Giga Trash 1 180,00 180,00<br />

4 Bare Bone Kit 3 50,00 150,00<br />

5 Nitty Gritty 10 20,00 200,00<br />

6 Pretty Dark Flyer 1 75,00 75,00<br />

7 Free Gift 1 0,00 0,00<br />

845,00<br />

leftindent<br />

=55<br />

parindent<br />

=7%<br />

leading<br />

= 140%<br />

leftindent = 75<br />

leftindent = 105<br />

Terms of payment: 30 days net. 30 days warranty starting at theday ofsale. This<br />

warranty covers defects in workmanship only. Kraxi Systems, Inc., at its option, repairs or<br />

replaces the product under warranty. This warranty is not transferable. Returns or<br />

exchanges are not possible for wet products.<br />

Have a look at our new paper plane models!<br />

Our paper planes are the ideal way of passing the time. We offer revolutionary<br />

new developments of the traditional common paper planes. If your lesson,<br />

conference, or lecture turn out to be deadly boring, you can have a wonderful time<br />

with our planes. All our models are folded from one paper sheet.<br />

They are exclusively folded without using any adhesive. Several models are<br />

equipped with a folded landinggear enabling a safe landing on the intended location<br />

provided that you have aimed well. Other models are able to fly loops or cover long<br />

distances. Let them start from a vista point in the mountains and see where they<br />

touch the ground.<br />

1. Long Distance Glider<br />

With this paper rocket you can send all your messages even when<br />

sitting in a hall or in the cinema pretty near theback.<br />

2. Giant Wing<br />

An unbelievable sailplane! It is amazingly robust and can evendo<br />

alignment<br />

= left<br />

alignment<br />

= justify<br />

rightindent<br />

=60<br />

minlinecount<br />

=2<br />

8.2 191


add_textflow( ) <br />

<br />

create_textflow( ) <br />

<br />

<br />

> fit_textflow( ) <br />

<br />

<br />

<br />

<br />

> delete_textflow( ) <br />

<br />

add/create_textflow( ) <br />

<br />

create_textflow( ) <br />

info_textflow( ) <br />

<br />

<br />

<strong>PDFlib</strong> API <br />

add/create_textflow( ) fit_textline( ) <br />

<br />

<br />

<br />

<strong>PDFlib</strong> text_output <br />

<br />

aerobatics. But itisbest suited to gliding.<br />

fillcolor, charspacing,<br />

fontsize, fontname<br />

3. C one Head R ocket<br />

This paper arrow can be thrown with big swing. We launched it from<br />

theroofofa hotel. It stayed in the air a long time and covered a<br />

considerable distance.<br />

4. Super Dart<br />

The super dart can fly giant loops with a radius of 4 or 5 meters and<br />

cover very long distances. Its heavy cone point is slightly bowed<br />

upwards to get the lift required for loops.<br />

5. German Bi-Plane<br />

Brand-new and ready for take-off. If you have lessons in the history of<br />

aviation you can show your interest by letting it land on yourteacher's<br />

desk.<br />

8.13<br />

<br />

<br />

192 8 : COM .NET REALbasic


8.2.1 <br />

fit_textflow( )<br />

llx lly urx ury <br />

add_<br />

textflow( ) <br />

<br />

add_textflow( ) <br />

add_textflow( ) <br />

text1 text2 <br />

fit_textflow( ) <br />

<br />

/* */<br />

tf = p.add_textflow(-1, text1, "fontname=Helvetica-Bold fontsize=9 encoding=unicode");<br />

if (tf == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* */<br />

tf = p.add_textflow(tf, text2, "fontname=Helvetica fontsize=9 encoding=unicode");<br />

if (tf == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* Place all text */<br />

result = p.fit_textflow(tf, left_x, left_y, right_x, right_y, "");<br />

if (!result.equals("_stop"))<br />

{ /* ... */}<br />

p.delete_textflow(tf);<br />

fit_textflow( ) <br />

_boxfull <br />

<br />

<br />

<br />

<br />

<br />

text_output/starter_textflow <br />

<br />

/* <br />

* 2<br />

*/<br />

do<br />

{<br />

String optlist = "verticalalign=justify linespreadlimit=120%";<br />

p.begin_page_ext(0, 0, "width=a4.width height=a4.height");<br />

/* 1 */<br />

result = p.fit_textflow(tf, llx1, lly1, urx1, ury1, optlist);<br />

/* 2 */<br />

8.2 193


if (!result.equals("_stop"))<br />

result = p.fit_textflow(tf, llx2, lly2, urx2, ury2, optlist);<br />

p.end_page_ext("");<br />

/* _boxfull<br />

* _nextpage<br />

*/<br />

} while (result.equals("_boxfull") || result.equals("_nextpage"));<br />

/* */<br />

if (!result.equals("_stop"))<br />

{<br />

/* _boxempty<br />

*/<br />

if (result.equals( "_boxempty"))<br />

throw new Exception("" + p.get_errmsg());<br />

else<br />

{<br />

/* return<br />

* <br />

*/<br />

}<br />

}<br />

p.delete_textflow(tf);<br />

8.2.2 <br />

<br />

<br />

add_textflow( ) <br />

<br />

<br />

<br />

add_textflow( ) <br />

1 2 3 4<br />

1 2<br />

1 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 2 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

3 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 4 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

5 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 6 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

7 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 8 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

9 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 10 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

11 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 12 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

13 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 14 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

15 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 16 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

17 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 18 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

19 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 20 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

21 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 22 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

23 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 24 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

25 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 26 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

27 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

8.14<br />

<br />

<br />

<br />

194 8 : COM .NET REALbasic


leftindent = 15<br />

parindent = 20<br />

leading = 140%<br />

8.15<br />

<br />

<br />

Have a look at our newpaper plane models! Our paper planes<br />

are the ideal way ofpassing the time. We offer revolutionary new<br />

developments of the traditional common paper planes.<br />

If yourlesson, conference, or lecture turn outtobedeadly boring,<br />

you can have a wonderful time with our planes. All our models are<br />

folded from one paper sheet.<br />

They are exclusively folded without using any adhesive. Several<br />

modelsare equipped with a folded landing gearenabling asafe landing<br />

on the intended location provided that you have aimed well. Other<br />

models are able to fly loops or cover long distances. Let them start<br />

from a vista point in the mountains and see where they touch the<br />

ground.<br />

rightindent = 10<br />

alignment =<br />

justify<br />

String optlist =<br />

"leftindent=15 rightindent=10 parindent=20 alignment=justify " +<br />

"leading=140% fontname=Helvetica fontsize=8 encoding=unicode";<br />

8.2.3 <br />

<br />

<br />

<br />

create_textflow( ) <br />

<br />

<br />

<br />

<br />

add_texflow( ) create_textflow( ) create_<br />

textflow( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

Have a look at our new paper plane models!<br />

<br />

Our paper planes are the ideal way of passing the time. We offer<br />

revolutionary new developments of the traditional common paper planes.<br />

If your lesson, conference, or lecture<br />

turn out to be deadly boring, you can have a wonderful time<br />

with our planes. All our models are folded from one paper sheet.<br />

They are exclusively folded without using any adhesive. Several<br />

models are equipped with a folded landing gear enabling a safe<br />

landing on the intended location provided that you have aimed well.<br />

Other models are able to fly loops or cover long distances. Let them<br />

start from a vista point in the mountains and see<br />

where they touch the ground.<br />

8.2 195


egoptlistchar endoptlistchar <br />

begoptlistchar none <br />

<br />

<br />

<br />

<br />

<br />

<br />

encoding=builtin <br />

<br />

begoptlistchar <br />

textlen <br />

&lt; <br />

<br />

<br />

<br />

<br />

<br />

<br />

H1 Body Body_indented <br />

& <br />

<br />

<br />

<br />

Have a look at our new paper plane models!<br />

H1<br />

Body<br />

Body_indented<br />

8.16<br />

<br />

<br />

Have a look at our newpaper plane models!<br />

Our paper planes are the ideal way ofpassing the time. We offer<br />

revolutionary new developments of the traditional common paper<br />

planes.<br />

If yourlesson, conference, or lecture turn outtobedeadly boring,<br />

you can have a wonderful time with our planes. All our models are<br />

folded from one paper sheet.<br />

They are exclusively folded without using any adhesive. Several<br />

modelsare equipped with a folded landing gearenabling asafe landing<br />

on the intended location provided that you have aimed well. Other<br />

models are able to fly loops or cover long distances. Let them start<br />

from a vista point in the mountains and see where they touch the<br />

ground.<br />

196 8 : COM .NET REALbasic


Our paper planes are the ideal way of passing the time. We offer<br />

revolutionary new developments of the traditional common paper planes.<br />

If your lesson, conference, or lecture<br />

turn out to be deadly boring, you can have a wonderful time<br />

with our planes. All our models are folded from one paper sheet.<br />

They are exclusively folded without using any adhesive. Several<br />

models are equipped with a folded landing gear enabling a safe<br />

landing on the intended location provided that you have aimed well.<br />

Other models are able to fly loops or cover long distances. Let them<br />

start from a vista point in the mountains and see<br />

where they touch the ground.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

fontsize <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

8.2.4 <br />

<br />

<br />

<br />

8.2 197


hortabmethod ruler<br />

tabalignment left right right right<br />

ruler 30 150<br />

250<br />

350<br />

8.17<br />

<br />

<br />

ITEM DESCRIPTION QUANTITY PRICE AMOUNT<br />

1 Super Kite 2 20.00 40.00<br />

2 Turbo Flyer 5 40.00 200.00<br />

3 Giga Trash 1 180.00 180.00<br />

TOTAL 420.00<br />

ITEM DESCRIPTION QUANTITY PRICE AMOUNT<br />

1 Super Kite 2 20.00 40.00<br />

2 Turbo Flyer 5 40.00 200.00<br />

3 Giga Trash 1 180.00 180.00<br />

TOTAL 420.00<br />

_add/create_textflow( ) <br />

ruler tabalignment <br />

hortabmethod <br />

<br />

String optlist =<br />

"ruler={30 150 250 350} " +<br />

"tabalignment={left right right right} " +<br />

"hortabmethod=ruler leading=120% fontname=Helvetica fontsize=9 encoding=winansi";<br />

text_output/tabstops_in_textflow <br />

<br />

<strong>PDFlib</strong> 211 8.3 <br />

1 2 3 4<br />

1 2<br />

1 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 2 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

3 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 4 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

5 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 6 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

7 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 8 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

9 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 10 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

11 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 12 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

13 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 14 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

15 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 16 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

17 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 18 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

19 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 20 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

21 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 22 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

23 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 24 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

25 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

Ut enim ad minim veniam, quis nostrud<br />

exercitation ullamco laboris nisi ut aliquip ex<br />

ea commodo consequat. Duis aute irure<br />

dolor in reprehenderit in voluptate velit esse<br />

cillum dolore eu fugiat nulla pariatur. Excepteur<br />

sint occaecat cupidatat non proident,<br />

sunt in culpa qui officia deserunt mollit anim<br />

id est laborum. 26 Lorem ipsum dolor sit<br />

amet, consectetur adipisicing elit, sed do<br />

eiusmod tempor incididunt ut labore et<br />

dolore magna aliqua. Ut enim ad minim<br />

veniam, quis nostrud exercitation ullamco<br />

laboris nisi ut aliquip ex ea commodo consequat.<br />

Duis aute irure dolor in reprehenderit<br />

in voluptate velit esse cillum dolore eu fugiat<br />

nulla pariatur. Excepteur sint occaecat<br />

cupidatat non proident, sunt in culpa qui<br />

officia deserunt mollit anim id est laborum.<br />

27 Lorem ipsum dolor sit amet, consectetur<br />

adipisicing elit, sed do eiusmod tempor<br />

incididunt ut labore et dolore magna aliqua.<br />

8.18<br />

<br />

<br />

<br />

198 8 : COM .NET REALbasic


8.2.5 <br />

leftindent <br />

<br />

1.Long Distance Glider: With this paper rocket you can send all<br />

your messages even when sitting in a hall or in the cinema pretty near the back.<br />

2.Giant Wing: An unbelievable sailplane! It is amazingly<br />

robust and can even do aerobatics. But it is best suited to gliding.<br />

3.Cone Head Rocket: This paper arrow can be thrown with big<br />

swing. We launched it from the roof of a hotel. It stayed in the air a long time and<br />

covered a considerable distance.<br />

<br />

bulleted_list text_output/numbered_list <br />

text_output/<br />

<br />

<br />

list indent <br />

<br />

<br />

1. Long Distance Glider: With this paper rocket you can send all your messages<br />

even when sitting in a hall or in the cinema pretty near the back.<br />

2. Giant Wing: An unbelievable sailplane! It is amazingly robust and can even do<br />

aerobatics. But it is best suited to gliding.<br />

3. Cone Head Rocket: This paper arrow can be thrown with big swing. We launched<br />

it from the roof of a hotel. It stayed in the air a long time and covered a<br />

considerable distance.<br />

leftindent parindent <br />

leftindent <br />

hortabsize hortabmethod ruler leftindent <br />

leftindent <br />

parindentleftindent <br />

<br />

nextline <br />

<br />

1. Long Distance Glider: With this paper rocket you can send all your<br />

messages even when sitting in a hall or in the cinema pretty near the<br />

back.<br />

2. Giant Wing: An unbelievable sailplane! It is amazingly robust and can<br />

even do aerobatics. But it is best suited to gliding.<br />

3. Cone Head Rocket: This paper arrow can be thrown with big swing. We<br />

launched it from the roof of a hotel. It stayed in the air a long time and<br />

covered a considerable distance.<br />

8.19<br />

<br />

8.2 199


leftindent = &indent<br />

parindent = – &indent 1. Long Distance Glider: With this paper rocket you can send all your<br />

messages even when sitting in a hall or in the cinema pretty near<br />

the back.<br />

2. Giant Wing: An unbelievable sailplane! It is amazingly robust and<br />

can evendoaerobatics.But itisbest suited to gliding.<br />

8.20<br />

<br />

<br />

3. Cone Head Rocket: This paper arrow can be thrown with big swing.<br />

We launched it from the roof of a hotel. It stayedintheair a long<br />

time and covered a considerable distance.<br />

<br />

<br />

<br />

1. Long Distance Glider: With this paper rocket you can send all your messages<br />

even when sitting in a hall or in the cinema pretty near the back.<br />

2. Giant Wing: An unbelievable<br />

sailplane! It is amazingly robust and can even do aerobatics. But it is best suited to<br />

gliding.<br />

text_output/distance_between_paragraphs <br />

<br />

8.2.6 <br />

<br />

<br />

charmapping <br />

<br />

<br />

<br />

<br />

<br />

<br />

/ charmapping <br />

<br />

<br />

charmapping <br />

charmapping={hortab space}<br />

hortab space <br />

<strong>PDFlib</strong> API <br />

<br />

<br />

charmapping={hortab space CRLF space LF space CR space}<br />

<br />

charmapping={shy {shy 0}}<br />

200 8 : COM .NET REALbasic


8.1 <br />

Unicode <br />

VB <br />

<br />

<br />

<br />

<br />

<br />

U+0020 SP, space space <br />

U+00A0 NBSP, nbsp no-break space <br />

U+0009 VbTab HT, hortab ruler tabalignchar tabalignment <br />

<br />

U+002D HY, hyphen <br />

U+00AD SHY, shy soft hyphen <br />

<br />

U+000B<br />

U+2028<br />

VT, verttab<br />

LS, linesep<br />

nextline<br />

next line <br />

U+000A VbLf<br />

U+000D VbCr<br />

U+000D <br />

U+000A VbCrLf<br />

U+0085<br />

U+2029<br />

LF, linefeed<br />

CR, return<br />

CRLF<br />

NEL, newline<br />

PS, parasep<br />

nextparagraph<br />

next paragraph nextline parindent<br />

<br />

U+000C<br />

VbFormFeed<br />

FF, formfeed return fit_textflow( ) _nextpage <br />

<br />

charmapping={hortab {space 4}}<br />

<br />

charmapping={linefeed {linefeed -1}}<br />

<br />

charmapping={CRLF {space -1}}<br />

<br />

<br />

<br />

<br />

<br />

<br />

To fold the famous rocket looper proceed as follows:<br />

Take a sheet of paper. Fold it<br />

lengthwise in the middle.<br />

Then, fold down the upper corners. Fold the<br />

long sides inwards<br />

that the points A and B meet on the central fold.<br />

<br />

<br />

8.2 201


To fold the famous rocket looper proceed as follows:<br />

Take a sheet of paper. Fold it<br />

lengthwise in the middle.<br />

Then, fold down the upper corners. Fold the<br />

long sides inwards<br />

that the points A and B meet on the central fold.<br />

To fold the famous rocket looper proceed as follows: Take a sheet of<br />

paper. Fold it lengthwise in the middle. Then, fold down the upper<br />

corners. Fold the long sides inwards that the points A and B meet on<br />

the central fold.<br />

8.21<br />

<br />

charmapping <br />

<br />

/* */<br />

String optlist = "fontname=Helvetica fontsize=9 encoding=winansi alignment=justify "<br />

"charmapping {CRLF {space -1}}"<br />

/* */<br />

textflow = p.add_textflow(-1, text, optlist);<br />

if (textflow == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

result = p.fit_textflow(textflow, left_x, left_y, right_x, right_y, "");<br />

if (!result.equals("_stop"))<br />

{ /* ... */ }<br />

p.delete_textflow(textflow);<br />

charmapping <br />

<br />

8.2.7 <br />

<br />

<br />

<br />

U+00AD <br />

<br />

> cp1250 cp1258winansi iso8859-1 iso8859-16 <br />

<br />

> <br />

macroman &shy; <br />

U+002D <br />

<br />

<br />

<br />

<br />

<br />

Our paper planes are the ideal way of pas sing the time. We offer revolu tionary<br />

brand new dev elop ments of the tradi tional common paper planes. If your lesson,<br />

confe rence, or lecture turn out to be deadly boring, you can have a wonder ful time<br />

with our planes. All our models are folded from one paper sheet. They are exclu sively<br />

202 8 : COM .NET REALbasic


Our paper planes are the ideal way of<br />

passing the time. We offer revolutionary<br />

brand new developments of the<br />

traditional common paper planes. If<br />

your lesson, conference, or lecture turn<br />

out to be deadly boring, you can have<br />

a wonderful time with our planes. All<br />

our models are folded from one paper<br />

sheet. They are exclusively folded<br />

without using any adhesive. Several<br />

models are equipped with a folded<br />

landing gear enabling a safe landing<br />

on the intended location provided that<br />

you have aimed well. Other models are<br />

able to fly loops or cover long distances.<br />

Let them start from a vista point<br />

in the mountains and see where they<br />

touch the ground.<br />

8.22<br />

<br />

<br />

Our paper planes are the ideal way of<br />

passing the time. We offer revolutionary<br />

brand new developments of the<br />

traditional common paper planes. If<br />

your lesson, conference, or lecture turn<br />

out to be deadly boring, you can have<br />

a wonderful time with our planes. All<br />

our models are folded from one paper<br />

sheet. They are exclusively folded<br />

without using any adhesive. Several<br />

models are equipped with a folded<br />

landing gear enabling a safe landing<br />

on the intended location provided that<br />

you have aimed well. Other models are<br />

able to fly loops or cover long<br />

distances. Let them start from a vista<br />

point in the mountains and see where<br />

they touch the ground.<br />

8.23<br />

<br />

<br />

folded without using any adhe sive. Several models are equip ped with a folded<br />

landing gear enab ling a safe landing on the intended loca tion provided that you<br />

have aimed well. Other models are able to fly loops or cover long dist ances. Let them<br />

start from a vista point in the mount ains and see where they touch the ground.<br />

<br />

<br />

<br />

<br />

<br />

fontname=Helvetica fontsize=9 encoding=winansi alignment=justify<br />

8.2.8 <br />

<br />

<br />

<br />

<br />

<br />

-12+235/8*45 <br />

PDF-345+LIBRARY <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

alignment=justify <br />

<br />

<br />

8.2 203


adjustmethod<br />

advancedlinebreak<br />

avoidbreak<br />

charclass<br />

hyphenchar<br />

locale<br />

maxspacing<br />

minspacing<br />

<br />

minspacing maxspacing <br />

auto<br />

auto shrink spread nofit split <br />

clip<br />

nofit<br />

shrink<br />

split<br />

spread<br />

nofit rightindent <br />

<br />

nofitlimit <br />

<br />

<br />

shrinklimit <br />

nofit <br />

<br />

<br />

<br />

spreadlimit nofit <br />

<br />

<br />

locale script false<br />

true avoidbreak false false<br />

<br />

<br />

<br />

letter <br />

punct <br />

open <br />

close <br />

default <br />

charclass={ close » open « letter {/ : =} punct & }<br />

<br />

<br />

<br />

advancedlinebreak= true <br />

<br />

<br />

<br />

> <br />

en de ja language <br />

<br />

> <br />

Hira Hebr Thai <br />

> <br />

DE CH GB <br />

_none <br />

<br />

_none<br />

Thai de_DE en_US en_GB<br />

<br />

<br />

wordspacing minspacing=50% maxspacing=500%<br />

204 8 : COM .NET REALbasic


nofitlimit<br />

shrinklimit<br />

spreadlimit<br />

<br />

nofit <br />

<br />

shrink <br />

<br />

spread <br />

charspacing <br />

<br />

charclass <br />

<br />

<br />

charclass={letter /}<br />

avoidbreak <br />

noavoidbreak <br />

text_output/avoid_linebreaking <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

hyphenchar=none<br />

alignment=justify<br />

shrinklimit=100%<br />

spreadlimit=100%<br />

<br />

<br />

<br />

<br />

maxspacing <br />

<br />

split <br />

<br />

<br />

<br />

<br />

shrinklimit <br />

shrinklimit shrink <br />

8.2 205


Our paper planes<br />

are the ideal way of<br />

passing the time.We<br />

offer revolutionary<br />

brand new developments<br />

of the traditional<br />

common paper planes.<br />

If your lesson, conference,<br />

or lecture<br />

turn out to be deadly<br />

boring, you can have<br />

a wonderful time<br />

with our planes. All<br />

8.24 <br />

minspacing <br />

shrink shrinklimit <br />

split <br />

spread maxspacing <br />

shrinklimit=50% <br />

<br />

spreadlimit <br />

spread spreadlimit <br />

spreadlimit=5<br />

<br />

8.25 <br />

<br />

fit_textline( ) <br />

passing the time.We<br />

offer revolutionary<br />

brand new developments<br />

a) of the traditional<br />

alignment=justify shrinklimit=50%<br />

common paper planes.<br />

If your lesson, conference,<br />

or lecture turn out to<br />

Our paper planes<br />

are the ideal way of<br />

b)<br />

passing the time.We<br />

offer revolutionary<br />

alignment=justify spreadlimit=5<br />

b r a n d n e w<br />

developments of the<br />

ments of the traditional<br />

common paper planes.<br />

c)<br />

If your lesson,<br />

conference, or lecture<br />

alignment=justify nofitlimit=50<br />

turn out to be deadly<br />

boring, you can have<br />

nofitlimit nofitlimit nofit <br />

<br />

<br />

<br />

8.2.9 <br />

<br />

<br />

<br />

206 8 : COM .NET REALbasic


advancedlinebreak <br />

script <br />

locale <br />

<br />

> <br />

<br />

<br />

> «» <br />

<br />

<br />

<br />

<br />

locale language <br />

locale <br />

<br />

<br />

8.2.10 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

matchbox={name=img margin=-5} <br />

img <br />

result = p.fit_image(image, 50, 35,<br />

"boxsize={80 46} fitmethod=meet position=center matchbox={name=img margin=-5}");<br />

img <br />

wrap <br />

8.26<br />

<br />

Have a look at our new paper plane models! Our<br />

paper planes are the ideal way of passing the time.<br />

We offer revolutionary new<br />

developme-<br />

nts of the traditional<br />

com-<br />

mon paper planes.<br />

If your les-<br />

son, conference,<br />

or lecture<br />

turn out to be<br />

deadly bor- ing, you can<br />

have a wonderful time with our planes. All our<br />

models are folded from one paper sheet. They are<br />

exclusively folded without using any adhesive.<br />

8.27<br />

<br />

Our paper planes are 50% the ideal 80% way of passing the time.<br />

We offer a lot of revolutionary brand-new developments<br />

of the traditional common paper planes. If your<br />

lesson, conference, or lecture turn out to be<br />

deadly boring, you<br />

can have a wonderful<br />

time with our planes.<br />

All our models are<br />

folded from one<br />

paper sheet. They<br />

are exclusively<br />

folded without<br />

20% using 30% any<br />

adhesive. 80% 30%<br />

Several models are equipped with a folded landing gear.<br />

enabling a safe landing on the intended location provided<br />

that you have aimed well. Other models are able to fly<br />

loops or cover long distances.<br />

8.2 207


esult = p.fit_textflow(textflow, left_x, left_y, right_x, right_y,<br />

"wrap={usematchboxes={{img}}}");<br />

<br />

<br />

text_output/wrap_text_around_images <br />

<br />

<br />

<br />

fit_textflow( )<br />

wrap <br />

<br />

path = p.add_path_point( -1, 0, 100, "move", "");<br />

path = p.add_path_point(path, 200, 100, "control", "");<br />

path = p.add_path_point(path, 0, 100, "circular", "");<br />

/* */<br />

p.draw_path(path, x, y, "stroke");<br />

result = p.fit_textflow(tf, llx1, lly1, urx1, ury1,<br />

"wrap={paths={" +<br />

"{path=" + path + " refpoint={100% 50%} }" +<br />

"}}");<br />

p.delete_path(path);<br />

<br />

<br />

<br />

result = p.fit_textflow(tf, llx1, lly1, urx1, ury1,<br />

"wrap={inversefill paths={" +<br />

"{path=" + path + " refpoint={100% 50%} }" +<br />

"}}");<br />

<br />

<br />

<br />

load_image( ) <br />

clippingpathname <br />

fit_textflow( ) wrap <br />

scale<br />

<br />

image = p.load_image("auto", "image.tif", "clippingpathname={path 1}");<br />

/* */<br />

path = (int) p.info_image(image, "clippingpath", "");<br />

if (path == -1)<br />

throw new Exception(" : !");<br />

result = p.fit_textflow(tf, llx1, lly1, urx1, ury1,<br />

208 8 : COM .NET REALbasic


"wrap={paths={{path=" + path + " refpoint={50% 50%} scale=2}}}");<br />

p.delete_path(path);<br />

<br />

<br />

<br />

clippingpathname fit_image( ) <br />

<br />

fit_image( ) info_image( ) <br />

fit_image( ) x/y wrap paths <br />

refpoint <br />

image = p.load_image("auto", "image.tif", "clippingpathname={path 1}");<br />

/* */<br />

String imageoptlist = "scale=2";<br />

p.fit_image(image, x, y, imageoptlist);<br />

/* */<br />

path = (int) p.info_image(image, "clippingpath", imageoptlist);<br />

if (path == -1)<br />

throw new Exception(" : !");<br />

result = p.fit_textflow(tf, llx1, lly1, urx1, ury1,<br />

"wrap={paths={{path=" + path + " refpoint={" + x + " " + y + "} }}}");<br />

p.delete_path(path);<br />

fit_textflow( ) wrap <br />

<br />

<br />

<br />

<br />

<br />

<br />

wrap={ polygons={ {50% 80% 20% 30% 80% 30% 50% 80%} } }<br />

showborder=true wrap <br />

<br />

<br />

wrap={ polygons={ {50% 80% 20% 30% 80% 30% 50% 80%}<br />

{20% 90% 10% 70% 30% 70% 20% 90%} } }<br />

<br />

<br />

fixedleading=true <br />

<br />

text_output/wrap_text_around_polygons <br />

<br />

8.2 209


8.27<br />

<br />

<br />

50% 100%<br />

Our<br />

paper<br />

planes are<br />

the ideal way<br />

of passing the<br />

time. We offer a lot<br />

of revolutionary brandnew<br />

developments of the<br />

10% 50% traditional common paper<br />

planes. If your lesson, conference,<br />

or lecture turn<br />

out to be deadly boring,<br />

you can have<br />

a wonderful<br />

time with<br />

our planes.<br />

90% 50%<br />

8.28<br />

<br />

Our paper planes are<br />

the ideal way of passing<br />

the time. We offer<br />

revolutionary new developments<br />

of the traditional<br />

co- mmon paper<br />

planes. If your lesson,<br />

conf- erence, or<br />

lecture turn out to be<br />

deadly<br />

boring,<br />

you can have a wonderful<br />

time with our planes. All<br />

our models are folded<br />

from one paper sheet.<br />

50% 0%<br />

<br />

wrap addfitbox <br />

inversefill <br />

<br />

<br />

<br />

wrap={ addfitbox polygons={ {50% 100% 10% 50% 50% 0% 90% 50% 50% 100%} } }<br />

showborder=true <br />

addfitbox <br />

<br />

<br />

addfitbox<br />

<br />

<br />

wrap={ addfitbox polygons=<br />

{ {20% 10% 80% 10% 100% 50% 80% 90% 20% 90% 0% 50% 20% 10%}<br />

{35% 35% 65% 35% 65% 65% 35% 65% 35% 35%} } }<br />

addfitbox <br />

<br />

<br />

text_output/fill_polygons_with_text <br />

<br />

210 8 : COM .NET REALbasic


8.3 <br />

<br />

<br />

<br />

<strong>PDFlib</strong> tables <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

> <br />

<br />

fit_table( ) <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

1 Giant Wing<br />

Material<br />

Benefit<br />

2 Long Distance Glider<br />

Material<br />

Benefit<br />

3 Cone Head Rocket<br />

Our Paper Plane Models<br />

Offset print paper 220g/sqm<br />

It is amazingly robust and<br />

can even do aerobatics. But<br />

it is best suited to gliding.<br />

Drawing paper 180g/sqm<br />

With this paper rocket you<br />

can send all your messages<br />

even when sitting in the<br />

cinema pretty near the back.<br />

Amazingly robust!<br />

<br />

<br />

<br />

<br />

<br />

Material<br />

Benefit<br />

Kent paper 200g/sqm<br />

This paper arrow can be<br />

thrown with big swing. It<br />

stays in the air a long time.<br />

With big swing!<br />

8.29<br />

<br />

<br />

<strong>PDFlib</strong> API <br />

add_table_cell( ) <br />

fit_table( ) <br />

<br />

<br />

<br />

8.3 211


add_table_cell( ) fit_table( ) <br />

<br />

<br />

<br />

tables/starter_table <br />

8.3.1 <br />

<br />

<br />

<br />

<br />

<br />

fittextline font fontsize <br />

{left center} <br />

add_<br />

table_cell( ) <br />

<br />

<br />

fit_table( ) <br />

<br />

<br />

tables/vertical_text_alignment <br />

<br />

<br />

/* */<br />

String tf_text = "It is amazingly robust and can even do aerobatics. " +<br />

"But it is best suited to gliding.";<br />

/* 12 */<br />

int c1 = 80, c2 = 120;<br />

/* */<br />

double llx=100, lly=500, urx=300, ury=600;<br />

/* */<br />

font = p.load_font("Helvetica", "unicode", "");<br />

if (font == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* 1 */<br />

optlist = "fittextline={position={left center} font=" + font + " fontsize=8} margin==4" +<br />

colwidth=" + c1;<br />

/* 11 */<br />

tbl = p.add_table_cell(tbl, 1, 1, "Our Paper Planes", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* 12 */<br />

212 8 : COM .NET REALbasic


tbl = p.add_table_cell(tbl, 1, 2, "Material", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* 13 */<br />

tbl = p.add_table_cell(tbl, 1, 3, "Benefit", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* 2 */<br />

optlist = "fittextline={position={left center} font=" + font + " fontsize=8} " +<br />

"colwidth=" + c2 + " margin=4";<br />

/* 22 */<br />

tbl = p.add_table_cell(tbl, 2, 2, "Offset print paper 220g/sqm", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* */<br />

optlist = "font=" + font + " fontsize=8 leading=110%";<br />

tf = p.add_textflow(-1, tf_text, optlist);<br />

/* */<br />

optlist = "textflow=" + tf + " margin=4 colwidth=" + c2;<br />

/* 23 */<br />

tbl = p.add_table_cell(tbl, 2, 3, "", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

p.begin_page_ext(0, 0, "width=200 height=100");<br />

/* */<br />

optlist = "stroke={{line=frame linewidth=0.8} {line=other linewidth=0.3}}";<br />

/* */<br />

result = p.fit_table(tbl, llx, lly, urx, ury, optlist);<br />

/* _stopOK*/<br />

if (!result.equals("_stop")) {<br />

if (result.equals( "_error"))<br />

throw new Exception("" + p.get_errmsg());<br />

else {<br />

/* */<br />

}<br />

}<br />

p.end_page_ext("");<br />

/* */<br />

p.delete_table(tbl, "");<br />

<br />

<br />

<br />

optlist = "fittextline={position={left center} font=" + font +<br />

" fontsize=8} colwidth=80 margin=4";<br />

8.3 213


Benefit <br />

8.30 <br />

<br />

Our Paper Planes<br />

a)<br />

Material<br />

Benefit<br />

Offset print paper 220g/sqm<br />

It is amazingly robust and can<br />

even do aerobatics. But it is<br />

best suited to gliding.<br />

b)<br />

Our Paper Planes<br />

Material<br />

Benefit<br />

Offset print paper 220g/sqm<br />

It is amazingly robust and can<br />

even do aerobatics. But it is<br />

best suited to gliding.<br />

<br />

<br />

<br />

<br />

fontsize=8 <br />

capheight <br />

fontsize={capheight=6} <br />

margin=4 rowheight<br />

add_table_cell( )<br />

<br />

/* */<br />

optlist = "fittextline={position={left top} font=" + font +<br />

" fontsize={capheight=6}} rowheight=14 colwidth=80 margin=4";<br />

fontsize={capheight=6} <br />

margin=4 <br />

<br />

/* */<br />

optlist = "font=" + font + " fontsize={capheight=6} leading=110%";<br />

Benefit <br />

Benefit Material <br />

<br />

fittextflow={firstlinedist=capheight} <br />

<br />

/* */<br />

optlist = "textflow=" + tf + " fittextflow={firstlinedist=capheight} "<br />

"colwidth=120 margin=4";<br />

214 8 : COM .NET REALbasic


tables/vertical_text_alignment <br />

<br />

8.3.2 <br />

add_table_cell( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

....................<br />

..............................................<br />

..............................................<br />

<br />

8.31<br />

<br />

<br />

add_table_cell( ) text <br />

fittextline fit_textline( ) <br />

fitmethod=nofit <br />

fitmethod=auto shrinklimit<br />

<br />

boxheight <br />

{capheight none} <br />

<br />

<br />

add_table_cell( ) create_textflow( ) add_textflow( ) <br />

textflow <br />

fittextflow fit_textflow( ) <br />

<br />

fitmethod=clip <br />

<br />

<br />

fitmethod=auto minfontsize <br />

<br />

<br />

checkwordsplitting true <br />

<br />

add_table_cell( ) load_image( ) <br />

begin_template_ext( ) <br />

image fitimage <br />

fit_image( ) <br />

fitmethod=meet <br />

<br />

<br />

8.3 215


PDF add_table_cell( ) open_pdi_<br />

page( ) pdipage <br />

fitpdipage fit_pdi_page( ) <br />

fitmethod=meet <br />

<br />

<br />

add_table_cell( ) add_path_<br />

point( ) path <br />

fitpath draw_path( ) <br />

<br />

<br />

create_annotation( ) type <br />

add_table_cell( ) annotationtype <br />

fitannotation create_annotation( ) <br />

<br />

create_field( ) name type <br />

add_table_cell( ) <br />

fieldnamefieldtype fitfield create_<br />

field( ) <br />

<br />

<br />

add_table_cell( ) margin <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

8.32<br />

<br />

<br />

8.3.3 <br />

colspan <br />

rowspan <br />

216 8 : COM .NET REALbasic


1<br />

2<br />

3<br />

1 1<br />

1 2<br />

1 3<br />

............ ............ ............ <br />

...... ...... ...... <br />

<br />

2 3<br />

<br />

3 2<br />

....<br />

.... ....<br />

8.33<br />

<br />

<br />

4<br />

1 4<br />

<br />

2 4<br />

<br />

.... <br />

1 2 3<br />

colwidth <br />

<br />

<br />

1<br />

1<br />

1<br />

1<br />

1<br />

2<br />

3<br />

colspan=3<br />

colwidth=50<br />

colspan=2<br />

colwidth=50<br />

colspan=1<br />

colwidth=50<br />

colspan=1<br />

colwidth=50<br />

4<br />

2<br />

2<br />

3<br />

4<br />

colspan=1<br />

colwidth=100<br />

colspan=1<br />

colwidth=100<br />

3<br />

2<br />

rowspan=3<br />

colwidth=90<br />

8.34<br />

<br />

<br />

50 100 90<br />

240<br />

<br />

<br />

<br />

add_table_cell( ) colscalegroup <br />

<br />

<br />

<br />

Max. Load<br />

Range<br />

Weight<br />

Speed<br />

8.35<br />

<br />

<br />

<br />

Giant Wing<br />

12g<br />

18m<br />

14g<br />

8m/s<br />

Long Distance Glider<br />

5g<br />

30m<br />

11.2g<br />

5m/s<br />

Cone Head Rocket<br />

7g<br />

7m<br />

12.4g<br />

6m/s<br />

<br />

<br />

<br />

<br />

<br />

8.3 217


8.3.4 <br />

<br />

<br />

tables/mixed_table_contents <br />

<br />

<br />

<br />

<br />

double llx = 100, lly = 500, urx = 360, ury = 600; // <br />

int c1 = 50, c2 = 120, c3 = 90; // 3<br />

boldfont = p.load_font("Helvetica-Bold", "unicode", "");<br />

normalfont = p.load_font("Helvetica", "unicode", "");<br />

p.begin_page_ext(0, 0, "width=a4.width height=a4.height");<br />

<br />

<br />

<br />

<br />

optlist = "fittextline={font=" + boldfont + " fontsize=12 position=center} " +<br />

"margin=4 colspan=3 colwidth=" + c1;<br />

tbl = p.add_table_cell(tbl, 1, 1, "Our Paper Plane Models", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

1 Giant Wing <br />

<br />

<br />

<br />

fontsize={capheight=6} <br />

Giant Wing <br />

<br />

<br />

Giant Wing <br />

optlist = "fittextline={position={left top} font=" + boldfont +<br />

" fontsize={capheight=6}} rowheight=14 colwidth=" + c1 +<br />

" margin=4 colspan=2 matchbox={fillcolor={gray .92}}";<br />

tbl = p.add_table_cell(tbl, 1, 2, "1 Giant Wing", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

218 8 : COM .NET REALbasic


8.36 <br />

<br />

Our Paper Plane Models<br />

1 Giant Wing<br />

Material Offset print paper 220g/sqm<br />

Benefit It is amazingly robust and can<br />

even do aerobatics. But it is<br />

best suited to gliding.<br />

Amazingly robust!<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

MaterialBenefitOffset<br />

print paper Offset print paper <br />

<br />

<br />

optlist = "fittextline={position={left top} font=" + normalfont +<br />

" fontsize={capheight=6}} rowheight=14 colwidth=" + c1 + " margin=4";<br />

tbl = p.add_table_cell(tbl, 1, 3, "Material", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

tbl = p.add_table_cell(tbl, 1, 4, "Benefit", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

optlist = "fittextline={position={left top} font=" + normalfont +<br />

" fontsize={capheight=6}} rowheight=14 colwidth=" + c2 + " margin=4";<br />

tbl = p.add_table_cell(tbl, 2, 3, "Offset print paper 220g/sqm", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

It is amazingly <br />

<br />

fontsize={capheight=6} <br />

margin=4 <br />

<br />

tftext = "It is amazingly robust and can even do aerobatics. " +<br />

"But it is best suited to gliding.";<br />

optlist = "font=" + normalfont + " fontsize={capheight=6} leading=110%";<br />

tf = p.add_textflow(-1, tftext, optlist);<br />

if (tf == -1)<br />

throw new Exception("Error: " + p.get_errmsg());<br />

<br />

Benefit <br />

Benefit Material <br />

fittextflow={firstlinedist=capheight}<br />

<br />

8.3 219


optlist = "textflow=" + tf + " fittextflow={firstlinedist=capheight} " +<br />

"colwidth=" + c2 + " margin=4";<br />

tbl = p.add_table_cell(tbl, 2, 4, "", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

<br />

Amazingly robust! <br />

<br />

<br />

image = p.load_image("auto", "kraxi_logo.tif", "");<br />

if (image == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

optlist = "fittextline={font=" + boldfont + " fontsize=8} image=" + image +<br />

" colwidth=" + c3 + " rowspan=3 margin=4";<br />

tbl = p.add_table_cell(tbl, 3, 2, "Amazingly robust!", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

<br />

fit_table( ) <br />

int doc = p.open_pdi("kraxi_logo.pdf", "", 0);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

page = p.open_pdi_page(doc, pageno, "");<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

optlist = "fittextline={font=" + boldfont + " fontsize=9} pdipage=" + page +<br />

" colwidth=" + c3 + " rrowspan=3 margin=4";<br />

tbl = p.add_table_cell(tbl, 3, 2, "Amazingly robust!", optlist);<br />

if (tbl == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

fit_table( ) header=1<br />

fill area=header fillcolor={rgb<br />

0.8 0.8 0.87} stroke <br />

line=frame linewidth=0.8 <br />

line=other linewidth=0.3 <br />

<br />

optlist = "header=1 fill={{area=header fillcolor={rgb 0.8 0.8 0.87}}} " +<br />

"stroke={{line=frame linewidth=0.8} {line=other linewidth=0.3}}";<br />

result = p.fit_table(tbl, llx, lly, urx, ury, optlist);<br />

if (result.equals("_error"))<br />

throw new Exception("" + p.get_errmsg());<br />

220 8 : COM .NET REALbasic


p.end_page_ext("");<br />

8.3.5 <br />

<br />

fit_table( ) <br />

<br />

<br />

<br />

<br />

fit_table( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

Our Paper Plane Models<br />

3 Cone Head Rocket<br />

Material Kent paper 200g/sqm<br />

BenefitOur Paper This paper Plane arrow can Models be<br />

thrown with big swing. It<br />

2 Long Distance Glider<br />

stays in the air a long time.<br />

Material Drawing paper 180g/sqm<br />

BenefitOur Paper With this Plane paper rocket Models you<br />

1 Giant Wing<br />

can send all your messages<br />

even when sitting in the<br />

Material Offset print cinema paper pretty 220g/sqm near the back.<br />

Benefit It is amazingly robust and<br />

Amazingly robust!<br />

can even do aerobatics. But<br />

it is best suited to gliding.<br />

With big swing!<br />

3<br />

8.37<br />

<br />

<br />

<br />

<br />

<br />

2<br />

1<br />

<br />

<br />

<br />

do {<br />

/* */<br />

p.begin_page_ext(0, 0, "width=a4.width height=a4.height");<br />

/* */<br />

optlist = "header=1 stroke={{line=other}}";<br />

/* */<br />

result = p.fit_table(tbl, llx, lly, urx, ury, optlist);<br />

if (result.equals("_error"))<br />

throw new Exception("" + p.get_errmsg());<br />

p.end_page_ext("");<br />

} while (result.equals("_boxfull"));<br />

8.3 221


* _stopOK*/<br />

if (!result.equals("_stop")) {<br />

if (result.equals( "_error"))<br />

throw new Exception("" + p.get_errmsg());<br />

else {<br />

/* return<br />

* */<br />

throw new Exception ("");<br />

}<br />

}<br />

/* */<br />

p.delete_table(tbl, "");<br />

fit_table( ) header footer <br />

<br />

fill area=header area=footer <br />

n <br />

m <br />

fit_table( ) <br />

<br />

<br />

<br />

<br />

rowjoingroup <br />

<br />

<br />

<br />

<br />

<br />

vertshrinklimit <br />

fit_table( ) _error<br />

vertshrinklimit=100%<br />

fit_table( ) <br />

<br />

<br />

horshrinklimit fit_table( ) <br />

_error <br />

horshrinklimit=100% <br />

<br />

<br />

<br />

<br />

222 8 : COM .NET REALbasic


1<br />

1 Giant Wing<br />

Material<br />

Offset print paper 220g/sqm<br />

Our paper planes are the<br />

ideal way of passing the<br />

time. We offer revolutionary<br />

8.38<br />

<br />

<br />

2<br />

Benefit<br />

It is amazingly robust and<br />

can even do aerobatics. But<br />

it is best suited to gliding.<br />

new developments of the<br />

traditional common paper<br />

planes.<br />

<br />

fit_table( ) minrowheight <br />

<br />

<br />

minrowheight <br />

<br />

It's amazingly robust <br />

<br />

Benefit <br />

<br />

1<br />

1 Giant Wing<br />

Material<br />

Benefit<br />

Offset print paper 220g/sqm<br />

It is amazingly robust and<br />

can even do aerobatics. But<br />

8.39<br />

<br />

<br />

2<br />

Benefit<br />

it is best suited to gliding.<br />

8.3.6 <br />

<br />

<br />

<br />

fit_table( ) colwidth rowheight fittextline <br />

fittextflow <br />

<br />

<br />

colwidth rowheight <br />

fittextline <br />

<br />

boxheight {capheight<br />

none} <br />

<br />

<br />

8.3 223


colwidth rowheight <br />

<br />

<br />

colwidth <br />

rowheight <br />

<br />

rowheight <br />

<br />

<br />

<br />

<br />

<br />

<br />

fitmethod=auto <br />

fittextline <br />

fitmethod=auto <br />

colscalegroup <br />

<br />

<br />

<br />

<br />

checkwordsplitting=false <br />

<br />

info_table( ) horboxgap <br />

<br />

<br />

<br />

fitmethod=auto continuetextflow <br />

<br />

<br />

<br />

<br />

rowscalegroup <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

repeatcontent=false <br />

224 8 : COM .NET REALbasic


owjoingroup <br />

<br />

<br />

<br />

<br />

return <br />

<br />

<br />

<br />

fit_table( ) minrowheight <br />

<br />

minrowheight <br />

<br />

info_table( ) rowsplit <br />

<br />

<br />

<br />

<br />

horshrinklimit <br />

info_table( ) horshrinking <br />

horshrinklimit <br />

Calculated table width $1 is too large (> $2, shrinking $3)")<br />

horshrinklimit <br />

<br />

<br />

<br />

fit_table( ) rewind=1 <br />

8.3 225


8.4 <br />

<br />

<br />

fit_textline( ) fit_image( ) matchbox <br />

<br />

> <br />

> create_annotation( ) <br />

> fit_textline( ) <br />

<br />

boxheight <br />

> <br />

> info_matchbox( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

fitmethod=slice fitmethod=clip <br />

fit_image( ) <br />

rect( ) <br />

info_matchbox( ) <br />

fit_image( ) <br />

<br />

<strong>PDFlib</strong> API <br />

<br />

8.4.1 <br />

fit_textline( ) <br />

<br />

<br />

<br />

<br />

String optlist =<br />

"font=" + normalfont + " fontsize=8 position={left top} " +<br />

"matchbox={fillcolor={rgb 0.8 0.8 0.87} boxheight={capheight none}}";<br />

p.fit_textline("Giant Wing Paper Plane", 2, 20, optlist);<br />

boxheight boxheight={capheight none} <br />

boxheight <br />

<br />

boxheight={fontsize descender}<br />

<br />

226 8 : COM .NET REALbasic


text_output/text_on_color <br />

8.40 <br />

<br />

Giant Wing Paper Plane<br />

fit_textline( ) matchbox <br />

<br />

a) boxheight={capheight none}<br />

Giant Wing Paper Plane<br />

b) boxheight={ascender descender}<br />

Giant Wing Paper Plane<br />

c) boxheight={fontsize descender}<br />

d)<br />

Giant Wing Paper Plane<br />

boxheight={fontsize descender} borderwidth=0.3<br />

offsetleft=-2 offsetright=2 offsetbottom=-2<br />

8.4.2 <br />

<br />

very dangerous <br />

matchbox matchbox=end <br />

<br />

8.41 matchbox <br />

<br />

It is very dangerous to fly<br />

the Giant Wing in a<br />

thunderstorm.<br />

create_textflow( ) <br />

<br />

It is very dangerous<br />

to fly the Giant Wing in a<br />

thunderstorm.<br />

Web <br />

<br />

kraxi <br />

Link <br />

kraxi <br />

create_annotation( ) <br />

text_output/weblink_in_textflow <br />

<br />

/* kraxi */<br />

String tftext =<br />

"For more information about the Giant Wing Paper Plane see the Web site of " +<br />

"" +<br />

"Kraxi Systems, Inc.";<br />

String optlist = "font=" + normalfont + " fontsize=8 leading=110%";<br />

tflow = p.create_textflow(tftext, optlist);<br />

if (tflow == -1)<br />

8.4 227


throw new Exception("" + p.get_errmsg());<br />

result = p.fit_textflow(tflow, 0, 0, 50, 70, "fitmethod=auto");<br />

if (!result.equals("_stop"))<br />

{ /* ... */ }<br />

/* URI */<br />

optlist = "url={http://www.kraxi.com}";<br />

act = p.create_action("URI", optlist);<br />

/* kraxiLink */<br />

optlist = "action={activate " + act + "} linewidth=0 usematchbox={kraxi}";<br />

p.create_annotation(0, 0, 0, 0, "Link", optlist);<br />

create_annotation( ) <br />

<br />

For information about<br />

Giant Wing Paper<br />

Planes see the Web<br />

site of Kraxi Systems,<br />

Inc.<br />

8.42<br />

<br />

Web <br />

8.4.3 <br />

<br />

<br />

<br />

<br />

String optlist = "boxsize={130 130} fitmethod=meet matchbox={name=kraxi}";<br />

p.fit_image(image, 10, 10, optlist);<br />

interactive/link_annotations <br />

<br />

<br />

fitmethod=meet <br />

borderwidth matchbox <br />

strokecolor linecap<br />

linejoin <br />

images/frame_around_image <br />

<br />

offset <br />

<br />

fit_image( ) <br />

228 8 : COM .NET REALbasic


8.43 <br />

<br />

fit_image( ) <br />

boxsize={60 60} position={center} fitmethod=meet<br />

matchbox={name=kraxi borderwidth=4 offsetleft=-2 offsetright=2<br />

offsetbottom=-2 offsettop=2 linecap=round linejoin=round<br />

strokecolor {rgb 0.0 0.3 0.3}}<br />

<br />

meet <br />

info_matchbox( ) <br />

(x2, y2) <br />

<br />

images/align_text_at_image<br />

<br />

<br />

/* */<br />

String optlist = "boxsize={300 200} position={center} fitmethod=meet " +<br />

"matchbox={name=giantwing borderwidth=3 strokecolor={rgb 0.85 0.83 0.85}}";<br />

/* */<br />

/* */<br />

if ((int) p.info_matchbox("giantwing", 1, "exists") == 1)<br />

{<br />

x1 = p.info_matchbox("giantwing", 1, "x2");<br />

y1 = p.info_matchbox("giantwing", 1, "y2");<br />

}<br />

/* 2 */<br />

p.fit_textline("Foto: Kraxi", x2+2, y2+2, "font=" + font + " fontsize=8 orientate=west");<br />

8.44 <br />

<br />

<br />

Foto: Kraxi<br />

(x2, y2)<br />

<br />

<br />

orientate=west <br />

<br />

8.4 229


230 8 : COM .NET REALbasic


9pCOS<br />

<strong>PDFlib</strong> Comprehensive Object Syntax <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

www.adobe.com/devnet/pdf/pdf_reference.html <br />

9.1 pCOS <br />

pCOS <strong>PDFlib</strong> <br />

pCOS <br />

PDF_pcos_get_number( ) PDF_<br />

pcos_get_string( ) PDF_pcos_get_stream( ) <br />

<br />

<br />

<br />

<br />

length:pages <br />

/Info/Title <br />

<br />

Title Author Subject Keywords Creator Producer <br />

CreationDate ModDate Trapped<br />

/Root/Metadata <br />

fonts[...]/name length:fonts <br />

<br />

fonts[...]/vertical <br />

fonts[...]/embedded <br />

pages[...]/width <br />

<br />

<br />

pagecount = p.pcos_get_number(doc, "length:pages");<br />

<br />

<br />

objtype = p.pcos_get_string(doc, "type:/Info/Title");<br />

if (objtype.equals("string"))<br />

{<br />

/* */<br />

9.1 pCOS 231


}<br />

title = p.pcos_get_string(doc, "/Info/Title");<br />

MediaBox CropBox Rotate <br />

<br />

pages width height <br />

pages<br />

<br />

pagenum = 2<br />

width = p.pcos_get_number(doc, "pages[" + pagenum + "]/width");<br />

height = p.pcos_get_number(doc, "pages[" + pagenum + "]/height");<br />

<br />

<br />

fontcount = p.pcos_get_number(doc, "length:fonts");<br />

for (i=0; i < fontcount; i++)<br />

{<br />

fontname = p.pcos_get_string(doc, "fonts[" + i + "]/name");<br />

embedded = p.pcos_get_number(doc, "fonts[" + i + "]/embedded");<br />

}<br />

char_info fontid <br />

<br />

if (p.pcos_get_number(doc, "fonts[" + ci->fontid + "]/vertical"))<br />

{<br />

/* */<br />

}<br />

pcosmode <br />

<br />

if (p.pcos_get_number(doc, "pcosmode") == 2)<br />

{<br />

/* pCOS */<br />

}<br />

XMP <br />

<br />

<br />

objtype = p.pcos_get_string(doc, "type:/Root/Metadata");<br />

if (objtype.equals("stream"))<br />

{<br />

/* XMP */<br />

metadata = p.pcos_get_stream(doc, "", "/Root/Metadata");<br />

}<br />

232 9 : pCOS COM .NET REALbasic


9.2 PDF <br />

PDF_pcos_get_number( )PDF_pcos_get_string( )PDF_pcos_get_stream( )<br />

<br />

<br />

PDF_pcos_get_number( ) <br />

<br />

PDF_pcos_get_string( ) <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

PDF_pcos_get_string( ) <br />

<br />

<br />

PDF_pcos_get_stream( ) <br />

PDF_pcos_get_number( ) <br />

PDF_pcos_get_string( ) <br />

true false <br />

PDF_pcos_get_stream( ) <br />

stream fstream <br />

PDF_pcos_get_stream( ) keepfilter stream<br />

<br />

<br />

<br />

filterinfo <br />

<br />

stream stream <br />

PDF_pcos_get_stream( ) <br />

<br />

pCOS JBIG2 JPX<br />

<br />

fstream fstream <br />

PDF_pcos_get_stream( ) <br />

<br />

<br />

PDF_pcos_get_stream( ) <br />

<br />

<br />

<br />

<br />

9.2 PDF 233


get_stream( ) <br />

convert=unicode <br />

234 9 : pCOS COM .NET REALbasic


9.3 ID<br />

<br />

<br />

<br />

<br />

<br />

<br />

N <br />

length N-1 <br />

<br />

<br />

<br />

null <br />

N <br />

length N-1 <br />

.key <br />

<br />

.val <br />

length <br />

<br />

MediaBox<br />

<br />

<br />

<br />

<br />

<br />

pages[ ] <br />

/Pages objects[ ] <br />

pages[ ][ ] <br />

<br />

pCOS ID <br />

<br />

<br />

<br />

pcosid <br />

<br />

<br />

objects[] <br />

<br />

9.3 ID 235


9.4 <br />

<br />

<br />

<br />

<br />

PDF_pcos_get_number( ) PDF_pcos_get_string( ) PDF_pcos_<br />

get_stream( ) <br />

<br />

[:][[]]/[]/[] ... [.key|.val]<br />

<br />

> <br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

> .key .val <br />

<br />

<br />

<br />

<br />

pCOS <br />

<br />

<br />

<br />

> / [ ] # <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

ebcdic <br />

<br />

<br />

<br />

<br />

236 9 : pCOS COM .NET REALbasic


length <br />

<br />

pcosid type <br />

<br />

<br />

<br />

length<br />

pcosid<br />

type<br />

<br />

<br />

<br />

array <br />

dict <br />

stream <br />

Length <br />

fstream <br />

<br />

<br />

- <br />

<br />

<br />

<br />

0, null <br />

<br />

1, boolean <br />

2, number <br />

3, name <br />

4, string <br />

5, array <br />

6, dict <br />

7, stream <br />

8, fstream <br />

<br />

9.4 237


9.5 <br />

<br />

<br />

<br />

dict <br />

<br />

<br />

requiredmode <br />

<br />

<br />

<br />

<br />

encrypt<br />

extensionlevel<br />

filename<br />

filesize<br />

<br />

<br />

length <br />

algorithm <br />

description <br />

-1 <br />

0 <br />

1 <br />

2 <br />

3 <br />

4 <br />

5 <br />

6 <br />

7 <br />

8 <br />

9 <br />

10 <br />

master <br />

true false<br />

user true false<br />

noaccessible noannots noassemble nocopy noforms nohiresprint nomodify noprint<br />

true false<br />

plainmetadata<br />

true false<br />

<br />

<br />

<br />

<br />

238 9 : pCOS COM .NET REALbasic


fullpdfversion<br />

<br />

<br />

BaseVersion ExtensionLevel <br />

150 <br />

160 <br />

170 <br />

173 <br />

linearized<br />

major<br />

minor<br />

revision<br />

pcosinterface<br />

pdfversion<br />

pcosmode<br />

pcosmodename<br />

pdfversionstring<br />

version<br />

true false<br />

<br />

<br />

<br />

1 <br />

2 <br />

3 <br />

4 <br />

5 <br />

<br />

0 <br />

1 <br />

2 <br />

<br />

<br />

<br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

<br />

<br />

articles<br />

<br />

<br />

articles <br />

<br />

beads <br />

destpage <br />

9.5 239


ookmarks<br />

fields<br />

names<br />

objects<br />

<br />

<br />

bookmarks <br />

level <br />

destpage<br />

<br />

<br />

<br />

fields <br />

<br />

level <br />

<br />

fullname <br />

AP <br />

AlternatePresentations Dests EmbeddedFiles IDS JavaScript Pages Renditions Templates <br />

URLS<br />

<br />

names/Dests[0].key <br />

names/Dests[0].val <br />

Dests <br />

<br />

destpage<br />

<br />

<br />

/Root/<br />

Names/Dests <br />

pcosid <br />

<br />

length <br />

240 9 : pCOS COM .NET REALbasic


pages<br />

pdfa<br />

pdfe<br />

pdfx<br />

tagged<br />

<br />

<br />

<br />

<br />

/Pages /MediaBox <br />

/Rotate <br />

<br />

colorspaces extgstates fonts images patterns properties shadings templates<br />

<br />

annots annots <br />

<br />

destpage Subtype=Link Dest <br />

<br />

blocks pages[ ]/PieceInfo/<strong>PDFlib</strong>/Private/Blocks[ ] <br />

blocks <br />

<br />

rect <br />

<br />

height <br />

<br />

isempty true false<br />

label <br />

<br />

<br />

<br />

/Root/PageLabels <br />

width <br />

CropBox MediaBox Resources Rotate<br />

none PDF/A-1a:2005 PDF/A-1b:2005 PDF/A-<br />

2a PDF/A-2b PDF/A-2u<br />

none PDF/E-1<br />

none <br />

PDF/X-1:2001 PDF/X-1a:2001 PDF/X-1a:2003 <br />

PDF/X-2:2003 <br />

PDF/X-3:2002 PDF/X-3:2003 <br />

PDF/X-4 PDF/X-4p <br />

PDF/X-5g PDF/X-5n PDF/X-5p<br />

true false<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

9.5 241


<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> images[ ] <br />

<br />

<br />

> pages[ ]/images[ ] <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

P[ ] pages[ ]/P[ ]<br />

<br />

<br />

<br />

colorspaces<br />

<br />

<br />

<br />

alternateid<br />

name=Separation DeviceN <br />

colorspaces[] <br />

baseid name=Indexed colorspaces[] <br />

<br />

colorantname<br />

name=Separation <br />

<br />

colorantnames<br />

name=DeviceN <br />

components<br />

<br />

name CalGray CalRGB DeviceCMYK DeviceGray DeviceN <br />

DeviceRGB ICCBased Indexed Lab Separation<br />

csarray name=DeviceGray/RGB/CMYK <br />

<br />

<br />

<br />

<br />

242 9 : pCOS COM .NET REALbasic


P[ ] pages[ ]/P[ ]<br />

<br />

<br />

<br />

extgstates<br />

fonts<br />

images<br />

<br />

<br />

<br />

<br />

name <br />

<br />

embedded <br />

type (unknown) Composite Multiple Master OpenType <br />

TrueType TrueType (CID) Type 1 Type 1 (CID) Type 1 CFF Type 1 CFF (CID) Type 3<br />

vertical true false<br />

<br />

<br />

<br />

bpc BitsPerComponent <br />

<br />

<br />

<br />

colorspaceid<br />

colorspaces[] <br />

<br />

<br />

filterinfo keepfilter true <br />

<br />

filterinfo <br />

<br />

name <br />

supported true<br />

decodeparms<br />

DecodeParms <br />

mergetype <br />

0 <br />

1 mergetype=2 <br />

<br />

<br />

2 <br />

<br />

mergetype=1 <br />

<br />

<br />

<br />

length:images <br />

<br />

patterns<br />

properties<br />

<br />

<br />

9.5 243


P[ ] pages[ ]/P[ ]<br />

<br />

<br />

<br />

shadings<br />

templates<br />

<br />

<br />

<br />

colorspaceid<br />

colorspaces[] <br />

Form XObject<br />

244 9 : pCOS COM .NET REALbasic


9.6 PDF <br />

<br />

<br />

<br />

<br />

<br />

pCOS <br />

<br />

<br />

<br />

pCOS <br />

<br />

<br />

stream fstream <br />

> nocopy=false plainmetadata=true /Root/Metadata /Info/*<br />

<br />

> nocopy=false <br />

bookmarks[]/Title pages[...]/annots/Contents <br />

<br />

pCOS <br />

encrypt <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

9.6 PDF 245


246 9 : pCOS COM .NET REALbasic


10 PDF <br />

10.1 Acrobat PDF <br />

<br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

begin_document( ) compatibility <br />

<br />

<br />

<br />

PDI PDF <br />

<br />

compatibility <br />

<br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

PDF <br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

begin_document( ) viewports<br />

load_image( ) georeference<br />

begin_document( ) portfolio<br />

add_portfolio_folder( )<br />

begin_document( ) compatibility=1.7ext3 <br />

masterpassword userpassword attachmentpassword permissions <br />

<br />

set_layer_dependency( ) Variant<br />

<br />

10.1 Acrobat PDF 247


open_pdi_page( ) begin_template_ext( ) reference <br />

<br />

<br />

add_portfolio_file( )<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

begin/end_document( ) userunit<br />

begin/end_document( ) viewerpreferences <br />

printscaling<br />

begin/end_document( ) openmode=attachments<br />

begin_document( ) compatibility=1.6 1.7 <br />

masterpassword userpassword attachmentpassword permissions <br />

<br />

begin/end_document( ) attachmentpassword<br />

begin/end_document( ) attachments <br />

description<br />

load_3ddata( ) create_3dview( ) create_annotation( ) type=3D<br />

<br />

create_field( ) create_fieldgroup( )<br />

<br />

begin/end_document( ) pagelayout=twopageleft/right<br />

create_annotation( )<br />

<br />

<br />

<br />

<br />

begin_document( ) permissions=plainmetadata <br />

load_font( ) <br />

begin_item( ) <br />

begin/end_page_ext( ) taborder<br />

define_layer( ) begin_layer( ) end_layer( ) layer_dependency( )<br />

<br />

<br />

load_image( ) imagetype=jpeg2000<br />

compatibility=1.5 begin_<br />

document( ) objectstreams=none <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

shading_pattern( ) shfill( ) shading( )<br />

<br />

load_image( )<br />

load_image( ) imagetype=jbig2<br />

userpassword masterpassword permissions begin_<br />

document( )<br />

permissions begin_document( ) <br />

248 10 : PDF COM .NET REALbasic


load_font( ) <br />

alphaisshape blendmode opacityfill opacitystroke <br />

textknockout create_gstate( )<br />

create_action( )<br />

create_annotation( )<br />

create_field( ) create_fieldgroup( )<br />

<br />

<br />

<br />

begin_document( ) tagged <br />

open_pdi_page( ) begin_template_ext( ) reference <br />

<br />

10.1 Acrobat PDF 249


10.2 ISO 32000<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

compatibility=pdf1.7ext3 <br />

250 10 : PDF COM .NET REALbasic


10.3 PDF/X <br />

10.3.1 PDF/X <br />

<br />

<br />

<br />

<br />

PDF/X-1a:2001 ISO 15930-1 <br />

<br />

<br />

<br />

<br />

PDF/X-1a:2003 ISO 15930-4 <br />

<br />

<br />

<br />

PANTONE® PDF/X-1a <br />

PDF/X-3:2002 ISO 15930-3 <br />

<br />

<br />

<br />

PDF/X-3:2003 ISO 15930-6 <br />

<br />

PDF/X-4 ISO 15930-7 <br />

<br />

> <br />

<br />

> <br />

<br />

PDF/X-5 ISO 15930-8 <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

1. www.globalgraphics.com/products/pdfx/index.html PDF/X FAQ <br />

10.3 PDF/X 251


Acrobat Acrobat <br />

9 9.3.1 PDF/X-5 <br />

10.3.2 PDF/X <br />

PDF/X <strong>PDFlib</strong> pdfx <br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

begin_document( ) pdfx <br />

<br />

begin_document( ) load_iccprofile( ) usage=outputintent <br />

process_pdi( ) action=copyoutputintent <br />

<br />

<br />

<br />

<br />

<br />

<br />

load_font( ) embedding true <br />

<br />

<br />

252 10 : PDF COM .NET REALbasic


RGB<br />

CMYK<br />

<br />

<br />

cropbox bleedbox trimbox artbox <br />

<br />

> <br />

<br />

<br />

> <br />

<br />

> <br />

setcolor( ) <br />

begin_page_ext( ) defaultgray <br />

<br />

setcolor( ) <br />

begin_page_ext( ) defaultrgb <br />

<br />

setcolor( ) <br />

begin_page_ext( ) defaultcmyk <br />

<br />

Creator Title set_info( ) <br />

begin/end_document( ) metadata CreatorTool dc:title <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

RGB<br />

CMYK<br />

ICC <br />

Lab<br />

<br />

<br />

<br />

JavaScript<br />

<br />

begin_page_ext( ) defaultgray <br />

begin_page_ext( ) defaultrgb <br />

<br />

begin_page_ext( ) defaultcmyk <br />

setcolor( ) iccbasedgray/rgb/cmyk setcolor:iccprofilegray/<br />

rgb/cmyk <br />

setcolor( ) <br />

<br />

create_annotation( ) create_field( )<br />

<br />

10.3 PDF/X 253


PDF <br />

<br />

PDF PDI<br />

<br />

<br />

<br />

<br />

load_image( ) OPI-1.3 OPI-2.0 <br />

load_image( )<br />

masked <br />

<br />

load_image( ) ignoremask create_gstate( ) <br />

opacityfill opacitystroke <br />

<br />

<br />

begin/end_page_ext( ) begin_template_ext( ) open_pdi_page( ) transparencygroup <br />

<br />

transparencygroup colorspace <br />

<br />

> <br />

begin_<br />

page_ext( ) defaultgray <br />

> <br />

begin_page_ext( ) defaultrgb<br />

<br />

> <br />

begin_page_ext( ) <br />

defaultcmyk <br />

begin/end_document( ) viewerpreferences viewarea viewclip <br />

printarea printclip media bleed <br />

<br />

set_info( ) Trapped pdf:Trapped<br />

True False <br />

begin_document( ) userpassword masterpassword permissions <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

254 10 : PDF COM .NET REALbasic


egin_template_ext( ) open_pdi_page( ) reference <br />

<br />

begin_template_ext( ) open_pdi_page( ) reference <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

set_layer_dependency( ) <br />

type=variant <br />

> define_layer( ) set_layer_dependency( ) <br />

<br />

<br />

<br />

10.3.3 <br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

StandardOutputIntent <br />

<br />

<br />

<br />

<br />

if (p.load_iccprofile("CGATS TR 001", "usage=outputintent") == -1)<br />

{<br />

/* */<br />

}<br />

<br />

<br />

<br />

> <br />

p <br />

10.3 PDF/X 255


urls <br />

<br />

if (p.load_iccprofile("CGATS TR 001",<br />

"usage=outputintent urls={http://www.color.org}") == -1)<br />

{<br />

/* */<br />

}<br />

PDF/X <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

10.3.4 PDI PDF/X <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

256 10 : PDF COM .NET REALbasic


PDF/X-1a:2001<br />

PDF/X-1a:2003<br />

PDF/X-3:2002<br />

PDF/X-3:2003<br />

PDF/X-4<br />

PDF/X-4p<br />

PDF/X-5g<br />

PDF/X-5pg<br />

PDF/X-1a:2001<br />

<br />

PDF/X-1a:2003 <br />

PDF/X-3:2002 <br />

PDF/X-3:2003 <br />

PDF/X-4 <br />

PDF/X-4p <br />

PDF/X-5g <br />

PDF/X-5pg <br />

process_pdi( ) action=copyoutputintent <br />

open_pdi_page( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

pdfxlevel = p.pcos_get_string(doc, "pdfx");<br />

<br />

none <br />

begin_document( ) pdfx <br />

<br />

PDF/X <br />

<br />

ret = p.process_pdi(doc, -1, "action=copyoutputintent");<br />

load_iccprofile( ) <br />

<br />

<br />

<br />

<br />

load_iccprofile( ) usage=outputintent <br />

<br />

10.3 PDF/X 257


10.4 PDF/A <br />

10.4.1 PDF/A <br />

<br />

<br />

<br />

PDF/A <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

www.pdfa.org <br />

<br />

Member of…<br />

ISO 19005-1 PDF/A-1a:2005 PDF/A-1b:2005 <br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

> <br />

10.4.2 PDF/A <br />

PDF/A <strong>PDFlib</strong> pdfa <br />

<br />

<br />

258 10 : PDF COM .NET REALbasic


<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

PDF/A-1b <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

RGB<br />

CMYK<br />

<br />

begin_document( ) pdfa PDF/A-<br />

1a:2005 PDF/A-1b:2005 <br />

<br />

begin_document( ) load_iccprofile( ) usage=outputintent <br />

process_pdi( ) action=copyoutputintent <br />

<br />

<br />

load_iccprofile( ) embedprofile <br />

load_font( ) embedding <br />

<br />

<br />

optimizeinvisible <br />

<br />

setcolor( ) <br />

begin_page_ext( ) defaultgray<br />

<br />

setcolor( ) <br />

begin_page_ext( ) defaultrgb <br />

<br />

setcolor( ) <br />

begin_page_ext( ) defaultcmyk <br />

<br />

<br />

<br />

<br />

<br />

<br />

10.4 PDF/A 259


JavaScript<br />

<br />

ICC<br />

<br />

<br />

<br />

<br />

<br />

PDF /<br />

<br />

PDF PDI<br />

<br />

<br />

<br />

<br />

create_annotation( ) type=FileAttachment zoom rotate true<br />

annotcolor interiorcolor <br />

fillcolor <br />

<br />

<br />

create_field( ) create_fieldgroup( ) <br />

create_action( ) type=Hide Launch ResetForm ImportData JavaScript <br />

type=name NextPage PrevPage FirstPage LastPage <br />

load_image( ) OPI-1.3 OPI-2.0 interpolate=true <br />

load_iccprofile( ) <br />

<br />

<br />

<br />

<br />

begin_template_ext( ) OPI-1.3 OPI-2.0 <br />

load_image( ) masked <br />

<br />

load_image( ) ignoremask <br />

create_gstate( ) opacityfill opacitystroke blendmode <br />

Normal <br />

create_annotation( ) opacity <br />

begin/end_page_ext( ) begin_template_ext( ) open_pdi_page( ) transparencygroup <br />

<br />

begin_document( ) userpassword masterpassword permissions <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

begin_template_ext( ) open_pdi_page( ) reference <br />

<br />

<br />

<br />

PDF/A-1a <br />

<br />

<br />

<br />

<br />

<br />

<br />

260 10 : PDF COM .NET REALbasic


PDF<br />

<br />

<br />

<br />

<br />

<br />

> begin/end_document( ) Lang <br />

<br />

> begin_item( ) Lang <br />

<br />

> begin_item( ) Alt <br />

<br />

> begin_item( )<br />

ActualText <br />

> begin_item( ) E <br />

<br />

create_annotation( ) contents <br />

<br />

<br />

<br />

PDF PDI<br />

<br />

load_font( ) monospace unicodemap=false autocidfont=false <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

icc = p.load_iccprofile("sRGB", "usage=outputintent");<br />

<br />

process_pdi( ) action=copyoutputintent <br />

<br />

PDF/A PDF/X <br />

<br />

begin_document( ) pdfa <br />

pdfx <br />

ret = p.begin_document("combo.pdf", "pdfx=PDF/X-4 pdfa=PDF/A-1b:2005");<br />

<br />

<br />

embedprofile <br />

10.4 PDF/A 261


10.4.3 PDF/A PDI <br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> PDF PDF/A PDF <br />

PDF/A <br />

<br />

<br />

open_pdi_<br />

document( ) <br />

<br />

<br />

<br />

<br />

<br />

pdfa/import_pdfa <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

pdfalevel = p.pcos_get_string(doc, "pdfa");<br />

262 10 : PDF COM .NET REALbasic


none <br />

begin_document( ) pdfa <br />

<br />

PDF/A <br />

<br />

<br />

<br />

<br />

pdfa/import_pdfa <br />

load_iccprofile( ) <br />

<br />

<br />

<br />

load_iccprofile( ) usage outputintent <br />

<br />

begin_document( ) <br />

10.4.4 PDF/A <br />

<br />

<br />

<br />

<br />

<br />

<br />

> load_image( ) <br />

> setcolor( ) <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

ICC<br />

<br />

RGBICC<br />

sRGB<br />

<br />

<br />

CMYKICC <br />

<br />

<br />

10.4 PDF/A 263


(0, 0, 0) <br />

<br />

<br />

<br />

<br />

<br />

p.setcolor("fillstroke", "lab", 0, 0, 0, 0);<br />

<br />

<br />

<br />

<br />

<br />

PDF/A www.pdfa.org PDF/A <br />

Technical Note 0002 <br />

10.4.5 PDF/A XMP <br />

<br />

<br />

<br />

<br />

<br />

<br />

CreationDate <br />

begin/end_document( ) metadata <br />

<br />

<br />

<br />

/Root/Metadata <br />

<br />

interchange/import_xmp_from_pdf <br />

<br />

XMP <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

1. www.aiim.org/documents/standards/xmpspecification.pdf <br />

264 10 : PDF COM .NET REALbasic


XMP <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

begin_document( ) end_document( ) <br />

metadata <br />

XMP pdfa/pdfa_extension_schemapdfa/<br />

pdfa_extension_schema_with_type <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

10.4 PDF/A 265


10.4.6 PDF/A <br />

PDF/A <br />

<br />

<br />

<br />

www.pdflib.com/developer/pdfa/validation-report<br />

Acrobat 9.1 <br />

<br />

<br />

<br />

Acrobat 9.0 <br />

<br />

<br />

<br />

Acrobat PDF/A <br />

10.4.7 PDF/A Acrobat <br />

<br />

... PDF/A <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

266 10 : PDF COM .NET REALbasic


10.5 PDF<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> PDF <br />

<br />

<br />

PDF <strong>PDFlib</strong> document_<br />

interchange <br />

10.5.1 <strong>PDFlib</strong> PDF <br />

document_interchange/starter_tagged <br />

<br />

<br />

<br />

<br />

<br />

<br />

PDF<br />

<br />

<br />

<br />

begin_document( ) tagged true <br />

begin_document( ) lang <br />

<br />

<br />

<br />

begin_item( ) end_item( ) <br />

Unicode <br />

<br />

<br />

<br />

<br />

<br />

begin_item( ) ActualText Alt <br />

begin_mc( ) ActualText <br />

<br />

<br />

<br />

<br />

10.5 PDF 267


PDF <br />

<br />

<br />

<br />

ActualText <br />

<br />

<br />

Artifact <br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> API <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

ASpan begin_item( ) <br />

inline <br />

<br />

inline=false <br />

268 10 : PDF COM .NET REALbasic


Type 3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

autospace <br />

<br />

begin_item( ) tag=Artifact <br />

<br />

begin_font( ) <br />

familyname stretch weight <br />

<br />

<br />

begin/end_document( ) taborder <br />

<br />

10.5.2 PDF <br />

PDF <br />

P <br />

autospace <br />

<br />

if (p.begin_document("hello-tagged.pdf", "tagged=true") == -1)<br />

throw new Exception("" + p.get_errmsg());<br />

/* */<br />

p.set_parameter("autospace", "true");<br />

/* (=0) */<br />

id = p.begin_item("P", "Title={Simple Paragraph}");<br />

p.begin_page_ext(0, 0, "width=a4.width height=a4.height");<br />

font = p.load_font("Helvetica-Bold", "unicode", "");<br />

p.setfont(font, 24);<br />

p.show_xy("Hello, Tagged PDF!", 50, 700);<br />

p.continue_text("This PDF has a very simple");<br />

p.continue_text("document structure.");<br />

p.end_page_ext("");<br />

p.end_item(id);<br />

p.end_document("");<br />

10.5 PDF 269


PDF <br />

<br />

<br />

<br />

<br />

> <br />

<br />

> <br />

fit_textflow( ) <br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

10.5.3 <br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

/* */<br />

id_art = p.begin_item("Art", "Title=Article");<br />

id_sect1 = p.begin_item("Sect", "Title={First Section}");<br />

/* 1 */<br />

p.set_text_pos(x1_left, y1_left_top);<br />

...<br />

/* 2 */<br />

p.set_text_pos(x1_left, y1_left_bottom);<br />

...<br />

/* 3 */<br />

270 10 : PDF COM .NET REALbasic


10.1<br />

<br />

<br />

<br />

<br />

<br />

1 <br />

<br />

4<br />

6 <br />

<br />

7<br />

1<br />

6<br />

5<br />

2 3<br />

4<br />

8<br />

1<br />

2<br />

5<br />

3<br />

4 6<br />

7<br />

8<br />

p.set_text_pos(x1_right, y1_right_top);<br />

...<br />

p.end_item(id_sect1);<br />

id_sect2 = p.begin_item("Sect", "Title={Second Section}");<br />

/* 4 */<br />

p.set_text_pos(x2_right, y2_right);<br />

...<br />

/* 2 */<br />

p.end_item(id_sect2);<br />

String optlist = "Title=Table parent=" + id_art;<br />

id_table = p.begin_item("Table", optlist);<br />

/* 5 */<br />

p.set_text_pos(x_start_table, y_start_table);<br />

...<br />

p.end_item(id_table);<br />

optlist = "Title=Insert parent=" + id_art;<br />

id_insert = p.begin_item("P", optlist);<br />

/* 6 */<br />

p.set_text_pos(x_start_table, y_start_table);<br />

...<br />

p.end_item(id_insert);<br />

id_artifact = p.begin_item("Artifact", "");<br />

/* 7+8 */<br />

p.set_text_pos(x_header, y_header);<br />

...<br />

p.set_text_pos(x_footer, y_footer);<br />

...<br />

p.end_item(id_artifact);<br />

/* */<br />

10.5 PDF 271


...<br />

p.end_item(id_art);<br />

<br />

<br />

<br />

activate_item( ) <br />

<br />

/* */<br />

id_header = p.begin_item("Artifact", "");<br />

/* 1 */<br />

p.set_text_pos(x_header, y_header);<br />

...<br />

p.end_item(id_header);<br />

id_art = p.begin_item("Art", "Title=Article");<br />

id_sect1 = p.begin_item("Sect", "Title = {First Section}");<br />

/* 2 */<br />

p.set_text_pos(x1_left, y1_left_top);<br />

...<br />

String optlist = "Title=Table parent=" + id_art;<br />

id_table = p.begin_item("Table", optlist);<br />

/* 3 */<br />

p.set_text_pos(x_start_table, y_start_table);<br />

...<br />

p.end_item(id_table);<br />

/* 1 */<br />

p.activate_item(id_sect1);<br />

/* 4 */<br />

p.set_text_pos(x1_left, y1_left_bottom);<br />

...<br />

optlist = "Title=Insert parent=" + id_art;<br />

id_insert = p.begin_item("P", optlist);<br />

/* 5 */<br />

p.set_text_pos(x_start_table, y_start_table);<br />

...<br />

p.end_item(id_insert);<br />

/* 1 */<br />

p.activate_item(id_sect1);<br />

/* 6 */<br />

p.set_text_pos(x1_right, y1_right_top);<br />

...<br />

p.end_item(id_sect1);<br />

id_sect2 = p.begin_item("Sect", "Title={Second Section}");<br />

/* 7 */<br />

p.set_text_pos(x2_right, y2_right);<br />

...<br />

/* 2 */<br />

p.end_item(id_sect2);<br />

272 10 : PDF COM .NET REALbasic


id_footer = p.begin_item("Artifact", "");<br />

/* 8 */<br />

p.set_text_pos(x_footer, y_footer);<br />

...<br />

p.end_item(id_footer);<br />

/* */<br />

...<br />

p.end_item(id_art);<br />

<br />

activate_item( ) <br />

<br />

<br />

<br />

10.5.4 Acrobat PDF <br />

<br />

<br />

<br />

<br />

Acrobat <br />

<br />

<br />

<br />

> <br />

> <br />

<br />

Figure <br />

> <br />

<br />

<br />

<br />

<br />

> BBox BBox <br />

BBox<br />

P H <br />

<br />

BBox BBox <br />

<br />

<br />

> TR TD TH THead TBody <br />

Caption<br />

<br />

<br />

> Private <br />

Private <br />

> topdown <br />

10.5 PDF 273


<br />

<br />

> <br />

<br />

Span <br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

Acrobat <br />

<br />

<br />

> create_field( ) create_fieldgroup( ) <br />

tooltip <br />

> <br />

<br />

Acrobat <br />

<br />

> Form ActualText <br />

Alt <br />

<br />

> NonStruct <br />

<br />

> Code Quote Reference <br />

Alt <br />

ActualText <br />

<br />

Acrobat <br />

> AltActualText <br />

<br />

<br />

<br />

<br />

274 10 : PDF COM .NET REALbasic


11 PPS <strong>PDFlib</strong> Block Plugin<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> Personalization Server PPS PPS <br />

<strong>PDFlib</strong> PPS <br />

<strong>PDFlib</strong> <strong>PDFlib</strong>+PDI <br />

PDF Adobe Acrobat <strong>PDFlib</strong><br />

Block Plugin <br />

<strong>PDFlib</strong> blocks <br />

<br />

11.1 <strong>PDFlib</strong> Block Plugin <br />

<br />

<br />

> <br />

> <br />

<br />

<br />

<br />

Acrobat <br />

Acrobat <br />

<br />

Windows Acrobat 7/8/9 <strong>PDFlib</strong> Block Plugin <br />

<br />

<br />

<br />

Block.api AcroFormConversion.api <br />

<br />

C:\Program Files\Adobe\Acrobat 9.0\Acrobat\plug_ins\<strong>PDFlib</strong> Block Plugin<br />

11.1 <strong>PDFlib</strong> Block Plugin 275


Mac Acrobat 8/9 <strong>PDFlib</strong> Block Plugin <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

/Applications/Adobe Acrobat 9.0 Professional<br />

> <br />

<br />

> <br />

> ... <strong>PDFlib</strong> Block Plugin <br />

<br />

<br />

Intel<br />

PPC <br />

<br />

<br />

<br />

> ... <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

276 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.2 <strong>PDFlib</strong> <br />

11.2.1 <br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.2.2 <br />

<br />

<br />

<br />

<br />

firstname <br />

lastname zipcode <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

> PDF <br />

<br />

11.2 <strong>PDFlib</strong> 277


fill_textblock( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.2.3 PDF ?<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

278 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.2 <strong>PDFlib</strong> 279


11.3 <strong>PDFlib</strong> Block Plugin <br />

11.3.1 <br />

<br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <strong>PDFlib</strong> <strong>PDFlib</strong> <br />

<br />

<br />

<br />

rotate <br />

<br />

<br />

<br />

<br />

<br />

PDF <br />

<br />

<br />

<br />

PDF Acrobat <br />

... <br />

<br />

Acrobat Enfocus PitStop <strong>PDFlib</strong> <br />

This document contains PieceInfo from <strong>PDFlib</strong>. Press OK to continue editing or Cancel to<br />

abort. <br />

OK <br />

<br />

<br />

<br />

> <br />

> <br />

<br />

> <br />

<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

280 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.1<br />

<br />

<br />

<br />

Delete <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

> ...<br />

<br />

<br />

<br />

> <br />

<br />

Rect <br />

fontsize <br />

11.3 <strong>PDFlib</strong> Block Plugin 281


11.2<br />

Acrobat <br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> ... <br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

282 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


fontnamefontsizefillcolorcharspacinghorizscalingwordspacing<br />

textrenderingtextrise<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

<br />

11.3.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

hortabmethodruler <br />

<br />

linewidth fitmethod <br />

orientate ... <br />

backgroundcolor defaultimage fontname <br />

<br />

<br />

<br />

<br />

11.3 <strong>PDFlib</strong> Block Plugin 283


Enter <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> Name Type Rect Description <br />

> <br />

<br />

defaulttext defaultimage defaultpdf <br />

290 <br />

<br />

<br />

> <strong>PDFlib</strong> <strong>PDFlib</strong> <br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

Enter <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

284 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


NameDescriptionSubtypeTypeRectStatus<br />

<br />

11.3.3 <br />

<br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

... <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

<br />

> <br />

> <br />

<br />

<br />

<br />

> <br />

> <strong>PDFlib</strong> <br />

... <br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

11.3 <strong>PDFlib</strong> Block Plugin 285


<strong>PDFlib</strong> <br />

... <br />

<br />

<strong>PDFlib</strong> <br />

... <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.3.4 PDF <strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

... <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

286 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


<strong>PDFlib</strong>:field:name<br />

<strong>PDFlib</strong>:field:pagenumber<br />

<strong>PDFlib</strong>:field:type<br />

<strong>PDFlib</strong>:field:value<br />

<br />

<br />

<br />

pushbutton checkbox radiobutton listbox <br />

combobox textfield signature <br />

type=checkbox <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> <br />

... <br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> ... <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

11.3 <strong>PDFlib</strong> Block Plugin 287


Rect<br />

Name<br />

Description<br />

fontname<br />

fontsize auto <br />

fitmethod auto <br />

<br />

<br />

<br />

strokecolor fillcolor<br />

bordercolor<br />

backgroundcolor<br />

linewidth <br />

Status <br />

active<br />

ignore<br />

ignore<br />

active<br />

orientate north west south east<br />

<br />

<br />

<br />

<br />

defaulttext<br />

position <br />

{left center}<br />

{center center}<br />

{right center}<br />

<br />

<br />

<br />

<br />

<br />

<br />

defaulttext <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

defaulttext<br />

<br />

<br />

defaulttext<br />

288 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.3.5 Block Plugin <br />

<br />

<br />

default.PPSoptions <br />

<br />

> /Block_Plugin/MainDialog/CloseOnApply <br />

<br />

<br />

<br />

> /Block_Plugin/FontDialog/ShowBaseFonts <br />

fontname <br />

<br />

<br />

> /Block_Plugin/Command/ControlByClick <strong>PDFlib</strong> <br />

<br />

> /Block_Plugin/Command/DetectFonts <strong>PDFlib</strong> <br />

<br />

11.3 <strong>PDFlib</strong> Block Plugin 289


11.4 Acrobat <br />

<strong>PDFlib</strong> block_template.pdf <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

defaulttext <br />

defaultimage defaultpdf <br />

<br />

<br />

Status=ignoredefault <br />

<br />

defaulttext defaultimage defaultpdf <br />

<br />

<br />

charref true <br />

charref=true <br />

<br />

&.smileface;<br />

charref=false <br />

J <br />

<br />

<br />

<br />

> <strong>PDFlib</strong> <br />

290 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.3<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

... <br />

<br />

<br />

<br />

<br />

<br />

<strong>PDFlib</strong> ... <br />

<br />

> <br />

> <br />

> <br />

> <br />

> <br />

<br />

<br />

> PPS <br />

PDF_set_option( ) searchpath<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.4 Acrobat 291


<br />

<br />

> <br />

<br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

PDF PDF/A-1b PDF/X <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

PDF PDF/A-1b PDF/X <br />

<br />

PDF/A PDF/X PDF PDF/A-1b PDF/X <br />

<br />

<br />

PDF/A-1b:2005<br />

PDF/X-1a:2001PDF/X-1a:2003<br />

PDF/X-3:2002PDF/X-3:2003<br />

PDF/X-4PDF/X-4p<br />

PDF/X-5gPDF/X-5pg<br />

<br />

<br />

> <br />

> <br />

> <br />

> <br />

<br />

<br />

<br />

<br />

292 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.4<br />

PDF<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.4 Acrobat 293


11.5 PPS <br />

fit_pdi_page( ) <br />

<br />

fill_*block( ) <br />

<br />

<br />

<br />

firstname <br />

doc = p.open_pdi_document(filename, "");<br />

if (doc == -1)<br />

throw new Exception(" : " + p.get_errmsg());<br />

page = p.open_pdi_page(doc, pageno, "");<br />

if (page == -1)<br />

throw new Exception(" : " + p.get_errmsg());<br />

p.begin_page_ext(width, height, "");<br />

/* */<br />

p.fit_pdi_page(page, 0.0, 0.0, "");<br />

/* */<br />

p.fill_textblock(page, "firstname", "Serge", "encoding=winansi");<br />

p.close_pdi_page(page);<br />

p.end_page_ext("");<br />

p.close_pdi_document(doc);<br />

blocks/starter_block <br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

<br />

> <br />

<br />

fill_*block( ) <br />

<br />

p.fill_textblock(page, "firstname", "Serge", "fontsize=12");<br />

fontsize <br />

<br />

<br />

<br />

<br />

<br />

294 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


fit_pdi_page( ) blind <br />

<br />

<br />

<br />

/* blind */<br />

p.fit_pdi_page(page, 0.0, 0.0, "blind");<br />

/* */<br />

p.fill_textblock(page, "firstname", "Serge", "encoding=winansi");<br />

/* ... ... */<br />

/* */<br />

p.fit_pdi_page(page, 0.0, 0.0, "");<br />

blocks/block_below_contents <br />

<br />

<br />

<br />

fit_pdi_page( ) blind <br />

<br />

<br />

<br />

<br />

blocks/duplicate_block <br />

<br />

<br />

<br />

<br />

<br />

fill_textblock( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> fill_textblock( ) <br />

textflowhandle <br />

fill_textblock( ) <br />

<br />

> fill_textblock( ) <br />

textflowhandle text <br />

<br />

<br />

11.5 PPS 295


> info_textflow( ) <br />

<br />

fitmethod clip textflowhandle <br />

<br />

<br />

p.fit_pdi_page(page, 0.0, 0.0, "");<br />

tf = -1;<br />

for (i = 0; i < blockcount; i++)<br />

{<br />

String optlist = "encoding=winansi textflowhandle=" + tf;<br />

tf = p.fill_textblock(page, blocknames[i], text, optlist);<br />

text = null;<br />

if (tf == -1)<br />

break;<br />

/* fit_textflow() */<br />

reason = (int) p.info_textflow(tf, "returnreason");<br />

result = p.get_parameter("string", (float) reason);<br />

}<br />

/* */<br />

if (result.equals("_stop"))<br />

{<br />

p.delete_textflow(tf);<br />

break;<br />

}<br />

blocks/linked_textblocks <br />

fill_*block( ) <br />

<br />

> backgroundcolor None <br />

<br />

> bordercolor None <br />

<br />

> bordercolor linewidth <br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

blind <br />

<br />

<br />

> fit_pdi_page( ) <br />

> fit_table( ) <br />

296 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


fill_pdfblock( ) <br />

<br />

<br />

<br />

<br />

> <br />

<br />

<br />

> <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

blocks/nested_blocks <br />

<br />

fit_pdi_page( ) <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

makespotcolor( )<br />

<br />

<br />

11.5 PPS 297


11.6 <br />

<br />

<br />

PDF <br />

<br />

<br />

fit_image( ) <br />

fitmethod charspacing <br />

<br />

11.6.1 <br />

<br />

<br />

<br />

<br />

Description<br />

Locked<br />

Name<br />

Subtype<br />

textflow<br />

Type<br />

<br />

<br />

<br />

<br />

true <br />

false<br />

<br />

<br />

<br />

Text Image PDF <br />

Text <br />

textflow <br />

<br />

<br />

false <br />

false fit_textline( ) <br />

true<br />

fit_textflow( ) <br />

<br />

<br />

Block<br />

11.6.2 <br />

<br />

<br />

<br />

<br />

<br />

backgroundcolor<br />

<br />

None <br />

<br />

None<br />

298 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


ordercolor<br />

linewidth<br />

Rect<br />

Status<br />

<br />

None <br />

None<br />

bordercolor <br />

<br />

<br />

<br />

<br />

<br />

<br />

active <br />

active <br />

ignore <br />

ignoredefault<br />

defaulttext/image/pdf <br />

active <br />

<br />

<br />

<br />

<br />

<br />

static <br />

<br />

11.6.3 <br />

<br />

> <br />

<br />

> <br />

<br />

<br />

<br />

blendmode<br />

opacityfill<br />

opacitystroke<br />

<br />

Normal <br />

NoneColorColorDodgeColorBurnDarkenDifference<br />

ExclusionHardLightHueLightenLuminosityMultiplyNoneNormalOverlay<br />

SaturationScreenSoftLight None<br />

<br />

<br />

<br />

<br />

11.6 299


charspacing<br />

fillcolor<br />

fontname 1<br />

fontsize 1<br />

fontstyle<br />

horizscaling<br />

italicangle<br />

kerning<br />

monospace<br />

overline<br />

strikeout<br />

strokecolor<br />

strokewidth<br />

textrendering<br />

<br />

fontsize <br />

true underline strikeout overline <br />

<br />

false<br />

gray 0 <br />

load_font( ) <br />

<br />

fontname <br />

<br />

fill_textblock( ) <br />

font <br />

<br />

normal bold italic bolditalic <br />

<br />

<br />

<br />

false<br />

<br />

<br />

false<br />

false<br />

gray 0 <br />

textrendering <br />

percentage <br />

auto auto<br />

<br />

<br />

P<br />

0 4 <br />

1 5 <br />

P<br />

2 6 <br />

3 7 <br />

textrise<br />

underline<br />

decorationabove<br />

underlineposition<br />

fontsize <br />

<br />

false<br />

<br />

fontsize auto<br />

300 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


wordspacing<br />

<br />

fontsize <br />

auto<br />

fontsize <br />

<br />

11.6.4 <br />

<br />

<br />

<br />

<br />

<br />

charref<br />

underlinewidth<br />

escapesequence<br />

features<br />

language<br />

script<br />

shaping<br />

<br />

true <br />

charref <br />

true <br />

escapesequence <br />

script language <br />

<br />

<br />

_none vert novert <br />

<br />

< > <br />

liga ital tnum smcp swsh zero <br />

<br />

no< > no noliga <br />

_none vert <br />

load_font( ) readfeatures <br />

script <br />

features shaping <br />

ARA JAN <br />

HIN _none <br />

shaping=true <br />

features shaping advancedlinebreak <br />

_none latn grek cyrl <br />

armn hebr arab deva beng guru gujr orya taml thai laoo tibt hang kana han<br />

_auto <br />

_latn _none <br />

_none<br />

true script language <br />

script _none <br />

false<br />

11.6 301


11.6.5 <br />

<br />

stamp <br />

<br />

create_textflow( ) optlist <br />

<br />

fill_textblock( ) <br />

defaulttext <br />

<br />

alignment<br />

fixedleading<br />

<br />

adjustmethod<br />

advancedlinebreak<br />

avoidemptybegin<br />

hortabmethod<br />

hortabsize<br />

<br />

minspacing maxspacing <br />

auto <br />

auto shrink spread nofit split<br />

clip<br />

nofit<br />

shrink<br />

split<br />

spread<br />

rightindent <br />

nofit <br />

nofitlimit <br />

<br />

<br />

shrinklimit <br />

nofit <br />

<br />

<br />

<br />

spreadlimit nofit <br />

<br />

<br />

locale script <br />

false<br />

left<br />

left leftindent <br />

center leftindent rightindent <br />

right rightindent <br />

justify <br />

true false<br />

true <br />

false<br />

<br />

relative <br />

relative hortabsize <br />

typewriter hortabsize <br />

ruler<br />

ruler <br />

relative<br />

<br />

hortabmethod <br />

<br />

302 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


lastalignment<br />

leading<br />

locale<br />

maxspacing<br />

minspacing<br />

minlinecount<br />

nofitlimit<br />

parindent<br />

rightindent<br />

leftindent<br />

ruler 2<br />

shrinklimit<br />

spreadlimit<br />

stamp<br />

<br />

alignment <br />

auto <br />

auto alignment justify left <br />

<br />

<br />

advancedlinebreak=true <br />

<br />

<br />

> <br />

en de ja language <br />

<br />

> <br />

Hira Hebr Arab Thai<br />

<br />

> <br />

DE CH GB <br />

_none <br />

_none<br />

de_DE en_US en_GB<br />

<br />

<br />

wordspacing minspacing<br />

maxspacing<br />

<br />

<br />

<br />

nofit <br />

<br />

leftindent <br />

<br />

leftindent <br />

<br />

<br />

hortabmethod=ruler <br />

hortabsize <br />

shrink <br />

horizscaling <br />

spread <br />

charspacing <br />

<br />

<br />

<br />

position fitmethod orientate<br />

north south none<br />

ll2ur <br />

ul2lr <br />

none <br />

11.6 303


tabalignchar<br />

tabalignment<br />

<br />

<br />

<br />

ruler <br />

left <br />

center <br />

decimal tabalignchar tabalignchar <br />

<br />

left <br />

right <br />

<br />

<br />

11.6.6 <br />

<br />

<br />

<br />

> <br />

<br />

> <br />

<br />

<br />

fitmethod=clip <br />

fitmethod=nofit <br />

<br />

<br />

alignchar<br />

dpi<br />

fitmethod<br />

<br />

<br />

<br />

orientate=north south position <br />

orientate=west east position <br />

<br />

none fitmethod <br />

alignchar <br />

none<br />

<br />

<br />

fitmethod auto meet <br />

slice entire <br />

<br />

auto nofit clip meet slice entire <br />

auto <br />

<br />

auto fontsize leading <br />

nofit <br />

clip <br />

304 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


margin<br />

minfontsize<br />

orientate<br />

position<br />

rotate<br />

scale<br />

shrinklimit<br />

<br />

<br />

<br />

fitmethod=auto shrinklimit <br />

<br />

<br />

minfontsize <br />

north east south west <br />

north<br />

<br />

auto <br />

<br />

right left <br />

<br />

<br />

<br />

<br />

fitmethod <br />

auto meet slice entire <br />

<br />

fitmethod=auto <br />

<br />

<br />

<br />

firstlinedist<br />

fitmethod<br />

<br />

<br />

fixedleading=true <br />

<br />

leading<br />

leading <br />

<br />

ascender <br />

<br />

capheight <br />

<br />

xheight <br />

<br />

fixedleading=false leading ascender xheight capheight<br />

<br />

auto nofit <br />

clip auto <br />

<br />

auto fontsize leading <br />

nofit <br />

clip <br />

11.6 305


lastlinedist<br />

linespreadlimit<br />

maxlines<br />

minfontsize<br />

orientate<br />

rotate<br />

verticalalign<br />

<br />

fitmethod=nofit <br />

<br />

fixedleading=true <br />

<br />

<br />

<br />

descender <br />

<br />

fixedleading=false <br />

<br />

verticalalign=justify <br />

<br />

<br />

auto <br />

fit_<br />

textflow( ) _boxfull <br />

fitmethod=auto <br />

<br />

<br />

_boxfull <br />

north east south west<br />

north<br />

<br />

<br />

<br />

top<br />

top <br />

<br />

center <br />

<br />

bottom <br />

<br />

justify <br />

linespreadlimit <br />

firstlinedist=leading <br />

11.6.7 <br />

<br />

<br />

<br />

<br />

11.6.8 <br />

<br />

<br />

306 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


defaultimage<br />

defaultpdf<br />

defaultpdfpage<br />

defaulttext<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

winansi <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.6 307


11.7 pCOS <br />

<br />

<br />

PDF <br />

blocks/query_block_properties <br />

<br />

<br />

pagenum <br />

blockcount = (int) p.pcos_get_number(doc, "length:pages[" + pagenum + "]/blocks");<br />

pagenum blocknum <br />

<br />

blockname = p.pcos_get_string(doc,<br />

"pages[" + pagenum + "]/blocks[" + blocknum + "]/Name");<br />

<br />

<br />

length <br />

Blocks <br />

<br />

<br />

< > Name < > <br />

<br />

pages[...]/blocks[]<br />

pages[...]/blocks/<br />

foo <br />

(llx, lly) (urx, ury) <br />

llx = p.pcos_get_number(doc, "pages[" + pagenum + "]/blocks/foo/Rect[0]");<br />

lly = p.pcos_get_number(doc, "pages[" + pagenum + "]/blocks/foo/Rect[1]");<br />

urx = p.pcos_get_number(doc, "pages[" + pagenum + "]/blocks/foo/Rect[2]");<br />

ury = p.pcos_get_number(doc, "pages[" + pagenum + "]/blocks/foo/Rect[3]");<br />

<br />

<br />

<br />

Rect <br />

<br />

<br />

refpoint boxsize <br />

<br />

topdown <br />

<br />

308 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


pagenum b1 zipcode <br />

<br />

zip = p.pcos_get_string(doc, "pages[" + pagenum + "]/blocks/b1/Custom/zipcode");<br />

<br />

b1 <br />

<br />

propname = p.pcos_get_string(doc, "pages[" + pagenum + "]/blocks/b1/Custom[0].key");<br />

<br />

length <br />

<br />

<br />

type null <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

acme.com:digits<br />

acme.com:refnumber<br />

<br />

<br />

<br />

11.7 pCOS 309


11.8 <strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

<br />

11.8.1 <strong>PDFlib</strong> PDF <br />

PieceInfo <br />

<strong>PDFlib</strong> <br />

<br />

<br />

<br />

<br />

LastModified<br />

Private<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Version<br />

Blocks<br />

PluginVersion<br />

pdfmark<br />

<br />

<br />

<br />

<br />

Name <br />

<br />

pdfmark <br />

<br />

PluginVersion 1 <br />

true <br />

PluginVersion pdfmark <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

310 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


float <br />

<br />

<br />

<br />

<br />

unichar<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

/DeviceGray<br />

<br />

/DeviceRGB<br />

<br />

/DeviceCMYK<br />

<br />

[/Separation/ ]<br />

/Separation <br />

<br />

<br />

/DeviceGray /DeviceRGB /DeviceCMYK /Lab <br />

<br />

<br />

<br />

[/Lab] /Lab <br />

<br />

utf16be <br />

11.8.2 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

11.8 <strong>PDFlib</strong> 311


job_title logo <br />

format <br />

<br />

><br />

/Contents 12 0 R<br />

/Type /Page<br />

/Parent 1 0 R<br />

/MediaBox [ 0 0 595 842 ]<br />

/PieceInfo ><br />

13 0 obj<br />

><br />

/LastModified (D:20090813200730)<br />

>><br />

endobj<br />

14 0 obj<br />

<br />

>><br />

endobj<br />

15 0 obj<br />

><br />

312 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


11.8.3 pdfmark <strong>PDFlib</strong> <br />

pdfmark<br />

<br />

pdfmark <br />

pdfmark <br />

<br />

% ---------- Setup for the Blocks on a page ----------<br />

[/_objdef {B1} /type /dict /OBJ pdfmark % Blocks dict<br />

[{ThisPage} <br />

>><br />

>> /PUT pdfmark<br />

% ---------- text Block ----------<br />

[{B1} ><br />

>> /PUT pdfmark<br />

% ---------- image Block ----------<br />

[{B1} <br />

>> /PUT pdfmark<br />

11.8 <strong>PDFlib</strong> 313


314 11 : PPS <strong>PDFlib</strong> Block Plugin COM .NET REALbasic


A <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

> <br />

A 315


.NET 40<br />

A<br />

Acrobat 275<br />

Active Server Pages 33<br />

Adobe Font Metrics AFM 104<br />

AES Advanced Encryption Standard 69<br />

AFM Adobe Font Metrics 104<br />

ArtBox 64<br />

ascender 137<br />

ASP.NET 42<br />

autocidfont 128<br />

autosubsetting 127<br />

B<br />

BleedBox 64<br />

BMP 89, 167<br />

C<br />

C++ 38<br />

capheight 137<br />

CCITT 167<br />

character references 100<br />

characters per inch 138<br />

CIE L*a*b* 76<br />

circle():VB 35<br />

CMap 95<br />

CMaps 95<br />

Cobol 30<br />

COM Component Object Model <br />

31<br />

copyoutputintent 257<br />

CPI characters per inch 138<br />

CropBox 64<br />

currentx currenty 137<br />

C 37<br />

D<br />

defaultgray/rgb/cmyk 78<br />

descender 137<br />

DLL 32<br />

dpi 163<br />

E<br />

EBCDIC 60<br />

ebcdic 92<br />

errorpolicy 174<br />

EUDC <br />

103<br />

examples<br />

page size 232<br />

EXIF JPEG 166<br />

G<br />

get_buffer() 59<br />

GIF 167<br />

global.asa 34<br />

grid.pdf 62<br />

H<br />

HKS 75<br />

HTML character references 100<br />

I<br />

ignoremask 169<br />

image:iccprofile 77<br />

ISO 10646 113<br />

ISO 15930 251<br />

ISO 19005 258<br />

ISO 32000 250<br />

ISO 8859-2 -15 92<br />

J<br />

Java 39<br />

JBIG2 166<br />

JFIF 165<br />

JPEG 165<br />

JPEG2000 166<br />

JPEG <br />

EXIF 166<br />

L<br />

leading 137<br />

linearized PDF 71<br />

LWFN LaserWriter Font 104<br />

M<br />

macroman_apple 109<br />

macroman 91, 92<br />

makepsres 55<br />

masked 169<br />

masterpassword 69<br />

MediaBox 64<br />

317


MSI 31<br />

O<br />

OpenType 103<br />

optimized PDF 71<br />

overline 140<br />

P<br />

page 164<br />

PANTONE 73<br />

pCOS 231<br />

245<br />

238<br />

233<br />

236<br />

pCOS 231<br />

PDF/A 258<br />

PDF/X 251<br />

PDF_set_parameter() 58<br />

<strong>PDFlib</strong><br />

22<br />

<strong>PDFlib</strong> Personalization Server 275<br />

pdflib.upr 57<br />

PDFLIBRESOURCE 57<br />

<strong>PDFlib</strong> 22, 26<br />

PDF PDI 172<br />

PDF 231<br />

pdiusebox 174<br />

PDI PDF 172<br />

Perl 43<br />

permissions 69<br />

PFA Printer Font ASCII 104<br />

PFB Printer Font Binary 104<br />

PFM Printer Font Metrics 104<br />

PHP 44<br />

PNG 165, 169<br />

PostScript Type 1 104<br />

PPS <strong>PDFlib</strong> Personalization Server 275<br />

Printer Font ASCII PFA 104<br />

Printer Font Binary PFB 104<br />

Printer Font Metrics PFM 104<br />

PUA 89<br />

Python 45<br />

R<br />

RAW 167<br />

REALbasic 46<br />

regsvr32 32<br />

renderingintent 76<br />

resourcefile 58<br />

RPG 47<br />

Ruby 48<br />

S<br />

scale():VB 35<br />

SearchPath 56<br />

setcolor:iccprofilegray/rgb/cmyk 78<br />

sRGB 77<br />

strikeout 140<br />

subsetminsize 128<br />

T<br />

Tcl 49<br />

textrendering 141<br />

textx texty 137<br />

TIFF 167<br />

topdown 63<br />

TrimBox 64<br />

TrueType 103<br />

TTC TrueType Collection 103<br />

TTC TrueType Collection 157, 158<br />

Type 1 104<br />

Type 3 105<br />

U<br />

UNC 33<br />

underline 140<br />

UPR Unix PostScript Resource 55<br />

usercoordinates 61<br />

userpassword 69<br />

UTF 90<br />

V<br />

VB.NET 41<br />

VBA 31<br />

Visual Basic 34<br />

Visual Basic for Applications 31<br />

W<br />

web-optimized PDF 71<br />

winansi 92<br />

Windows 31<br />

X<br />

XMP 232<br />

XObject 66<br />

x 137<br />

<br />

137<br />

68<br />

PDF 245<br />

PDF 245<br />

232<br />

<br />

71<br />

59<br />

, 32<br />

318


32<br />

61<br />

164<br />

<br />

138<br />

<br />

99<br />

51<br />

<br />

93<br />

95<br />

<br />

31<br />

<br />

138<br />

169<br />

62<br />

163<br />

93<br />

163<br />

163<br />

165<br />

168, 170<br />

<br />

55<br />

65<br />

PDFLIBRESOURCE 57<br />

95, 156<br />

<br />

139<br />

232<br />

<br />

<strong>PDFlib</strong> 22, 26<br />

<br />

<strong>PDFlib</strong> 22<br />

89<br />

137<br />

89<br />

137<br />

137<br />

64<br />

<br />

72<br />

89<br />

132<br />

111<br />

<br />

68<br />

<br />

<br />

118<br />

206<br />

:Microsoft Windows 1250 <br />

1258 92<br />

<br />

32<br />

61<br />

62<br />

61<br />

127<br />

64<br />

<br />

235<br />

138<br />

62<br />

255<br />

PDF/A 259<br />

PDF/X 252<br />

89<br />

<br />

Windows 121<br />

121<br />

73<br />

72<br />

31<br />

<br />

68<br />

<br />

163<br />

156<br />

61<br />

<br />

95, 156<br />

<br />

137<br />

137<br />

156<br />

137<br />

137<br />

61<br />

319


66<br />

<br />

168<br />

138<br />

<br />

97<br />

97<br />

<br />

<br />

157<br />

95<br />

95, 156<br />

<br />

64<br />

<br />

71<br />

BOM 90<br />

97<br />

235<br />

29<br />

64<br />

65<br />

68<br />

72<br />

99<br />

<br />

<br />

PDF/A 261<br />

PDF/X 255<br />

64<br />

<br />

XObject 66<br />

: 286<br />

<br />

Type 3 105<br />

127<br />

232<br />

AFM 104<br />

OpenType 103<br />

PDF 118<br />

PFA 104<br />

PFB 104<br />

PFM 104<br />

PostScript Type 1 104<br />

TrueType 103<br />

Type 3 105<br />

127<br />

138<br />

Type 3 105<br />

55<br />

139<br />

<br />

Windows 121<br />

137<br />

300<br />

164<br />

<br />

181<br />

300<br />

<br />

275<br />

72<br />

<br />

275<br />

277<br />

231<br />

<br />

71<br />

232<br />

63<br />

Acrobat 63<br />

231<br />

61<br />

165<br />

<br />

91<br />

120<br />

<br />

168<br />

<br />

61<br />

<br />

61<br />

137<br />

PDF 59<br />

<br />

100<br />

<br />

61<br />

Type 3 105<br />

109<br />

320


206<br />

156<br />

<br />

55<br />

<br />

page size <br />

232<br />

<br />

232<br />

232<br />

231<br />

232<br />

231<br />

51<br />

PDI 174<br />

76<br />

321


ABC<br />

<strong>PDFlib</strong> GmbH<br />

Franziska-Bilek-Weg 9<br />

80339 München, Germany<br />

www.pdflib.com<br />

+49 • 89 • 452 33 84-0<br />

FAX +49 • 89 • 452 33 84-99<br />

<strong>PDFlib</strong> <br />

tech.groups.yahoo.com/group/pdflib <br />

<br />

sales@pdflib.com<br />

<br />

support@pdflib.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!