mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2024-12-26 05:18:21 +01:00
Documentation cleanup.
This commit is contained in:
parent
86d842167a
commit
34dbf6c2fe
19
doc/pdfio.3
19
doc/pdfio.3
@ -400,7 +400,7 @@ The PDF content helper functions provide additional functions for writing specif
|
|||||||
When you are done writing the stream, call pdfioStreamCLose to close both the stream and the object.
|
When you are done writing the stream, call pdfioStreamCLose to close both the stream and the object.
|
||||||
.SS PDF Content Helper Functions
|
.SS PDF Content Helper Functions
|
||||||
.PP
|
.PP
|
||||||
PDFio includes many helper functions for embedding or writing specific kinds of content to a PDF file. These functions can be roughly grouped into ??? categories:
|
PDFio includes many helper functions for embedding or writing specific kinds of content to a PDF file. These functions can be roughly grouped into five categories:
|
||||||
.IP \(bu 5
|
.IP \(bu 5
|
||||||
.PP
|
.PP
|
||||||
Color Space Functions
|
Color Space Functions
|
||||||
@ -552,6 +552,7 @@ will embed an OpenSans Regular TrueType font using the Windows CP1252 subset of
|
|||||||
will embed the NotoSansJP Regular OpenType font with full support for Unicode.
|
will embed the NotoSansJP Regular OpenType font with full support for Unicode.
|
||||||
.PP
|
.PP
|
||||||
Note: Not all fonts support Unicode.
|
Note: Not all fonts support Unicode.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Image Object Functions
|
Image Object Functions
|
||||||
.PP
|
.PP
|
||||||
@ -799,7 +800,15 @@ pdfioContentTextMoveTo moves within the current line in a text block
|
|||||||
|
|
||||||
.IP \(bu 5
|
.IP \(bu 5
|
||||||
.PP
|
.PP
|
||||||
pdfioContentTextNextLine moves to the beginning of the next line in a text block
|
pdfioContentTextNewLine moves to the beginning of the next line in a text block
|
||||||
|
|
||||||
|
.IP \(bu 5
|
||||||
|
.PP
|
||||||
|
pdfioContentTextNewLineShow moves to the beginning of the next line in a text block and shows literal text with optional word and character spacing
|
||||||
|
|
||||||
|
.IP \(bu 5
|
||||||
|
.PP
|
||||||
|
pdfioContentTextNewLineShowf moves to the beginning of the next line in a text block and shows formatted text with optional word and character spacing
|
||||||
|
|
||||||
.IP \(bu 5
|
.IP \(bu 5
|
||||||
.PP
|
.PP
|
||||||
@ -3109,12 +3118,6 @@ PDF value types
|
|||||||
.nf
|
.nf
|
||||||
typedef enum pdfio_valtype_e pdfio_valtype_t;
|
typedef enum pdfio_valtype_e pdfio_valtype_t;
|
||||||
.fi
|
.fi
|
||||||
.SS state_t[4][4]
|
|
||||||
4x4 AES state table
|
|
||||||
.PP
|
|
||||||
.nf
|
|
||||||
typedef uint8_t state_t[4][4];
|
|
||||||
.fi
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
Michael R Sweet
|
Michael R Sweet
|
||||||
|
@ -467,7 +467,6 @@ span.string {
|
|||||||
<li><a href="#pdfio_stream_t">pdfio_stream_t</a></li>
|
<li><a href="#pdfio_stream_t">pdfio_stream_t</a></li>
|
||||||
<li><a href="#pdfio_textrendering_t">pdfio_textrendering_t</a></li>
|
<li><a href="#pdfio_textrendering_t">pdfio_textrendering_t</a></li>
|
||||||
<li><a href="#pdfio_valtype_t">pdfio_valtype_t</a></li>
|
<li><a href="#pdfio_valtype_t">pdfio_valtype_t</a></li>
|
||||||
<li><a href="#state_t[4][4]">state_t[4][4]</a></li>
|
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="#STRUCTURES">Structures</a><ul class="subcontents">
|
<li><a href="#STRUCTURES">Structures</a><ul class="subcontents">
|
||||||
<li><a href="#pdfio_rect_s">pdfio_rect_s</a></li>
|
<li><a href="#pdfio_rect_s">pdfio_rect_s</a></li>
|
||||||
@ -719,7 +718,7 @@ pdfio_stream_t *st = pdfioFileCreatePage(pdf, dict);
|
|||||||
<p>The <a href="#pdf-content-helper-functions">PDF content helper functions</a> provide additional functions for writing specific PDF page stream commands.</p>
|
<p>The <a href="#pdf-content-helper-functions">PDF content helper functions</a> provide additional functions for writing specific PDF page stream commands.</p>
|
||||||
<p>When you are done writing the stream, call <a href="#pdfioStreamCLose"><code>pdfioStreamCLose</code></a> to close both the stream and the object.</p>
|
<p>When you are done writing the stream, call <a href="#pdfioStreamCLose"><code>pdfioStreamCLose</code></a> to close both the stream and the object.</p>
|
||||||
<h3 class="title" id="pdf-content-helper-functions">PDF Content Helper Functions</h3>
|
<h3 class="title" id="pdf-content-helper-functions">PDF Content Helper Functions</h3>
|
||||||
<p>PDFio includes many helper functions for embedding or writing specific kinds of content to a PDF file. These functions can be roughly grouped into ??? categories:</p>
|
<p>PDFio includes many helper functions for embedding or writing specific kinds of content to a PDF file. These functions can be roughly grouped into five categories:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p><a href="#color-space-functions">Color Space Functions</a></p>
|
<li><p><a href="#color-space-functions">Color Space Functions</a></p>
|
||||||
</li>
|
</li>
|
||||||
@ -805,7 +804,9 @@ pdfio_obj_t *arial = pdfioFileCreateFontObjFromFile(pdf, <span class="string">&q
|
|||||||
pdfio_obj_t *arial = pdfioFileCreateFontObjFromFile(pdf, <span class="string">"NotoSansJP-Regular.otf"</span>, <span class="reserved">true</span>);
|
pdfio_obj_t *arial = pdfioFileCreateFontObjFromFile(pdf, <span class="string">"NotoSansJP-Regular.otf"</span>, <span class="reserved">true</span>);
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>will embed the NotoSansJP Regular OpenType font with full support for Unicode.</p>
|
<p>will embed the NotoSansJP Regular OpenType font with full support for Unicode.</p>
|
||||||
|
<blockquote>
|
||||||
<p>Note: Not all fonts support Unicode.</p>
|
<p>Note: Not all fonts support Unicode.</p>
|
||||||
|
</blockquote>
|
||||||
<h4 id="image-object-functions">Image Object Functions</h4>
|
<h4 id="image-object-functions">Image Object Functions</h4>
|
||||||
<p>PDF supports images with many different color spaces and bit depths with optional transparency. PDFio provides two helper functions for creating image objects that can be referenced in page streams. The first function is <a href="#pdfioFileCreateImageObjFromData"><code>pdfioFileCreateImageObjFromData</code></a> which creates an image object from data in memory, for example:</p>
|
<p>PDF supports images with many different color spaces and bit depths with optional transparency. PDFio provides two helper functions for creating image objects that can be referenced in page streams. The first function is <a href="#pdfioFileCreateImageObjFromData"><code>pdfioFileCreateImageObjFromData</code></a> which creates an image object from data in memory, for example:</p>
|
||||||
<pre><code class="language-c">pdfio_file_t *pdf = pdfioFileCreate(...);
|
<pre><code class="language-c">pdfio_file_t *pdf = pdfioFileCreate(...);
|
||||||
@ -936,7 +937,11 @@ pdfio_obj_t *img = pdfioFileCreateImageObjFromFile(pdf, <span class="string">&qu
|
|||||||
</li>
|
</li>
|
||||||
<li><p><a href="#pdfioContentTextMoveTo"><code>pdfioContentTextMoveTo</code></a> moves within the current line in a text block</p>
|
<li><p><a href="#pdfioContentTextMoveTo"><code>pdfioContentTextMoveTo</code></a> moves within the current line in a text block</p>
|
||||||
</li>
|
</li>
|
||||||
<li><p><a href="#pdfioContentTextNextLine"><code>pdfioContentTextNextLine</code></a> moves to the beginning of the next line in a text block</p>
|
<li><p><a href="#pdfioContentTextNewLine"><code>pdfioContentTextNewLine</code></a> moves to the beginning of the next line in a text block</p>
|
||||||
|
</li>
|
||||||
|
<li><p><a href="#pdfioContentTextNewLineShow"><code>pdfioContentTextNewLineShow</code></a> moves to the beginning of the next line in a text block and shows literal text with optional word and character spacing</p>
|
||||||
|
</li>
|
||||||
|
<li><p><a href="#pdfioContentTextNewLineShowf"><code>pdfioContentTextNewLineShowf</code></a> moves to the beginning of the next line in a text block and shows formatted text with optional word and character spacing</p>
|
||||||
</li>
|
</li>
|
||||||
<li><p><a href="#pdfioContentTextShow"><code>pdfioContentTextShow</code></a> draws a literal string in a text block</p>
|
<li><p><a href="#pdfioContentTextShow"><code>pdfioContentTextShow</code></a> draws a literal string in a text block</p>
|
||||||
</li>
|
</li>
|
||||||
@ -3758,11 +3763,6 @@ typedef enum <a href="#pdfio_textrendering_e">pdfio_textrendering_e</a> pdfio_te
|
|||||||
<p class="code">
|
<p class="code">
|
||||||
typedef enum <a href="#pdfio_valtype_e">pdfio_valtype_e</a> pdfio_valtype_t;
|
typedef enum <a href="#pdfio_valtype_e">pdfio_valtype_e</a> pdfio_valtype_t;
|
||||||
</p>
|
</p>
|
||||||
<h3 class="typedef"><a id="state_t[4][4]">state_t[4][4]</a></h3>
|
|
||||||
<p class="description">4x4 AES state table</p>
|
|
||||||
<p class="code">
|
|
||||||
typedef uint8_t state_t[4][4];
|
|
||||||
</p>
|
|
||||||
<h2 class="title"><a id="STRUCTURES">Structures</a></h2>
|
<h2 class="title"><a id="STRUCTURES">Structures</a></h2>
|
||||||
<h3 class="struct"><a id="pdfio_rect_s">pdfio_rect_s</a></h3>
|
<h3 class="struct"><a id="pdfio_rect_s">pdfio_rect_s</a></h3>
|
||||||
<p class="description">PDF rectangle</p>
|
<p class="description">PDF rectangle</p>
|
||||||
|
10
doc/pdfio.md
10
doc/pdfio.md
@ -361,7 +361,7 @@ PDF Content Helper Functions
|
|||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
PDFio includes many helper functions for embedding or writing specific kinds of
|
PDFio includes many helper functions for embedding or writing specific kinds of
|
||||||
content to a PDF file. These functions can be roughly grouped into ???
|
content to a PDF file. These functions can be roughly grouped into five
|
||||||
categories:
|
categories:
|
||||||
|
|
||||||
- [Color Space Functions](@)
|
- [Color Space Functions](@)
|
||||||
@ -455,7 +455,7 @@ pdfio_obj_t *arial = pdfioFileCreateFontObjFromFile(pdf, "NotoSansJP-Regular.otf
|
|||||||
|
|
||||||
will embed the NotoSansJP Regular OpenType font with full support for Unicode.
|
will embed the NotoSansJP Regular OpenType font with full support for Unicode.
|
||||||
|
|
||||||
Note: Not all fonts support Unicode.
|
> Note: Not all fonts support Unicode.
|
||||||
|
|
||||||
|
|
||||||
### Image Object Functions
|
### Image Object Functions
|
||||||
@ -584,8 +584,12 @@ escaping, as needed:
|
|||||||
- [`pdfioContentTextMoveLine`](@@) moves to the next line with an offset in a
|
- [`pdfioContentTextMoveLine`](@@) moves to the next line with an offset in a
|
||||||
text block
|
text block
|
||||||
- [`pdfioContentTextMoveTo`](@@) moves within the current line in a text block
|
- [`pdfioContentTextMoveTo`](@@) moves within the current line in a text block
|
||||||
- [`pdfioContentTextNextLine`](@@) moves to the beginning of the next line in a
|
- [`pdfioContentTextNewLine`](@@) moves to the beginning of the next line in a
|
||||||
text block
|
text block
|
||||||
|
- [`pdfioContentTextNewLineShow`](@@) moves to the beginning of the next line in a
|
||||||
|
text block and shows literal text with optional word and character spacing
|
||||||
|
- [`pdfioContentTextNewLineShowf`](@@) moves to the beginning of the next line in a
|
||||||
|
text block and shows formatted text with optional word and character spacing
|
||||||
- [`pdfioContentTextShow`](@@) draws a literal string in a text block
|
- [`pdfioContentTextShow`](@@) draws a literal string in a text block
|
||||||
- [`pdfioContentTextShowf`](@@) draws a formatted string in a text block
|
- [`pdfioContentTextShowf`](@@) draws a formatted string in a text block
|
||||||
- [`pdfioContentTextShowJustified`](@@) draws an array of literal strings with
|
- [`pdfioContentTextShowJustified`](@@) draws an array of literal strings with
|
||||||
|
@ -10,10 +10,6 @@
|
|||||||
// (<https://github.com/kokke/tiny-AES-c>)
|
// (<https://github.com/kokke/tiny-AES-c>)
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +17,7 @@
|
|||||||
// Local types...
|
// Local types...
|
||||||
//
|
//
|
||||||
|
|
||||||
typedef uint8_t state_t[4][4]; // 4x4 AES state table
|
typedef uint8_t state_t[4][4]; // 4x4 AES state table @private@
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
// information.
|
// information.
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Test program for PDFio.
|
// Test program for PDFio.
|
||||||
//
|
//
|
||||||
// Copyright © 2021 by Michael R Sweet.
|
// Copyright © 2021-2023 by Michael R Sweet.
|
||||||
//
|
//
|
||||||
// Licensed under Apache License v2.0. See the file "LICENSE" for more
|
// Licensed under Apache License v2.0. See the file "LICENSE" for more
|
||||||
// information.
|
// information.
|
||||||
@ -10,11 +10,7 @@
|
|||||||
//
|
//
|
||||||
// ./testpdfio
|
// ./testpdfio
|
||||||
//
|
//
|
||||||
// ./testpdfio FILENAME [OBJECT-NUMBER] [FILENAME [OBJECT-NUMBER]] ...
|
// ./testpdfio [--verbose] FILENAME [OBJECT-NUMBER] [FILENAME [OBJECT-NUMBER]] ...
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// Include necessary headers...
|
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "pdfio-private.h"
|
#include "pdfio-private.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user