Skip to content

Releases: arklumpus/MuPDFCore

Version 2.0.1

06 Jan 20:20
Compare
Choose a tag to compare

Bugfixes

  • Outline items should now work correctly for EPUB (and other) documents (#41).

Version 2.0.0

25 Dec 17:32
Compare
Choose a tag to compare

New features

  • Updated to MuPDF 1.25.2.

    • I am now using a fork of MuPDF, in order to better maintain my changes to the upstream library.
  • New API for document creation/conversion.

    • Instead of invoking MuPDFDocument.CreateDocument, the static class MuPDFDocument.Create has a number of static methods that can be used to create specific document formats, providing format-specific options.
      • MuPDFDocument.Create.Document overloads are mostly equivalent to the MuPDFDocument.CreateDocument; here, the fileType parameter is used to specify the output format, and the default options for that format are used.
      • Each of the other methods can be used to create a specific kind of document, providing format-specific options:
        • MuPDFDocument.Create.PDFDocument to create PDF documents.
        • MuPDFDocument.Create.SVGDocument to create SVG files (single-page).
        • MuPDFDocument.Create.CBZDocument to create CBZ documents.
        • MuPDFDocument.Create.TextDocument to create a text document.
        • MuPDFDocument.Create.StructuredTextDocument to create a structured text XML document.
        • MuPDFDocument.Create.HTMLDocument to create an HTML document.
        • MuPDFDocument.Create.XHTMLDocument to create an XHTML document.
    • As a result, MuPDFDocument.CreateDocument is now deprecated, which is somewhat of a breaking change.
  • New methods and properties to work with optional content groups (OCGs, also known as layers) in PDF documents.

    • The MuPDFDocument class now has an OptionalContentGroupData property, which can be used to access the OCG information, if any. This provides access to the default and alternative configurations, as well as the individual OCGs (layers).
    • Individual MuPDFOptionalContentGroup can be enabled or disabled programmatically, while the UI property of the MuPDFOptionalContentGroupConfiguration class provides access to a tree-like structure of UI elements (labels, check boxes, radio buttons) that should be presented to the end-user for manual toggling.
  • New methods and properties to access links in documents.

    • The Links property of the MuPDFPage class provides a list of all the links contained on the page; each MuPDFLink has an ActiveArea and a Destination (which can be internal or external). The IsVisible property can be used to determine whether the link is visible (based on the current OCG/layer configuration).
  • New GetBoundingBox method to get the various kinds of bounding boxes from a MuPDFPage (#38).

  • Changes to how structured text representations are handled, to allow for new types of structured text blocks:

    • MuPDFGridStructuredTextBlock, representing "grid" lines.
    • MuPDFStructureStructuredTextBlock, representing structural elements.
    • MuPDFVectorStructuredTextBlock, representing blocks of vector art.

    The kind of structured text blocks produced is determined by the new optional StructuredTextFlags flags parameter of the GetStructuredTextPage method, which replaces the previous bool preserveImages (this is also a breaking change). Multiple flags can be combined with the | operator (e.g., StructuredTextFlags.PreserveImages | StructuredTextFlags.Dehyphenate will both preserve images and dehyphenate the document).

Version 1.10.2

22 Jul 14:47
Compare
Choose a tag to compare
  • In cases where things are disposed out of order, a new kind of exception is now thrown (LifetimeManagementException), in order to prevent nastier AccessViolationExceptions down the line (#35).

Version 1.10.1

12 Jun 23:30
Compare
Choose a tag to compare

New features

  • Updated to MuPDF 1.24.3.
  • Added support for retrieving images and font information from structured text pages (#31).
    • It is now possible to save individual images or to get access to their pixel values.
    • For fonts, the font name and style are reported. Two methods provide access to the native font handles (but these won't be particularly useful without bindings for the FreeType library or the internal Type3 font renderer).

Bugfixes

  • MuPDFCore.MuPDFRenderer: fixed issue with selection not clearing after the page is updated (#32).

Version 1.9.0

23 Mar 20:59
Compare
Choose a tag to compare

New features

  • Updated MuPDF to 1.24.0
  • Support for new input formats: TXT (text files), DOCX (Microsoft Word), PPTX (Microsoft Powerpoint), XLSX (Microsoft Excel). Note that only plain text is extracted from Office documents and the layout is not fully respected.
  • The MuPDFDocument class now has an Outline property, which makes it possible to access the document's outline (table of contents), if one is defined (#29). The PDF viewer demo shows document outlines.

Bugfixes

  • The background of the MuPDFRenderer control now works correctly when the control has a non-zero offset.

Version 1.8.0

26 Nov 14:29
Compare
Choose a tag to compare

New features

  • Updated MuPDF to 1.23.6.
  • Added API to get/set the anti-aliasing level (#27).
    • The MuPDFContext.GraphicsAntiAliasing property can be used to get and set the graphics anti-aliasing.
    • The MuPDFContext.TextAntiAliasing property can be used to get and set the text anti-aliasing.
    • The MuPDFContext.AntiAliasing property (write-only) can be used to set both the graphics and text anti-aliasing to the same level.
  • Added support for JPEG output format.
  • Added support for MOBI and HTML input format. This is both integrated within the general MuPDFDocument.SaveImage and MuPDFDocument.WriteImage methods, as well as in two dedicated methods (MuPDFDocument.SaveImageAsJPEG and MuPDFDocument.WriteImageAsJPEG) that allow specifying the JPEG quality level.
  • Added API to layout reflowable document types (e.g., MOBI and HTML):
    • MuPDFDocument.Layout(float width, float height, float em) can be used to layout the document using a fixed page size.
    • MuPDFDocument.LayoutSinglePage(float width, float em) can be used to layout the document to a single page of the specified width.
      After these methods have been called, the Pages of the MuPDFDocument will be recreated with the specified layout.
  • Enabled strong name signing (#23).
  • Native assets are now in separate NuGet packages (the right packages should be picked automatically).
  • linux-musl-x64 and linux-musl-arm64 no longer require manually copying the native asset (but see the note for linux-musl-arm64).
  • MuPDFCore.MuPDFRenderer now targets Avalonia 11 (#26).

Version 1.7.0

28 Jan 19:38
Compare
Choose a tag to compare

New features

  • Updated MuPDF to 1.21.1.
  • Added support form linux-musl-x64 and linux-musl-arm64 platforms.
    • To get this to work, download the asset you need from this page, and use it to replace the default glibc-based libMuPDFWrapper.so file that gets created when you build your app.

Version 1.6.0

26 Jul 18:42
Compare
Choose a tag to compare

New features

  • Updated MuPDF to version 1.20.0.
  • Added a wiki with some information and examples (that used to be in the homepage of the repository).
  • Added methods to support encrypted and restricted (password-protected) documents (#17), see the page in the wiki.

Notable changes

  • Attempting to render an encrypted document without first unlocking it with the user password now results in an exception, rather than producing blank pages as in previous versions.

Version 1.5.0

20 Apr 04:04
Compare
Choose a tag to compare

New features

  • Updated MuPDF to version 1.19.1.
  • Added methods to suppress and redirect the standard output and standard error from the native MuPDF library to managed events.
  • Added parameters to report OCR progress and to allow cancellation (not supported on Windows x86).
  • Added overloads that return Span<byte> (#16).
  • New constructor for DisposableIntPtr, which adds and removes GC memory pressure when it is created/disposed.
  • Added support for Tesseract OCR on Mac-arm64.

Bugfixes

  • Fixed platform target for Linux-arm64 and Mac-arm64 tests.
  • Added missing build options for Linux-arm64.

Version 1.4.1

19 Jan 21:37
Compare
Choose a tag to compare

Bugfixes

  • Fixed a bug occurring when input or output file names contain characters outside the ASCII range (#14).