4#include "mupdf_tools/mupdf_tools.h"
169 QString holding_path;
170 int current_page_index { -1 };
171 int total_page { -1 };
The CCPdfDocument class CCPdfDocument manages the lifetime and access to a PDF document....
Definition ccpdfdocument.h:24
PageNavigationError
PageNavigationError Enum representing errors when navigating pages.
Definition ccpdfdocument.h:137
@ PAGE_OVERFLOW
Page index beyond last page.
@ PAGE_OK
Navigation successful.
@ PAGE_UNEXSITS
Specified page does not exist.
@ PAGE_UNDERFLOW
Page index below first page.
fz_document * raw_handle() const
raw_handle Gets the raw pointer to the underlying MuPDF document.
Definition ccpdfdocument.cpp:125
fz_context * raw_context() const
raw_context Gets the raw pointer to the MuPDF context.
Definition ccpdfdocument.cpp:129
int total_pages() const
total_pages Gets the total number of pages in the loaded document.
Definition ccpdfdocument.h:131
bool document_loaded() const
document_loaded Checks if a document is currently loaded.
Definition ccpdfdocument.cpp:75
ErrorCode
ErrorCode Enum describing possible error codes during document operations.
Definition ccpdfdocument.h:54
@ FILE_NOT_EXSIT
File does not exist.
@ OTHER_MISTAKES
Other unspecified errors.
@ NO_ERROR
No error occurred.
bool close_document()
close_document Closes the currently loaded document.
Definition ccpdfdocument.cpp:103
~CCPdfDocument()
Destructor. Releases resources associated with the document.
Definition ccpdfdocument.cpp:159
CCPdfMetaInfo meta_info() const
meta_info Retrieves metadata information from the loaded document.
Definition ccpdfdocument.cpp:133
PageNavigationError jump(const int page_index)
jump Attempts to jump to a specified page index.
Definition ccpdfdocument.cpp:138
int current_page() const
current_page Gets the current page index.
Definition ccpdfdocument.h:117
void pageIndexChanged()
pageIndexChanged Signal emitted when the current page index changes. Used for lightweight UI updates ...
std::optional< uint32_t > document_page() const
document_page Gets the total number of pages in the loaded document.
Definition ccpdfdocument.cpp:116
void document_load(const QString document_path)
document_load Signal emitted when a document is successfully loaded.
QString current_path() const
current_path Gets the file path of the currently loaded document.
Definition ccpdfdocument.h:124
ErrorCode load_document(const QString &document_path)
load_document Loads a PDF document from the specified path.
Definition ccpdfdocument.cpp:80
Q_DISABLE_COPY(CCPdfDocument)
disable copy object
CCPdfDocumentPrivate holders.
Definition ccpdfdocument.cpp:23