This documentation is deprecated and will no longer be updated. Please use the official documentation at vanillapdf.readthedocs.io.
Vanilla.PDF  2.3.0
Cross-platform toolkit for creating and modifying PDF documents
c_file.h
Go to the documentation of this file.
1#ifndef _C_FILE_H
2#define _C_FILE_H
3
7
10
11#ifdef __cplusplus
12extern "C"
13{
14#endif
15
51 VANILLAPDF_API error_type CALLING_CONVENTION File_Open(string_type filename, FileHandle** result);
52
59 VANILLAPDF_API error_type CALLING_CONVENTION File_OpenWithStrategy(string_type filename, IOStrategyType strategy, FileHandle** result);
60
64 VANILLAPDF_API error_type CALLING_CONVENTION File_OpenStream(InputOutputStreamHandle* input_stream, string_type name, FileHandle** result);
65
71 VANILLAPDF_API error_type CALLING_CONVENTION File_Create(string_type filename, FileHandle** result);
72
79 VANILLAPDF_API error_type CALLING_CONVENTION File_CreateWithStrategy(string_type filename, IOStrategyType strategy, FileHandle** result);
80
84 VANILLAPDF_API error_type CALLING_CONVENTION File_CreateStream(InputOutputStreamHandle* input_stream, string_type name, FileHandle** result);
85
91 VANILLAPDF_API error_type CALLING_CONVENTION File_Initialize(FileHandle* handle);
92
97 VANILLAPDF_API error_type CALLING_CONVENTION File_GetVersion(FileHandle* handle, PDFVersion* result);
98
103 VANILLAPDF_API error_type CALLING_CONVENTION File_GetFilename(FileHandle* handle, BufferHandle** result);
104
110 VANILLAPDF_API error_type CALLING_CONVENTION File_IsEncrypted(FileHandle* handle, boolean_type* result);
111
115 VANILLAPDF_API error_type CALLING_CONVENTION File_SetEncryptionPassword(FileHandle* handle, string_type password);
116
123 VANILLAPDF_API error_type CALLING_CONVENTION File_SetEncryptionKey(FileHandle* handle, EncryptionKeyHandle* key);
124
128 VANILLAPDF_API error_type CALLING_CONVENTION File_XrefChain(FileHandle* handle, XrefChainHandle** result);
129
133 VANILLAPDF_API error_type CALLING_CONVENTION File_GetIndirectObject(FileHandle* handle, biguint_type obj_number, ushort_type gen_number, ObjectHandle** result);
134
138 VANILLAPDF_API error_type CALLING_CONVENTION File_AllocateNewEntry(FileHandle* handle, XrefUsedEntryHandle** result);
139
143 VANILLAPDF_API error_type CALLING_CONVENTION File_ToUnknown(FileHandle* handle, IUnknownHandle** result);
144
148 VANILLAPDF_API error_type CALLING_CONVENTION File_FromUnknown(IUnknownHandle* handle, FileHandle** result);
149
154 VANILLAPDF_API error_type CALLING_CONVENTION File_Release(FileHandle* handle);
155
158#ifdef __cplusplus
159};
160#endif
161
162#endif /* _C_FILE_H */
This file contains macro declarations for importing and exporting symbols from library boundaries.
This file contains all type forward declarations returned by the library API.
This file contains definitions for IOStrategyType.
This file contains class definitions for PDFVersion.
This file contains types and constants used as parameters or return values.
Represents memory stored data.
Represents encryption key other than password.
Represents low-level file access handle.
error_type CALLING_CONVENTION File_GetFilename(FileHandle *handle, BufferHandle **result)
Get ASCII representation the name of the current file on the physical filesystem.
error_type CALLING_CONVENTION File_CreateWithStrategy(string_type filename, IOStrategyType strategy, FileHandle **result)
Creates a file for writing using the specified I/O strategy.
error_type CALLING_CONVENTION File_Create(string_type filename, FileHandle **result)
Creates a file for writing.
error_type CALLING_CONVENTION File_AllocateNewEntry(FileHandle *handle, XrefUsedEntryHandle **result)
Find exact object within all xref tables.
error_type CALLING_CONVENTION File_GetIndirectObject(FileHandle *handle, biguint_type obj_number, ushort_type gen_number, ObjectHandle **result)
Find exact object within all xref tables.
error_type CALLING_CONVENTION File_OpenStream(InputOutputStreamHandle *input_stream, string_type name, FileHandle **result)
Opens an input stream for reading.
error_type CALLING_CONVENTION File_IsEncrypted(FileHandle *handle, boolean_type *result)
Determine if file is encrypted.
error_type CALLING_CONVENTION File_SetEncryptionKey(FileHandle *handle, EncryptionKeyHandle *key)
Set files encryption key.
error_type CALLING_CONVENTION File_GetVersion(FileHandle *handle, PDFVersion *result)
The version of the PDF specification to which the document conforms.
error_type CALLING_CONVENTION File_CreateStream(InputOutputStreamHandle *input_stream, string_type name, FileHandle **result)
Uses arbitrary stream as a file.
error_type CALLING_CONVENTION File_XrefChain(FileHandle *handle, XrefChainHandle **result)
Get chain of xref tables for iteration.
error_type CALLING_CONVENTION File_Release(FileHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION File_Open(string_type filename, FileHandle **result)
Opens a file for reading.
error_type CALLING_CONVENTION File_OpenWithStrategy(string_type filename, IOStrategyType strategy, FileHandle **result)
Opens a file for reading using the specified I/O strategy.
error_type CALLING_CONVENTION File_FromUnknown(IUnknownHandle *handle, FileHandle **result)
Convert IUnknownHandle to FileHandle.
error_type CALLING_CONVENTION File_Initialize(FileHandle *handle)
Perform basic intialization.
error_type CALLING_CONVENTION File_ToUnknown(FileHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type CALLING_CONVENTION File_SetEncryptionPassword(FileHandle *handle, string_type password)
Set encryption password.
Base class for reference counting.
Input stream can read and interpret input from sequences of characters.
Base class for syntactic tokens.
An ordered collection of all XrefHandle within the PDF file.
Represents used entry within cross-reference section.
uint32_t error_type
This is return value type of all API functions.
Definition c_types.h:25
uint64_t biguint_type
64-bit unsigned integer type
Definition c_types.h:77
uint16_t ushort_type
16-bit unsigned integer
Definition c_types.h:46
int8_t boolean_type
Boolean type supported in C.
Definition c_types.h:31
const char * string_type
C-Style string.
Definition c_types.h:82
PDFVersion
Range of available PDF versions.
Definition c_pdf_version.h:22
IOStrategyType
Specifies the I/O strategy used for file access.
Definition c_io_strategy.h:28