Skip to content

Commit

Permalink
Documentation cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 5, 2023
1 parent 86d8421 commit 34dbf6c
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 66 deletions.
19 changes: 11 additions & 8 deletions doc/pdfio.3
Original file line number Diff line number Diff line change
Expand Up @@ -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.
.SS PDF Content Helper Functions
.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
.PP
Color Space Functions
Expand Down Expand Up @@ -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.
.PP
Note: Not all fonts support Unicode.

.PP
Image Object Functions
.PP
Expand Down Expand Up @@ -799,7 +800,15 @@ pdfioContentTextMoveTo moves within the current line in a text block

.IP \(bu 5
.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
.PP
Expand Down Expand Up @@ -3109,12 +3118,6 @@ PDF value types
.nf
typedef enum pdfio_valtype_e pdfio_valtype_t;
.fi
.SS state_t[4][4]
4x4 AES state table
.PP
.nf
typedef uint8_t state_t[4][4];
.fi
.SH AUTHOR
.PP
Michael R Sweet
Expand Down
16 changes: 8 additions & 8 deletions doc/pdfio.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ <h2 class="title">Contents</h2>
<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_valtype_t">pdfio_valtype_t</a></li>
<li><a href="#state_t[4][4]">state_t[4][4]</a></li>
</ul></li>
<li><a href="#STRUCTURES">Structures</a><ul class="subcontents">
<li><a href="#pdfio_rect_s">pdfio_rect_s</a></li>
Expand Down Expand Up @@ -719,7 +718,7 @@ <h3 class="title" id="pdf-streams">PDF Streams</h3>
<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>
<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>
<li><p><a href="#color-space-functions">Color Space Functions</a></p>
</li>
Expand Down Expand Up @@ -805,7 +804,9 @@ <h4 id="font-object-functions">Font Object Functions</h4>
pdfio_obj_t *arial = pdfioFileCreateFontObjFromFile(pdf, <span class="string">&quot;NotoSansJP-Regular.otf&quot;</span>, <span class="reserved">true</span>);
</code></pre>
<p>will embed the NotoSansJP Regular OpenType font with full support for Unicode.</p>
<blockquote>
<p>Note: Not all fonts support Unicode.</p>
</blockquote>
<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>
<pre><code class="language-c">pdfio_file_t *pdf = pdfioFileCreate(...);
Expand Down Expand Up @@ -936,7 +937,11 @@ <h4 id="page-stream-functions">Page Stream Functions</h4>
</li>
<li><p><a href="#pdfioContentTextMoveTo"><code>pdfioContentTextMoveTo</code></a> moves within the current line in a text block</p>
</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><p><a href="#pdfioContentTextShow"><code>pdfioContentTextShow</code></a> draws a literal string in a text block</p>
</li>
Expand Down Expand Up @@ -3758,11 +3763,6 @@ <h3 class="typedef"><a id="pdfio_valtype_t">pdfio_valtype_t</a></h3>
<p class="code">
typedef enum <a href="#pdfio_valtype_e">pdfio_valtype_e</a> pdfio_valtype_t;
</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>
<h3 class="struct"><a id="pdfio_rect_s">pdfio_rect_s</a></h3>
<p class="description">PDF rectangle</p>
Expand Down
10 changes: 7 additions & 3 deletions doc/pdfio.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ PDF Content Helper Functions
----------------------------

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:

- [Color Space Functions](@)
Expand Down Expand Up @@ -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.

Note: Not all fonts support Unicode.
> Note: Not all fonts support Unicode.

### Image Object Functions
Expand Down Expand Up @@ -584,8 +584,12 @@ escaping, as needed:
- [`pdfioContentTextMoveLine`](@@) moves to the next line with an offset 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
- [`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
- [`pdfioContentTextShowf`](@@) draws a formatted string in a text block
- [`pdfioContentTextShowJustified`](@@) draws an array of literal strings with
Expand Down
6 changes: 1 addition & 5 deletions pdfio-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@
// (<https://github.com/kokke/tiny-AES-c>)
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


//
// 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@


//
Expand Down
4 changes: 0 additions & 4 deletions pdfio-array.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"
#if _WIN32
# include <windows.h>
Expand Down
4 changes: 0 additions & 4 deletions pdfio-dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-page.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-string.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-token.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
4 changes: 0 additions & 4 deletions pdfio-value.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// information.
//

//
// Include necessary headers...
//

#include "pdfio-private.h"


Expand Down
8 changes: 2 additions & 6 deletions testpdfio.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// 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
// information.
Expand All @@ -10,11 +10,7 @@
//
// ./testpdfio
//
// ./testpdfio FILENAME [OBJECT-NUMBER] [FILENAME [OBJECT-NUMBER]] ...
//

//
// Include necessary headers...
// ./testpdfio [--verbose] FILENAME [OBJECT-NUMBER] [FILENAME [OBJECT-NUMBER]] ...
//

#include "pdfio-private.h"
Expand Down

0 comments on commit 34dbf6c

Please sign in to comment.