mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-02-26 13:52:49 +01:00
Rename pdfioFileGetModDate to pdfioFileGetModificationDate.
Add pdfioFileSetModificationDate API. Update DLL exports file. Update docos and changelog.
This commit is contained in:
parent
4f880bc0c1
commit
5f98c7838c
@ -4,6 +4,7 @@ Changes in PDFio
|
|||||||
v1.5.0 - YYYY-MM-DD
|
v1.5.0 - YYYY-MM-DD
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
- Added `pdfioFileGetModDate()` API (Issue #88)
|
||||||
- Added support for using libpng to embed PNG images in PDF output (Issue #90)
|
- Added support for using libpng to embed PNG images in PDF output (Issue #90)
|
||||||
- Updated the pdf2txt example to support font encodings.
|
- Updated the pdf2txt example to support font encodings.
|
||||||
|
|
||||||
|
19
doc/pdfio.3
19
doc/pdfio.3
@ -1,4 +1,4 @@
|
|||||||
.TH pdfio 3 "pdf read/write library" "2025-01-24" "pdf read/write library"
|
.TH pdfio 3 "pdf read/write library" "2025-02-13" "pdf read/write library"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
pdfio \- pdf read/write library
|
pdfio \- pdf read/write library
|
||||||
.SH Introduction
|
.SH Introduction
|
||||||
@ -3880,6 +3880,14 @@ const char * pdfioFileGetKeywords (
|
|||||||
pdfio_file_t *pdf
|
pdfio_file_t *pdf
|
||||||
);
|
);
|
||||||
.fi
|
.fi
|
||||||
|
.SS pdfioFileGetModificationDate
|
||||||
|
Get the most recent modification date for a PDF file.
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
time_t pdfioFileGetModificationDate (
|
||||||
|
pdfio_file_t *pdf
|
||||||
|
);
|
||||||
|
.fi
|
||||||
.SS pdfioFileGetName
|
.SS pdfioFileGetName
|
||||||
Get a PDF's filename.
|
Get a PDF's filename.
|
||||||
.PP
|
.PP
|
||||||
@ -4027,6 +4035,15 @@ void pdfioFileSetKeywords (
|
|||||||
const char *value
|
const char *value
|
||||||
);
|
);
|
||||||
.fi
|
.fi
|
||||||
|
.SS pdfioFileSetModificationDate
|
||||||
|
Set the modification date for a PDF file.
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
void pdfioFileSetModificationDate (
|
||||||
|
pdfio_file_t *pdf,
|
||||||
|
time_t value
|
||||||
|
);
|
||||||
|
.fi
|
||||||
.SS pdfioFileSetPermissions
|
.SS pdfioFileSetPermissions
|
||||||
Set the PDF permissions, encryption mode, and passwords.
|
Set the PDF permissions, encryption mode, and passwords.
|
||||||
.PP
|
.PP
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<head>
|
<head>
|
||||||
<title>PDFio Programming Manual v1.4.1</title>
|
<title>PDFio Programming Manual v1.5.0</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||||
<meta name="generator" content="codedoc v3.8">
|
<meta name="generator" content="codedoc v3.8">
|
||||||
<meta name="author" content="Michael R Sweet">
|
<meta name="author" content="Michael R Sweet">
|
||||||
<meta name="language" content="en-US">
|
<meta name="language" content="en-US">
|
||||||
<meta name="copyright" content="Copyright © 2021-2025 by Michael R Sweet">
|
<meta name="copyright" content="Copyright © 2021-2025 by Michael R Sweet">
|
||||||
<meta name="version" content="1.4.1">
|
<meta name="version" content="1.5.0">
|
||||||
<style type="text/css"><!--
|
<style type="text/css"><!--
|
||||||
body {
|
body {
|
||||||
background: white;
|
background: white;
|
||||||
@ -251,7 +251,7 @@ span.string {
|
|||||||
<body>
|
<body>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<p><img class="title" src="pdfio-512.png"></p>
|
<p><img class="title" src="pdfio-512.png"></p>
|
||||||
<h1 class="title">PDFio Programming Manual v1.4.1</h1>
|
<h1 class="title">PDFio Programming Manual v1.5.0</h1>
|
||||||
<p>Michael R Sweet</p>
|
<p>Michael R Sweet</p>
|
||||||
<p>Copyright © 2021-2025 by Michael R Sweet</p>
|
<p>Copyright © 2021-2025 by Michael R Sweet</p>
|
||||||
</div>
|
</div>
|
||||||
@ -417,6 +417,7 @@ span.string {
|
|||||||
<li><a href="#pdfioFileGetCreator">pdfioFileGetCreator</a></li>
|
<li><a href="#pdfioFileGetCreator">pdfioFileGetCreator</a></li>
|
||||||
<li><a href="#pdfioFileGetID">pdfioFileGetID</a></li>
|
<li><a href="#pdfioFileGetID">pdfioFileGetID</a></li>
|
||||||
<li><a href="#pdfioFileGetKeywords">pdfioFileGetKeywords</a></li>
|
<li><a href="#pdfioFileGetKeywords">pdfioFileGetKeywords</a></li>
|
||||||
|
<li><a href="#pdfioFileGetModificationDate">pdfioFileGetModificationDate</a></li>
|
||||||
<li><a href="#pdfioFileGetName">pdfioFileGetName</a></li>
|
<li><a href="#pdfioFileGetName">pdfioFileGetName</a></li>
|
||||||
<li><a href="#pdfioFileGetNumObjs">pdfioFileGetNumObjs</a></li>
|
<li><a href="#pdfioFileGetNumObjs">pdfioFileGetNumObjs</a></li>
|
||||||
<li><a href="#pdfioFileGetNumPages">pdfioFileGetNumPages</a></li>
|
<li><a href="#pdfioFileGetNumPages">pdfioFileGetNumPages</a></li>
|
||||||
@ -432,6 +433,7 @@ span.string {
|
|||||||
<li><a href="#pdfioFileSetCreationDate">pdfioFileSetCreationDate</a></li>
|
<li><a href="#pdfioFileSetCreationDate">pdfioFileSetCreationDate</a></li>
|
||||||
<li><a href="#pdfioFileSetCreator">pdfioFileSetCreator</a></li>
|
<li><a href="#pdfioFileSetCreator">pdfioFileSetCreator</a></li>
|
||||||
<li><a href="#pdfioFileSetKeywords">pdfioFileSetKeywords</a></li>
|
<li><a href="#pdfioFileSetKeywords">pdfioFileSetKeywords</a></li>
|
||||||
|
<li><a href="#pdfioFileSetModificationDate">pdfioFileSetModificationDate</a></li>
|
||||||
<li><a href="#pdfioFileSetPermissions">pdfioFileSetPermissions</a></li>
|
<li><a href="#pdfioFileSetPermissions">pdfioFileSetPermissions</a></li>
|
||||||
<li><a href="#pdfioFileSetSubject">pdfioFileSetSubject</a></li>
|
<li><a href="#pdfioFileSetSubject">pdfioFileSetSubject</a></li>
|
||||||
<li><a href="#pdfioFileSetTitle">pdfioFileSetTitle</a></li>
|
<li><a href="#pdfioFileSetTitle">pdfioFileSetTitle</a></li>
|
||||||
@ -4223,6 +4225,17 @@ time_t pdfioFileGetCreationDate(<a href="#pdfio_file_t">pdfio_file_t</a> *pdf);<
|
|||||||
</tbody></table>
|
</tbody></table>
|
||||||
<h4 class="returnvalue">Return Value</h4>
|
<h4 class="returnvalue">Return Value</h4>
|
||||||
<p class="description">Keywords string or <code>NULL</code> for none</p>
|
<p class="description">Keywords string or <code>NULL</code> for none</p>
|
||||||
|
<h3 class="function"><a id="pdfioFileGetModificationDate">pdfioFileGetModificationDate</a></h3>
|
||||||
|
<p class="description">Get the most recent modification date for a PDF file.</p>
|
||||||
|
<p class="code">
|
||||||
|
time_t pdfioFileGetModificationDate(<a href="#pdfio_file_t">pdfio_file_t</a> *pdf);</p>
|
||||||
|
<h4 class="parameters">Parameters</h4>
|
||||||
|
<table class="list"><tbody>
|
||||||
|
<tr><th>pdf</th>
|
||||||
|
<td class="description">PDF file</td></tr>
|
||||||
|
</tbody></table>
|
||||||
|
<h4 class="returnvalue">Return Value</h4>
|
||||||
|
<p class="description">Modification date or <code>0</code> for none</p>
|
||||||
<h3 class="function"><a id="pdfioFileGetName">pdfioFileGetName</a></h3>
|
<h3 class="function"><a id="pdfioFileGetName">pdfioFileGetName</a></h3>
|
||||||
<p class="description">Get a PDF's filename.</p>
|
<p class="description">Get a PDF's filename.</p>
|
||||||
<p class="code">
|
<p class="code">
|
||||||
@ -4418,6 +4431,17 @@ writes error messages to <code>stderr</code>.</p>
|
|||||||
<tr><th>value</th>
|
<tr><th>value</th>
|
||||||
<td class="description">Value</td></tr>
|
<td class="description">Value</td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
<h3 class="function"><a id="pdfioFileSetModificationDate">pdfioFileSetModificationDate</a></h3>
|
||||||
|
<p class="description">Set the modification date for a PDF file.</p>
|
||||||
|
<p class="code">
|
||||||
|
<span class="reserved">void</span> pdfioFileSetModificationDate(<a href="#pdfio_file_t">pdfio_file_t</a> *pdf, time_t value);</p>
|
||||||
|
<h4 class="parameters">Parameters</h4>
|
||||||
|
<table class="list"><tbody>
|
||||||
|
<tr><th>pdf</th>
|
||||||
|
<td class="description">PDF file</td></tr>
|
||||||
|
<tr><th>value</th>
|
||||||
|
<td class="description">Value</td></tr>
|
||||||
|
</tbody></table>
|
||||||
<h3 class="function"><a id="pdfioFileSetPermissions">pdfioFileSetPermissions</a></h3>
|
<h3 class="function"><a id="pdfioFileSetPermissions">pdfioFileSetPermissions</a></h3>
|
||||||
<p class="description">Set the PDF permissions, encryption mode, and passwords.</p>
|
<p class="description">Set the PDF permissions, encryption mode, and passwords.</p>
|
||||||
<p class="code">
|
<p class="code">
|
||||||
|
18
pdfio-file.c
18
pdfio-file.c
@ -802,11 +802,11 @@ pdfioFileGetKeywords(pdfio_file_t *pdf) // I - PDF file
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// 'pdfioFileGetModDate()' - Get the most recent modification date for a PDF file.
|
// 'pdfioFileGetModificationDate()' - Get the most recent modification date for a PDF file.
|
||||||
//
|
//
|
||||||
|
|
||||||
time_t // O - Modification date or `0` for none
|
time_t // O - Modification date or `0` for none
|
||||||
pdfioFileGetModDate(
|
pdfioFileGetModificationDate(
|
||||||
pdfio_file_t *pdf) // I - PDF file
|
pdfio_file_t *pdf) // I - PDF file
|
||||||
{
|
{
|
||||||
return (pdf && pdf->info_obj ? pdfioDictGetDate(pdfioObjGetDict(pdf->info_obj), "ModDate") : 0);
|
return (pdf && pdf->info_obj ? pdfioDictGetDate(pdfioObjGetDict(pdf->info_obj), "ModDate") : 0);
|
||||||
@ -1138,6 +1138,20 @@ pdfioFileSetKeywords(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// 'pdfioFileSetModificationDate()' - Set the modification date for a PDF file.
|
||||||
|
//
|
||||||
|
|
||||||
|
void
|
||||||
|
pdfioFileSetModificationDate(
|
||||||
|
pdfio_file_t *pdf, // I - PDF file
|
||||||
|
time_t value) // I - Value
|
||||||
|
{
|
||||||
|
if (pdf && pdf->info_obj)
|
||||||
|
pdfioDictSetDate(pdf->info_obj->value.value.dict, "ModDate", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// 'pdfioFileSetPermissions()' - Set the PDF permissions, encryption mode, and passwords.
|
// 'pdfioFileSetPermissions()' - Set the PDF permissions, encryption mode, and passwords.
|
||||||
//
|
//
|
||||||
|
3
pdfio.h
3
pdfio.h
@ -201,7 +201,7 @@ extern time_t pdfioFileGetCreationDate(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
|||||||
extern const char *pdfioFileGetCreator(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern const char *pdfioFileGetCreator(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
extern pdfio_array_t *pdfioFileGetID(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern pdfio_array_t *pdfioFileGetID(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
extern const char *pdfioFileGetKeywords(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern const char *pdfioFileGetKeywords(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
extern time_t pdfioFileGetModDate(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern time_t pdfioFileGetModificationDate(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
extern const char *pdfioFileGetName(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern const char *pdfioFileGetName(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
extern size_t pdfioFileGetNumObjs(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern size_t pdfioFileGetNumObjs(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
extern size_t pdfioFileGetNumPages(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
extern size_t pdfioFileGetNumPages(pdfio_file_t *pdf) _PDFIO_PUBLIC;
|
||||||
@ -217,6 +217,7 @@ extern void pdfioFileSetAuthor(pdfio_file_t *pdf, const char *value) _PDFIO_PUB
|
|||||||
extern void pdfioFileSetCreationDate(pdfio_file_t *pdf, time_t value) _PDFIO_PUBLIC;
|
extern void pdfioFileSetCreationDate(pdfio_file_t *pdf, time_t value) _PDFIO_PUBLIC;
|
||||||
extern void pdfioFileSetCreator(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
extern void pdfioFileSetCreator(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
||||||
extern void pdfioFileSetKeywords(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
extern void pdfioFileSetKeywords(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
||||||
|
extern void pdfioFileSetModificationDate(pdfio_file_t *pdf, time_t value) _PDFIO_PUBLIC;
|
||||||
extern bool pdfioFileSetPermissions(pdfio_file_t *pdf, pdfio_permission_t permissions, pdfio_encryption_t encryption, const char *owner_password, const char *user_password) _PDFIO_PUBLIC;
|
extern bool pdfioFileSetPermissions(pdfio_file_t *pdf, pdfio_permission_t permissions, pdfio_encryption_t encryption, const char *owner_password, const char *user_password) _PDFIO_PUBLIC;
|
||||||
extern void pdfioFileSetSubject(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
extern void pdfioFileSetSubject(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
||||||
extern void pdfioFileSetTitle(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
extern void pdfioFileSetTitle(pdfio_file_t *pdf, const char *value) _PDFIO_PUBLIC;
|
||||||
|
59
pdfio1.def
59
pdfio1.def
@ -1,73 +1,19 @@
|
|||||||
LIBRARY pdfio1
|
LIBRARY pdfio1
|
||||||
VERSION 1.4
|
VERSION 1.5
|
||||||
EXPORTS
|
EXPORTS
|
||||||
_pdfioArrayDebug
|
|
||||||
_pdfioArrayDecrypt
|
|
||||||
_pdfioArrayDelete
|
|
||||||
_pdfioArrayGetValue
|
|
||||||
_pdfioArrayRead
|
|
||||||
_pdfioArrayWrite
|
|
||||||
_pdfioCryptoAESDecrypt
|
_pdfioCryptoAESDecrypt
|
||||||
_pdfioCryptoAESEncrypt
|
_pdfioCryptoAESEncrypt
|
||||||
_pdfioCryptoAESInit
|
_pdfioCryptoAESInit
|
||||||
_pdfioCryptoLock
|
|
||||||
_pdfioCryptoMD5Append
|
_pdfioCryptoMD5Append
|
||||||
_pdfioCryptoMD5Finish
|
_pdfioCryptoMD5Finish
|
||||||
_pdfioCryptoMD5Init
|
_pdfioCryptoMD5Init
|
||||||
_pdfioCryptoMakeRandom
|
|
||||||
_pdfioCryptoMakeReader
|
|
||||||
_pdfioCryptoMakeWriter
|
|
||||||
_pdfioCryptoRC4Crypt
|
_pdfioCryptoRC4Crypt
|
||||||
_pdfioCryptoRC4Init
|
_pdfioCryptoRC4Init
|
||||||
_pdfioCryptoSHA256Append
|
_pdfioCryptoSHA256Append
|
||||||
_pdfioCryptoSHA256Finish
|
_pdfioCryptoSHA256Finish
|
||||||
_pdfioCryptoSHA256Init
|
_pdfioCryptoSHA256Init
|
||||||
_pdfioCryptoUnlock
|
|
||||||
_pdfioDictDebug
|
|
||||||
_pdfioDictDecrypt
|
|
||||||
_pdfioDictDelete
|
|
||||||
_pdfioDictGetValue
|
|
||||||
_pdfioDictRead
|
|
||||||
_pdfioDictSetValue
|
|
||||||
_pdfioDictWrite
|
|
||||||
_pdfioFileAddMappedObj
|
|
||||||
_pdfioFileAddPage
|
|
||||||
_pdfioFileConsume
|
|
||||||
_pdfioFileCreateObj
|
|
||||||
_pdfioFileDefaultError
|
|
||||||
_pdfioFileError
|
|
||||||
_pdfioFileFindMappedObj
|
|
||||||
_pdfioFileFlush
|
|
||||||
_pdfioFileGetChar
|
|
||||||
_pdfioFileGets
|
|
||||||
_pdfioFilePeek
|
|
||||||
_pdfioFilePrintf
|
|
||||||
_pdfioFilePuts
|
|
||||||
_pdfioFileRead
|
|
||||||
_pdfioFileSeek
|
|
||||||
_pdfioFileTell
|
|
||||||
_pdfioFileWrite
|
|
||||||
_pdfioObjDelete
|
|
||||||
_pdfioObjGetExtension
|
|
||||||
_pdfioObjLoad
|
|
||||||
_pdfioObjSetExtension
|
|
||||||
_pdfioStreamCreate
|
|
||||||
_pdfioStreamOpen
|
|
||||||
_pdfioStringIsAllocated
|
|
||||||
_pdfioTokenClear
|
|
||||||
_pdfioTokenFlush
|
|
||||||
_pdfioTokenGet
|
|
||||||
_pdfioTokenInit
|
|
||||||
_pdfioTokenPush
|
|
||||||
_pdfioTokenRead
|
|
||||||
_pdfioValueCopy
|
|
||||||
_pdfioValueDebug
|
_pdfioValueDebug
|
||||||
_pdfioValueDecrypt
|
|
||||||
_pdfioValueDelete
|
|
||||||
_pdfioValueRead
|
_pdfioValueRead
|
||||||
_pdfioValueWrite
|
|
||||||
_pdfio_strtod
|
|
||||||
_pdfio_vsnprintf
|
|
||||||
pdfioArrayAppendArray
|
pdfioArrayAppendArray
|
||||||
pdfioArrayAppendBinary
|
pdfioArrayAppendBinary
|
||||||
pdfioArrayAppendBoolean
|
pdfioArrayAppendBoolean
|
||||||
@ -204,7 +150,7 @@ pdfioFileGetCreationDate
|
|||||||
pdfioFileGetCreator
|
pdfioFileGetCreator
|
||||||
pdfioFileGetID
|
pdfioFileGetID
|
||||||
pdfioFileGetKeywords
|
pdfioFileGetKeywords
|
||||||
pdfioFileGetModDate
|
pdfioFileGetModificationDate
|
||||||
pdfioFileGetName
|
pdfioFileGetName
|
||||||
pdfioFileGetNumObjs
|
pdfioFileGetNumObjs
|
||||||
pdfioFileGetNumPages
|
pdfioFileGetNumPages
|
||||||
@ -220,6 +166,7 @@ pdfioFileSetAuthor
|
|||||||
pdfioFileSetCreationDate
|
pdfioFileSetCreationDate
|
||||||
pdfioFileSetCreator
|
pdfioFileSetCreator
|
||||||
pdfioFileSetKeywords
|
pdfioFileSetKeywords
|
||||||
|
pdfioFileSetModificationDate
|
||||||
pdfioFileSetPermissions
|
pdfioFileSetPermissions
|
||||||
pdfioFileSetSubject
|
pdfioFileSetSubject
|
||||||
pdfioFileSetTitle
|
pdfioFileSetTitle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user