* Improved eraser hit detection and added horizontal scrolling to AnnotationDock
* fix: lock scroll tracking during PDF rotation to prevent page jumping in vertical mode
* Implemented a multi-tab reading system for the PDF viewer.
* Redesigned the About dialog on homescreen.
* improved bulk file import support
* Implemented document caching and improved tab restoration in the PDF viewer.
* Implemented native link detection and information extraction in `pdfium_bridge.cpp` and integrated it into `PdfPageComposable.kt`. This includes adding `getLinkInfoAtPoint` to `NativePdfiumBridge` to handle URI, GoTo, and RemoteGoTo/Launch actions, and updating the tap gesture logic to prioritize native link handling.
* Fixed index bounds and layout padding calculation in PdfViewerScreen
* Added print functionality to PDF viewer
* feat(pdf): add interactive button support and visibility reveal heuristic
* Moved search state management to MainViewModel and improved search UI interaction.
* Updated `pdfiumandroid` to version 2.0.0 and handled resulting API changes, including nullable page/text page returns and revised native pointer access.
increased compileSdk to 36.
* Fixed Table of Contents (TOC) truncation bug and improved the TOC UI in `PdfViewerScreen`.
- Implemented `getFixedTableOfContents` using reflection to bypass a library issue where sibling nodes were incorrectly truncated during traversal.
- Enhanced the TOC drawer with a nested, expandable tree structure using the new `PdfTocTreeItem` component.
- Added a custom `VerticalScrollbar` with draggable support for better navigation within long TOC lists.
- Integrated `animateColorAsState` and `animateFloatAsState` for smoother UI transitions in the TOC and scrollbar.
- Optimized TOC loading by flattening the tree structure and managing expansion states with `rememberSaveable`.
* Improved zoom pivot calculation and interaction handling in PdfVerticalReader
* Fixed high-res PDF tile bleeding by implementing clipRect in PdfBitmapLayer
* fix(pdf): resolve zoom stuttering, in pagination mode, by removing eager scale snapping
* Replaced PDF-to-Markdown reflow with an enhanced PDF-to-HTML generator.
Specific changes include:
- Replaced `PdfToMarkdownGenerator` and `PdfReflowGenerator` with `PdfToHtmlGenerator`.
- Added native bridge methods in `NativePdfiumBridge.kt` and `pdfium_bridge.cpp` to extract character bounding boxes, page objects, and image pixels.
- Implemented vertical merging of text and images in `PdfToHtmlGenerator` to maintain document layout.
- Added logic to detect and filter repeating headers and footers across PDF pages.
- Updated `ReflowWorker` to generate `.html` files instead of `.md` files and updated `FileType` handling.
- Simplified `SingleFileImporter` by removing dependencies on the legacy Markdown generator.
* Updated PDF to HTML generation to include page breaks and split HTML files into individual chapters based on page markers.
* Added junk character filtering and normalization to PDF text extraction
* - Added `allRecentFiles` to `ReaderScreenState` to track all files, including reflowed versions.
- Updated `recentFiles` in `MainViewModel` to filter out reflowed files (`_reflow`) from the main library view.
- Implemented `deleteBookPermanently` in `MainViewModel` to handle book deletion and cache cleanup.
- Added a "Delete Text View" option to the `EpubReader` controls for reflowed files.
- Improved reflow file detection in `PdfViewerScreen` by checking against `allRecentFiles`.
* Implemented a centralized data-saving mechanism in `PdfViewerScreen` using a debounced `saveAllData` function. This refactor consolidates the saving of annotations, text boxes, highlights, bookmarks, and scroll positions, adding lifecycle-aware triggers and a mutex to ensure data integrity during pauses or document navigation.
* Optimized PDF selection and annotation performance by offloading heavy operations to background threads and improving UI responsiveness.
- Moved PDF page/text opening, character range calculations, and text extraction to `Dispatchers.IO`.
- Wrapped UI updates in `updateSelectionVisuals` and selection logic with `withContext(Dispatchers.Main)`.
- Implemented a more efficient `Popup`-based magnifier to replace manual offsets and transformations.
- Updated `PdfSelectionMenuPopup` properties to prevent focus and click-outside dismissal conflicts.
* Added support for reading and displaying embedded PDF annotations.
Changes include:
- Added JNI bindings in `NativePdfiumBridge` and `pdfium_bridge.cpp` to extract annotation count, subtypes, rectangles, and string values (Contents, NM, IRT, T) using PDFium.
- Introduced `EmbeddedAnnotation` data class to represent PDF annotations and their reply threads.
- Implemented annotation extraction logic in `PdfPageComposable` to fetch, group, and map embedded annotations (Sticky Notes, Highlights, etc.) to screen coordinates.
- Updated `PdfSelectionMenuPopup` to support displaying and copying comment threads.
- Improved selection menu positioning and hit detection for annotations.
- Added a safety check to recycle bitmaps in `PdfTile` rendering if handover to the main thread fails.
* Improved comment thread UI
* fix: reproducible build paths for native libs and strip unused brotli sos
* build: improve build reproducibility in CMake
* build: disable dependencies information in APK and Bundle
* perf(pdf): native Pdfium-based reflow engine with auto-open
Migrate PDF-to-Markdown reflow generation from PDFBox to a custom
native implementation using Pdfium. This transition improves
processing speed by ~10x and significantly reduces memory overhead.
- Native JNI Bridge: Implemented `pdfium_bridge.cpp` using `dlopen`
to hook into the existing `libpdfium.so` memory space.
- Optimized Extraction: Replaced character-by-character JNI calls
with bulk array retrieval (`getPageFontSizes`, `getPageFontWeights`),
drastically reducing JNI boundary overhead.
- Enhanced Accuracy: Improved Markdown formatting logic by using
native font weight (bold) and relative font size variance (headers).
- Thread Safety: Refactored generator to process pages sequentially
while synchronized with the global `PdfiumCore.lock` to ensure
stability across concurrent UI operations.
- Seamless UX: Implemented a reactive auto-open system in the
PDF viewer that tracks user intent and navigates to the reflow
view immediately upon background task completion.
* Improved PDF to Markdown conversion and added cache cleanup.
- Implemented automated cleanup of imported file caches when deleting books.
- Enhanced `PdfToMarkdownGenerator` with support for font flags (italics), improved kerning, and smarter paragraph wrapping.
- Updated `NativePdfiumBridge` and C++ JNI code to extract font information flags from PDFium.
* Implemented seamless file switching and enhanced reflow transition logic.
Key changes include:
- Added `switchToFileSeamlessly` to `MainViewModel` to handle state transitions and navigation when switching between PDF and reflowed text views.
- Updated `generateAndImportReflowFile` to support automatic opening of the generated file at a specific page/chapter.
- Integrated `NavigationEvent` and `CompletableDeferred` to manage asynchronous navigation and state updates during file switches.
- Modified `EpubReaderScreen` and `PdfViewerScreen` to pass the current position when toggling between PDF and text modes.
- Updated `AppNavigation` to move navigation logic out of the `NavHost` and added loading overlays to viewers to improve UI feedback during transitions.
docs: Revamp README and add APK naming convention
This commit introduces a complete overhaul of the `README.md` to improve project presentation. Key changes include:
* Adds a new header with the app icon and a Google Play badge.
* Updates the feature graphic and includes a note distinguishing the OSS version from the Play Store version.
* Refines the "Open Source Libraries" section to be more structured.
* Moves the main preview image into the `docs` directory.
Additionally, the `app/build.gradle.kts` file is updated to configure a standardized naming convention for output APK files, including flavor, version, and build type.
* refactor copyright headers and fix README icon alignment
This commit introduces two main changes across the codebase:
The `spotless/copyright.kt` template have been updated for consistency:
* The author name is simplified from "Episteme Authors" to "Episteme".
* The contact email prefix is shortened from "Electronic mail:" to "mail:".
Second, the `README.md` file is adjusted to correct the vertical alignment of the app icon with the project title.