Skip to content

Update Word PDF Lossless Export#4541

Open
JoeYe-233 wants to merge 1 commit into
ramensoftware:mainfrom
JoeYe-233:main
Open

Update Word PDF Lossless Export#4541
JoeYe-233 wants to merge 1 commit into
ramensoftware:mainfrom
JoeYe-233:main

Conversation

@JoeYe-233

Copy link
Copy Markdown
Contributor

This pull request significantly enhances the "Word PDF Lossless Export" Windhawk mod by introducing a flexible, robust, and user-configurable hooking mechanism for Microsoft Word's PDF export process. The update provides a new settings interface, improves reliability across Office updates, and offers detailed documentation and guidance for users.

Major improvements and new features:

User Experience & Documentation

  • Expanded and reorganized the mod's documentation, including new sections for recommended Word settings, clearer instructions for symbol downloading, and improved visual examples to help users achieve and verify lossless PDF exports.

Configuration & Settings

  • Added a new "Hook Method" option in the mod's settings (hook_method), allowing users to choose between "PDB First" (symbol-based, more robust) and "Pattern First" (faster, no PDB required) strategies for function hooking. The mod now automatically falls back to the alternate method if the preferred one fails, and always uses a local cache for performance.

Reliability & Robustness

  • Implemented a unified cache system (HookStateCache) to store hook offsets and validation data, ensuring fast and reliable operation even after Office updates. The cache is validated using opcode prefixes and is wiped automatically if settings are changed or if validation fails. [1] [2]

  • The mod now listens for settings changes and immediately wipes the cache and reloads itself, ensuring that user preference changes take effect without manual intervention.

Technical Enhancements

  • Refactored the core hooking logic to support both PDB symbol-based and pattern scanning approaches, with robust error handling, logging, and fallback mechanisms. This makes the mod more resilient to Office updates and user environment changes. [1] [2] [3]

Version bump:

  • Incremented the mod version from 1.1.1 to 1.2.0 to reflect these substantial improvements.

Changelog

If this pull request updates an existing mod, describe the changes below:

  • Added an option to use pattern scanning for hooking. This provides an alternative for specific Office versions where Microsoft has not released PDB symbols.

Mod authorship

If this pull request introduces a new mod, please complete the section below.

This mod was created by:

    • The submitter, without AI assistance
    • The submitter, with AI assistance
    • Claude
    • ChatGPT
    • Gemini
    • Another AI (please specify):
    • Other (please specify):

Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant