diff --git a/CHANGELOG.md b/CHANGELOG.md index ab98708..4011f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### [3.2.13-rc.14] - 2026-02-11 +- Upgraded `MuPDF.NativeAssets` to 1.27.2 and refreshed generated MuPDF bindings for Windows and Linux. +- Implemented `IDisposable` on core types (`Document`, `Page`, `TextPage`, `Story`, `DocumentWriter`, `DisplayList`, `Font`, `GraftMap`, `DeviceWrapper`, `Outline`) and made `Document.Dispose()` idempotent. +- Hardened native resource handling (e.g. `Document.Convert2Pdf`, `Pixmap.InvertIrect`) to be exception-safe, fixed `Pixmap.InvertIrect` null/stencil handling, and added tests for table extraction and disposal patterns. + ### [3.2.13-rc.6] - 2025-12-26 - Fixed the issues in `ResolveNames` method. - Fixed the issues in `DrawShape` diff --git a/Demo/Program.cs b/Demo/Program.cs index 51d7105..19fcedf 100644 --- a/Demo/Program.cs +++ b/Demo/Program.cs @@ -84,10 +84,30 @@ static void Main(string[] args) TestTable(); TestGetText(); TestMarkdownReader(); + TestRecompressJBIG2(); return; } + static void TestRecompressJBIG2() + { + Console.WriteLine("\n=== TestJBIG2 ======================="); + + string testFilePath = Path.GetFullPath("../../../TestDocuments/Jbig2.pdf"); + + Document doc = new Document(testFilePath); + + PdfImageRewriterOptions opts = new PdfImageRewriterOptions(); + + opts.bitonal_image_recompress_method = mupdf.mupdf.FZ_RECOMPRESS_FAX; + opts.recompress_when = mupdf.mupdf.FZ_RECOMPRESS_WHEN_ALWAYS; + + doc.RewriteImage(options: opts); + + doc.Save(@"e:\TestRecompressJBIG2.pdf"); + doc.Close(); + } + static void TestMarkdownReader() { Console.WriteLine("\n=== TestMarkdownReader ======================="); diff --git a/Demo/TestDocuments/Jbig2.pdf b/Demo/TestDocuments/Jbig2.pdf new file mode 100644 index 0000000..d8c9a13 Binary files /dev/null and b/Demo/TestDocuments/Jbig2.pdf differ diff --git a/MuPDF.NET.Test/DisposePatternTest.cs b/MuPDF.NET.Test/DisposePatternTest.cs new file mode 100644 index 0000000..80fdc4b --- /dev/null +++ b/MuPDF.NET.Test/DisposePatternTest.cs @@ -0,0 +1,119 @@ +using System; +using System.IO; +using NUnit.Framework; +using MuPDF.NET; + +namespace MuPDF.NET.Test +{ + public class DisposePatternTest + { + private const string TocPath = "../../../resources/toc.pdf"; + + [Test] + public void Document_Dispose_MultipleTimes_DoesNotThrow() + { + var doc = new Document(TocPath); + + doc.Dispose(); + + Assert.DoesNotThrow(() => doc.Dispose()); + } + + [Test] + public void Page_Dispose_MultipleTimes_DoesNotThrow() + { + var doc = new Document(TocPath); + var page = doc[0]; + + page.Dispose(); + + Assert.DoesNotThrow(() => page.Dispose()); + + doc.Dispose(); + } + + [Test] + public void TextPage_Dispose_MultipleTimes_DoesNotThrow() + { + var doc = new Document(TocPath); + var page = doc[0]; + var textPage = page.GetTextPage(); + + textPage.Dispose(); + + Assert.DoesNotThrow(() => textPage.Dispose()); + + page.Dispose(); + doc.Dispose(); + } + + [Test] + public void Story_Dispose_MultipleTimes_DoesNotThrow() + { + var story = new Story("

Hello

"); + + story.Dispose(); + + Assert.DoesNotThrow(() => story.Dispose()); + } + + [Test] + public void DisplayList_Dispose_MultipleTimes_DoesNotThrow() + { + var rect = new Rect(0, 0, 100, 100); + var dl = new DisplayList(rect); + + dl.Dispose(); + + Assert.DoesNotThrow(() => dl.Dispose()); + } + + [Test] + public void DocumentWriter_Dispose_MultipleTimes_DoesNotThrow() + { + string path = Path.GetTempFileName(); + + try + { + var writer = new DocumentWriter(path); + + writer.Dispose(); + + Assert.DoesNotThrow(() => writer.Dispose()); + } + finally + { + if (File.Exists(path)) + File.Delete(path); + } + } + + [Test] + public void Font_Dispose_MultipleTimes_DoesNotThrow() + { + var font = new Font(); + + font.Dispose(); + + Assert.DoesNotThrow(() => font.Dispose()); + } + + [Test] + public void GraftMap_Dispose_MultipleTimes_DoesNotThrow() + { + var doc = new Document(TocPath); + var map = new GraftMap(doc); + + map.Dispose(); + + Assert.DoesNotThrow(() => map.Dispose()); + + doc.Dispose(); + } + + // Outline is constructed internally from native MuPDF outline structures and + // not exposed as a public constructor. Its disposal semantics are exercised + // indirectly via Document/Document.GetToc tests, so we skip a direct idempotency test. + } +} + diff --git a/MuPDF.NET.Test/resources/test_1645_expected.pdf b/MuPDF.NET.Test/resources/test_1645_expected.pdf index 55f59f4..f680557 100644 Binary files a/MuPDF.NET.Test/resources/test_1645_expected.pdf and b/MuPDF.NET.Test/resources/test_1645_expected.pdf differ diff --git a/MuPDF.NET/DeviceWrapper.cs b/MuPDF.NET/DeviceWrapper.cs index 289d804..a65cad8 100644 --- a/MuPDF.NET/DeviceWrapper.cs +++ b/MuPDF.NET/DeviceWrapper.cs @@ -1,8 +1,9 @@ -using mupdf; +using mupdf; +using System; namespace MuPDF.NET { - public class DeviceWrapper + public class DeviceWrapper : IDisposable { static DeviceWrapper() { diff --git a/MuPDF.NET/DisplayList.cs b/MuPDF.NET/DisplayList.cs index 3ad3371..3e89f9e 100644 --- a/MuPDF.NET/DisplayList.cs +++ b/MuPDF.NET/DisplayList.cs @@ -1,8 +1,9 @@ -using mupdf; +using mupdf; +using System; namespace MuPDF.NET { - public class DisplayList + public class DisplayList : IDisposable { static DisplayList() diff --git a/MuPDF.NET/Document.cs b/MuPDF.NET/Document.cs index 4dccd75..a775bfb 100644 --- a/MuPDF.NET/Document.cs +++ b/MuPDF.NET/Document.cs @@ -1,4 +1,4 @@ -using mupdf; +using mupdf; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -12,7 +12,7 @@ namespace MuPDF.NET { - public class Document + public class Document : IDisposable { static Document() { @@ -632,7 +632,7 @@ public byte[] Convert2Pdf(int from = 0, int to = -1, int rotate = 0) { if (IsClosed || IsEncrypted) throw new Exception("document closed or encrypted"); - + FzDocument doc = _nativeDocument; int fp = from; int tp = to; @@ -646,69 +646,131 @@ public byte[] Convert2Pdf(int from = 0, int to = -1, int rotate = 0) tp = srcCount - 1; if (tp > srcCount - 1) tp = srcCount - 1; - + int len0 = Utils.MUPDF_WARNINGS_STORE.Count; PdfDocument pdfout = new PdfDocument(); - int incr = 1; - if (fp > tp) - { - incr = -1; - int t = tp; - tp = fp; - fp = t; - } - - int rot = Utils.NormalizeRotation(rotate); - int i = fp; + PdfWriteOptions opts = new PdfWriteOptions(); + FzBuffer res = null; + FzOutput output = null; - while (true) + try { - if (!Utils.INRANGE(i, fp, tp)) - break; - - FzPage page = doc.fz_load_page(i); - FzRect mediabox = page.fz_bound_page(); - PdfObj resources = new PdfObj(); - FzBuffer contents = new FzBuffer(); - FzDevice dev = pdfout.pdf_page_write(mediabox, resources, contents); - page.fz_run_page(dev, new FzMatrix(), new FzCookie()); - dev.fz_close_device(); - dev.Dispose(); - dev = null; + int incr = 1; + if (fp > tp) + { + incr = -1; + int t = tp; + tp = fp; + fp = t; + } - PdfObj pageObj = pdfout.pdf_add_page(mediabox, rot, resources, contents); - pdfout.pdf_insert_page(-1, pageObj); - i += incr; - } + int rot = Utils.NormalizeRotation(rotate); + int i = fp; - PdfWriteOptions opts = new PdfWriteOptions(); - opts.do_garbage = 4; - opts.do_compress = 1; - opts.do_compress_images = 1; - opts.do_compress_fonts = 1; - opts.do_sanitize = 1; - opts.do_incremental = 0; - opts.do_ascii = 0; - opts.do_decompress = 0; - opts.do_linear = 0; - opts.do_clean = 1; - opts.do_pretty = 0; - - FzBuffer res = mupdf.mupdf.fz_new_buffer(8192); - FzOutput output = new FzOutput(res); - pdfout.pdf_write_document(output, opts); - output.fz_close_output(); - output.Dispose(); + while (true) + { + if (!Utils.INRANGE(i, fp, tp)) + break; + + FzPage page = null; + PdfObj resources = null; + FzBuffer contents = null; + FzDevice dev = null; + + try + { + page = doc.fz_load_page(i); + FzRect mediabox = page.fz_bound_page(); + resources = new PdfObj(); + contents = new FzBuffer(); + dev = pdfout.pdf_page_write(mediabox, resources, contents); + page.fz_run_page(dev, new FzMatrix(), new FzCookie()); + + PdfObj pageObj = pdfout.pdf_add_page(mediabox, rot, resources, contents); + pdfout.pdf_insert_page(-1, pageObj); + } + finally + { + if (dev != null) + { + dev.fz_close_device(); + dev.Dispose(); + dev = null; + } + + if (contents != null) + { + contents.Dispose(); + contents = null; + } + + if (resources != null) + { + resources.Dispose(); + resources = null; + } + + if (page != null) + { + page.Dispose(); + page = null; + } + } + + i += incr; + } + + opts.do_garbage = 4; + opts.do_compress = 1; + opts.do_compress_images = 1; + opts.do_compress_fonts = 1; + opts.do_sanitize = 1; + opts.do_incremental = 0; + opts.do_ascii = 0; + opts.do_decompress = 0; + opts.do_linear = 0; + opts.do_clean = 1; + opts.do_pretty = 0; + + res = mupdf.mupdf.fz_new_buffer(8192); + output = new FzOutput(res); + pdfout.pdf_write_document(output, opts); + output.fz_close_output(); - byte[] ret = Utils.BinFromBuffer(res); - int len1 = Utils.MUPDF_WARNINGS_STORE.Count; + byte[] ret = Utils.BinFromBuffer(res); + int len1 = Utils.MUPDF_WARNINGS_STORE.Count; - for (i = len0; i < len1; i++) + for (int j = len0; j < len1; j++) + { + Console.WriteLine($"{Utils.MUPDF_WARNINGS_STORE[j]}"); + } + + return ret; + } + finally { - Console.WriteLine($"{Utils.MUPDF_WARNINGS_STORE[i]}"); + if (output != null) + { + output.Dispose(); + output = null; + } + + if (res != null) + { + res.Dispose(); + res = null; + } + + if (opts != null) + { + opts.Dispose(); + } + + if (pdfout != null) + { + pdfout.Dispose(); + } } - - return ret; } public FzDocument ToFzDocument() @@ -5952,8 +6014,9 @@ public void Bake(bool annots = true, bool widgets = true) public void Dispose() { + // Make Dispose idempotent: safe to call multiple times. if (IsClosed) - throw new Exception("document closed"); + return; if (Outline != null) { @@ -5969,19 +6032,12 @@ public void Dispose() public void Close() { + // Preserve existing Close() behavior (throws if already closed), + // but delegate the actual cleanup to Dispose(). if (IsClosed) throw new Exception("document closed"); - if (Outline != null) - { - Outline.Dispose(); - Outline = null; - } - ResetPageRefs(); - IsClosed = true; - GraftMaps = new Dictionary(); - _nativeDocument.Dispose(); - _nativeDocument = null; + Dispose(); } /// diff --git a/MuPDF.NET/DocumentWriter.cs b/MuPDF.NET/DocumentWriter.cs index aecb7df..44ff69a 100644 --- a/MuPDF.NET/DocumentWriter.cs +++ b/MuPDF.NET/DocumentWriter.cs @@ -1,9 +1,10 @@ -using mupdf; +using mupdf; +using System; using System.IO; namespace MuPDF.NET { - public class DocumentWriter + public class DocumentWriter : IDisposable { static DocumentWriter() { diff --git a/MuPDF.NET/Font.cs b/MuPDF.NET/Font.cs index 8e1717c..87dc076 100644 --- a/MuPDF.NET/Font.cs +++ b/MuPDF.NET/Font.cs @@ -1,10 +1,10 @@ -using mupdf; +using mupdf; using System; using System.Collections.Generic; namespace MuPDF.NET { - public class Font + public class Font : IDisposable { static Font() { diff --git a/MuPDF.NET/GraftMap.cs b/MuPDF.NET/GraftMap.cs index d4fa43c..fe1fcb2 100644 --- a/MuPDF.NET/GraftMap.cs +++ b/MuPDF.NET/GraftMap.cs @@ -1,8 +1,9 @@ -using mupdf; +using mupdf; +using System; namespace MuPDF.NET { - public class GraftMap + public class GraftMap : IDisposable { static GraftMap() { diff --git a/MuPDF.NET/MuPDF.NET.csproj b/MuPDF.NET/MuPDF.NET.csproj index 13b78fc..64e8d06 100644 --- a/MuPDF.NET/MuPDF.NET.csproj +++ b/MuPDF.NET/MuPDF.NET.csproj @@ -54,7 +54,7 @@ - + diff --git a/MuPDF.NET/MuPDF.NET.nuspec b/MuPDF.NET/MuPDF.NET.nuspec index 086cfc5..83c6a4a 100644 --- a/MuPDF.NET/MuPDF.NET.nuspec +++ b/MuPDF.NET/MuPDF.NET.nuspec @@ -2,7 +2,7 @@ MuPDF.NET - 3.2.13-rc.12 + 3.2.13-rc.14 Artifex Software Inc. true LICENSE.md @@ -14,14 +14,14 @@ - + - + diff --git a/MuPDF.NET/Page.cs b/MuPDF.NET/Page.cs index 302f624..b3e5484 100644 --- a/MuPDF.NET/Page.cs +++ b/MuPDF.NET/Page.cs @@ -14,7 +14,7 @@ namespace MuPDF.NET { - public class Page + public class Page : IDisposable { static Page() { diff --git a/MuPDF.NET/Pixmap.cs b/MuPDF.NET/Pixmap.cs index 0d53346..d2a2da1 100644 --- a/MuPDF.NET/Pixmap.cs +++ b/MuPDF.NET/Pixmap.cs @@ -1,4 +1,4 @@ -using mupdf; +using mupdf; using SkiaSharp; using System; using System.Collections.Generic; @@ -900,12 +900,19 @@ public bool InvertIrect(IRect bbox = null) FzPixmap pm = _nativePixmap; if (_nativePixmap.fz_pixmap_colorspace() == null) { - Console.WriteLine("ignored for stencil pixmap"); return false; } - FzIrect r = bbox.ToFzIrect(); - if (r.fz_is_infinite_irect() != 0) + FzIrect r; + if (bbox is null) + { r = pm.fz_pixmap_bbox(); + } + else + { + r = bbox.ToFzIrect(); + if (r.fz_is_infinite_irect() != 0) + r = pm.fz_pixmap_bbox(); + } return Convert.ToBoolean(InvertPixmapRect(pm, r)); } diff --git a/MuPDF.NET/Story.cs b/MuPDF.NET/Story.cs index 5c7e89a..a27476e 100644 --- a/MuPDF.NET/Story.cs +++ b/MuPDF.NET/Story.cs @@ -1,4 +1,4 @@ -using mupdf; +using mupdf; using System; using System.Collections.Generic; using System.IO; @@ -6,7 +6,7 @@ namespace MuPDF.NET { - public class Story + public class Story : IDisposable { static Story() { diff --git a/MuPDF.NET/TextPage.cs b/MuPDF.NET/TextPage.cs index d0008d2..2dc5e66 100644 --- a/MuPDF.NET/TextPage.cs +++ b/MuPDF.NET/TextPage.cs @@ -6,7 +6,7 @@ namespace MuPDF.NET { - public class TextPage + public class TextPage : IDisposable { static TextPage() { diff --git a/MuPDF.NET/build/net4/MuPDF.NET.targets b/MuPDF.NET/build/net4/MuPDF.NET.targets index d660670..1d0d15e 100644 --- a/MuPDF.NET/build/net4/MuPDF.NET.targets +++ b/MuPDF.NET/build/net4/MuPDF.NET.targets @@ -20,9 +20,9 @@ ( '$(IsX64)' == 'true' or ('$(IsAnyCPU)' == 'true' and '$(IsPrefer32Bit)' != 'true'))"> - - @@ -31,9 +31,9 @@ ( '$(IsX86)' == 'true' or ('$(IsAnyCPU)' == 'true' and '$(IsPrefer32Bit)' == 'true'))"> - - diff --git a/MuPDF.NET/mupdf_linux.cs b/MuPDF.NET/mupdf_linux.cs index e31615e..bdf0245 100644 --- a/MuPDF.NET/mupdf_linux.cs +++ b/MuPDF.NET/mupdf_linux.cs @@ -26394,6 +26394,18 @@ public string bitonal_image_recompress_quality { } } + public int recompress_when { + set { + mupdfPINVOKE.pdf_image_rewriter_options_recompress_when_set(swigCPtr, value); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + int ret = mupdfPINVOKE.pdf_image_rewriter_options_recompress_when_get(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public pdf_image_rewriter_options() : this(mupdfPINVOKE.new_pdf_image_rewriter_options(), true) { if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); } @@ -32513,6 +32525,113 @@ public static int s_num_instances { } namespace mupdf { +public class FzFlotilla : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal FzFlotilla(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FzFlotilla obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal static global::System.Runtime.InteropServices.HandleRef swigRelease(FzFlotilla obj) { + if (obj != null) { + if (!obj.swigCMemOwn) + throw new global::System.ApplicationException("Cannot release ownership as memory is not owned"); + global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.Dispose(); + return ptr; + } else { + return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + + ~FzFlotilla() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + mupdfPINVOKE.delete_FzFlotilla(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public FzFlotilla(FzStextPage page) : this(mupdfPINVOKE.new_FzFlotilla__SWIG_0(FzStextPage.getCPtr(page)), true) { + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + + public FzFlotilla() : this(mupdfPINVOKE.new_FzFlotilla__SWIG_1(), true) { + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + + public FzRect fz_flotilla_raft_area(int i) { + FzRect ret = new FzRect(mupdfPINVOKE.FzFlotilla_fz_flotilla_raft_area(swigCPtr, i), true); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int fz_flotilla_size() { + int ret = mupdfPINVOKE.FzFlotilla_fz_flotilla_size(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public FzFlotilla(SWIGTYPE_p_fz_flotilla internal_) : this(mupdfPINVOKE.new_FzFlotilla__SWIG_2(SWIGTYPE_p_fz_flotilla.getCPtr(internal_)), true) { + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + + public long m_internal_value() { + long ret = mupdfPINVOKE.FzFlotilla_m_internal_value(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_fz_flotilla m_internal { + set { + mupdfPINVOKE.FzFlotilla_m_internal_set(swigCPtr, SWIGTYPE_p_fz_flotilla.getCPtr(value)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = mupdfPINVOKE.FzFlotilla_m_internal_get(swigCPtr); + SWIGTYPE_p_fz_flotilla ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_fz_flotilla(cPtr, false); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static int s_num_instances { + set { + mupdfPINVOKE.FzFlotilla_s_num_instances_set(value); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + int ret = mupdfPINVOKE.FzFlotilla_s_num_instances_get(); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + +} + +} +namespace mupdf { + public class FzFont : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -53192,6 +53311,18 @@ public string bitonal_image_recompress_quality { } } + public int recompress_when { + set { + mupdfPINVOKE.PdfImageRewriterOptions_recompress_when_set(swigCPtr, value); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + int ret = mupdfPINVOKE.PdfImageRewriterOptions_recompress_when_get(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static int s_num_instances { set { mupdfPINVOKE.PdfImageRewriterOptions_s_num_instances_set(value); @@ -76756,6 +76887,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_ACCURATE_SIDE_BEARINGS_get")] public static extern int FZ_STEXT_ACCURATE_SIDE_BEARINGS_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_LAZY_VECTORS_get")] + public static extern int FZ_STEXT_LAZY_VECTORS_get(); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_FUZZY_VECTORS_get")] + public static extern int FZ_STEXT_FUZZY_VECTORS_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_MEDIABOX_CLIP_get")] public static extern int FZ_STEXT_MEDIABOX_CLIP_get(); @@ -83947,6 +84084,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_RECOMPRESS_FAX_get")] public static extern int FZ_RECOMPRESS_FAX_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_RECOMPRESS_WHEN_SMALLER_get")] + public static extern int FZ_RECOMPRESS_WHEN_SMALLER_get(); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_RECOMPRESS_WHEN_ALWAYS_get")] + public static extern int FZ_RECOMPRESS_WHEN_ALWAYS_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_color_lossless_image_subsample_method_set")] public static extern void pdf_image_rewriter_options_color_lossless_image_subsample_method_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); @@ -84097,6 +84240,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_bitonal_image_recompress_quality_get")] public static extern string pdf_image_rewriter_options_bitonal_image_recompress_quality_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_recompress_when_set")] + public static extern void pdf_image_rewriter_options_recompress_when_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_recompress_when_get")] + public static extern int pdf_image_rewriter_options_recompress_when_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_pdf_image_rewriter_options")] public static extern global::System.IntPtr new_pdf_image_rewriter_options(); @@ -84946,6 +85095,9 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_drop_drawn_tiles_for_document")] public static extern void ll_fz_drop_drawn_tiles_for_document(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_drop_flotilla")] + public static extern void ll_fz_drop_flotilla(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_drop_font")] public static extern void ll_fz_drop_font(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -85192,6 +85344,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_find_table_within_bounds")] public static extern global::System.IntPtr ll_fz_find_table_within_bounds(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_flotilla_raft_area")] + public static extern global::System.IntPtr ll_fz_flotilla_raft_area(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_flotilla_size")] + public static extern int ll_fz_flotilla_size(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_flush_output")] public static extern void ll_fz_flush_output(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -86320,6 +86478,9 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_new_draw_device_with_proof")] public static extern global::System.IntPtr ll_fz_new_draw_device_with_proof(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_new_flotilla_from_stext_page_vectors")] + public static extern global::System.IntPtr ll_fz_new_flotilla_from_stext_page_vectors(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_new_font_from_buffer")] public static extern global::System.IntPtr ll_fz_new_font_from_buffer(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4); @@ -93307,6 +93468,39 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzErrorStackSlot_s_num_instances_get")] public static extern int FzErrorStackSlot_s_num_instances_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFlotilla__SWIG_0")] + public static extern global::System.IntPtr new_FzFlotilla__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFlotilla__SWIG_1")] + public static extern global::System.IntPtr new_FzFlotilla__SWIG_1(); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_fz_flotilla_raft_area")] + public static extern global::System.IntPtr FzFlotilla_fz_flotilla_raft_area(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_fz_flotilla_size")] + public static extern int FzFlotilla_fz_flotilla_size(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFlotilla__SWIG_2")] + public static extern global::System.IntPtr new_FzFlotilla__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_delete_FzFlotilla")] + public static extern void delete_FzFlotilla(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_m_internal_value")] + public static extern long FzFlotilla_m_internal_value(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_m_internal_set")] + public static extern void FzFlotilla_m_internal_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_m_internal_get")] + public static extern global::System.IntPtr FzFlotilla_m_internal_get(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_s_num_instances_set")] + public static extern void FzFlotilla_s_num_instances_set(int jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_s_num_instances_get")] + public static extern int FzFlotilla_s_num_instances_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFont__SWIG_0")] public static extern global::System.IntPtr new_FzFont__SWIG_0(string jarg1); @@ -101050,6 +101244,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_bitonal_image_recompress_quality_get")] public static extern string PdfImageRewriterOptions_bitonal_image_recompress_quality_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_recompress_when_set")] + public static extern void PdfImageRewriterOptions_recompress_when_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_recompress_when_get")] + public static extern int PdfImageRewriterOptions_recompress_when_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_s_num_instances_set")] public static extern void PdfImageRewriterOptions_s_num_instances_set(int jarg1); @@ -105274,6 +105474,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_find_table_within_bounds")] public static extern global::System.IntPtr fz_find_table_within_bounds(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_flotilla_raft_area")] + public static extern global::System.IntPtr fz_flotilla_raft_area(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_flotilla_size")] + public static extern int fz_flotilla_size(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_flush_output")] public static extern void fz_flush_output(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -115795,6 +116001,11 @@ public static void ll_fz_drop_drawn_tiles_for_document(fz_document doc) { if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); } + public static void ll_fz_drop_flotilla(SWIGTYPE_p_fz_flotilla f) { + mupdfPINVOKE.ll_fz_drop_flotilla(SWIGTYPE_p_fz_flotilla.getCPtr(f)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + public static void ll_fz_drop_font(fz_font font) { mupdfPINVOKE.ll_fz_drop_font(fz_font.getCPtr(font)); if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); @@ -116231,6 +116442,18 @@ public static fz_stext_block ll_fz_find_table_within_bounds(fz_stext_page page, return ret; } + public static fz_rect ll_fz_flotilla_raft_area(SWIGTYPE_p_fz_flotilla flot, int i) { + fz_rect ret = new fz_rect(mupdfPINVOKE.ll_fz_flotilla_raft_area(SWIGTYPE_p_fz_flotilla.getCPtr(flot), i), true); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static int ll_fz_flotilla_size(SWIGTYPE_p_fz_flotilla flot) { + int ret = mupdfPINVOKE.ll_fz_flotilla_size(SWIGTYPE_p_fz_flotilla.getCPtr(flot)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static void ll_fz_flush_output(fz_output out_) { mupdfPINVOKE.ll_fz_flush_output(fz_output.getCPtr(out_)); if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); @@ -118596,6 +118819,13 @@ public static fz_device ll_fz_new_draw_device_with_proof(fz_matrix transform, fz return ret; } + public static SWIGTYPE_p_fz_flotilla ll_fz_new_flotilla_from_stext_page_vectors(fz_stext_page page) { + global::System.IntPtr cPtr = mupdfPINVOKE.ll_fz_new_flotilla_from_stext_page_vectors(fz_stext_page.getCPtr(page)); + SWIGTYPE_p_fz_flotilla ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_fz_flotilla(cPtr, false); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static fz_font ll_fz_new_font_from_buffer(string name, fz_buffer buffer, int index, int use_glyph_bbox) { global::System.IntPtr cPtr = mupdfPINVOKE.ll_fz_new_font_from_buffer(name, fz_buffer.getCPtr(buffer), index, use_glyph_bbox); fz_font ret = (cPtr == global::System.IntPtr.Zero) ? null : new fz_font(cPtr, false); @@ -129491,6 +129721,18 @@ public static FzStextBlock fz_find_table_within_bounds(FzStextPage page, FzRect return ret; } + public static FzRect fz_flotilla_raft_area(FzFlotilla flot, int i) { + FzRect ret = new FzRect(mupdfPINVOKE.fz_flotilla_raft_area(FzFlotilla.getCPtr(flot), i), true); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static int fz_flotilla_size(FzFlotilla flot) { + int ret = mupdfPINVOKE.fz_flotilla_size(FzFlotilla.getCPtr(flot)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static void fz_flush_output(FzOutput out_) { mupdfPINVOKE.fz_flush_output(FzOutput.getCPtr(out_)); if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); @@ -140044,6 +140286,8 @@ public static pdf_zugferd_profile ll_pdf_zugferd_profile_outparams_fn(pdf_docume public static readonly int FZ_STEXT_CLIP_RECT = mupdfPINVOKE.FZ_STEXT_CLIP_RECT_get(); public static readonly int FZ_STEXT_ACCURATE_ASCENDERS = mupdfPINVOKE.FZ_STEXT_ACCURATE_ASCENDERS_get(); public static readonly int FZ_STEXT_ACCURATE_SIDE_BEARINGS = mupdfPINVOKE.FZ_STEXT_ACCURATE_SIDE_BEARINGS_get(); + public static readonly int FZ_STEXT_LAZY_VECTORS = mupdfPINVOKE.FZ_STEXT_LAZY_VECTORS_get(); + public static readonly int FZ_STEXT_FUZZY_VECTORS = mupdfPINVOKE.FZ_STEXT_FUZZY_VECTORS_get(); public static readonly int FZ_STEXT_MEDIABOX_CLIP = mupdfPINVOKE.FZ_STEXT_MEDIABOX_CLIP_get(); public static readonly int FZ_STEXT_BLOCK_TEXT = mupdfPINVOKE.FZ_STEXT_BLOCK_TEXT_get(); @@ -140884,6 +141128,9 @@ public static pdf_zugferd_profile ll_pdf_zugferd_profile_outparams_fn(pdf_docume public static readonly int FZ_RECOMPRESS_J2K = mupdfPINVOKE.FZ_RECOMPRESS_J2K_get(); public static readonly int FZ_RECOMPRESS_FAX = mupdfPINVOKE.FZ_RECOMPRESS_FAX_get(); + public static readonly int FZ_RECOMPRESS_WHEN_SMALLER = mupdfPINVOKE.FZ_RECOMPRESS_WHEN_SMALLER_get(); + public static readonly int FZ_RECOMPRESS_WHEN_ALWAYS = mupdfPINVOKE.FZ_RECOMPRESS_WHEN_ALWAYS_get(); + public static readonly int UCDN_EAST_ASIAN_F = mupdfPINVOKE.UCDN_EAST_ASIAN_F_get(); public static readonly int UCDN_EAST_ASIAN_H = mupdfPINVOKE.UCDN_EAST_ASIAN_H_get(); public static readonly int UCDN_EAST_ASIAN_W = mupdfPINVOKE.UCDN_EAST_ASIAN_W_get(); @@ -145064,6 +145311,29 @@ protected SWIGTYPE_p_f_p_fz_context_p_pdf_processor_float__void() { } namespace mupdf { +public class SWIGTYPE_p_fz_flotilla { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal SWIGTYPE_p_fz_flotilla(global::System.IntPtr cPtr, bool futureUse) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + protected SWIGTYPE_p_fz_flotilla() { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_fz_flotilla obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal static global::System.Runtime.InteropServices.HandleRef swigRelease(SWIGTYPE_p_fz_flotilla obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } +} + +} +namespace mupdf { + public class SWIGTYPE_p_f_p_fz_context_p_fz_document_p_fz_output__void { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/MuPDF.NET/mupdf_windows.cs b/MuPDF.NET/mupdf_windows.cs index 6af727d..0be1e61 100644 --- a/MuPDF.NET/mupdf_windows.cs +++ b/MuPDF.NET/mupdf_windows.cs @@ -26394,6 +26394,18 @@ public string bitonal_image_recompress_quality { } } + public int recompress_when { + set { + mupdfPINVOKE.pdf_image_rewriter_options_recompress_when_set(swigCPtr, value); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + int ret = mupdfPINVOKE.pdf_image_rewriter_options_recompress_when_get(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public pdf_image_rewriter_options() : this(mupdfPINVOKE.new_pdf_image_rewriter_options(), true) { if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); } @@ -32513,6 +32525,113 @@ public static int s_num_instances { } namespace mupdf { +public class FzFlotilla : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal FzFlotilla(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FzFlotilla obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal static global::System.Runtime.InteropServices.HandleRef swigRelease(FzFlotilla obj) { + if (obj != null) { + if (!obj.swigCMemOwn) + throw new global::System.ApplicationException("Cannot release ownership as memory is not owned"); + global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.Dispose(); + return ptr; + } else { + return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + + ~FzFlotilla() { + Dispose(false); + } + + public void Dispose() { + Dispose(true); + global::System.GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + mupdfPINVOKE.delete_FzFlotilla(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + } + } + + public FzFlotilla(FzStextPage page) : this(mupdfPINVOKE.new_FzFlotilla__SWIG_0(FzStextPage.getCPtr(page)), true) { + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + + public FzFlotilla() : this(mupdfPINVOKE.new_FzFlotilla__SWIG_1(), true) { + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + + public FzRect fz_flotilla_raft_area(int i) { + FzRect ret = new FzRect(mupdfPINVOKE.FzFlotilla_fz_flotilla_raft_area(swigCPtr, i), true); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int fz_flotilla_size() { + int ret = mupdfPINVOKE.FzFlotilla_fz_flotilla_size(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public FzFlotilla(SWIGTYPE_p_fz_flotilla internal_) : this(mupdfPINVOKE.new_FzFlotilla__SWIG_2(SWIGTYPE_p_fz_flotilla.getCPtr(internal_)), true) { + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + + public long m_internal_value() { + long ret = mupdfPINVOKE.FzFlotilla_m_internal_value(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public SWIGTYPE_p_fz_flotilla m_internal { + set { + mupdfPINVOKE.FzFlotilla_m_internal_set(swigCPtr, SWIGTYPE_p_fz_flotilla.getCPtr(value)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + global::System.IntPtr cPtr = mupdfPINVOKE.FzFlotilla_m_internal_get(swigCPtr); + SWIGTYPE_p_fz_flotilla ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_fz_flotilla(cPtr, false); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public static int s_num_instances { + set { + mupdfPINVOKE.FzFlotilla_s_num_instances_set(value); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + int ret = mupdfPINVOKE.FzFlotilla_s_num_instances_get(); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + +} + +} +namespace mupdf { + public class FzFont : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -53192,6 +53311,18 @@ public string bitonal_image_recompress_quality { } } + public int recompress_when { + set { + mupdfPINVOKE.PdfImageRewriterOptions_recompress_when_set(swigCPtr, value); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + get { + int ret = mupdfPINVOKE.PdfImageRewriterOptions_recompress_when_get(swigCPtr); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static int s_num_instances { set { mupdfPINVOKE.PdfImageRewriterOptions_s_num_instances_set(value); @@ -76766,6 +76897,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_ACCURATE_SIDE_BEARINGS_get")] public static extern int FZ_STEXT_ACCURATE_SIDE_BEARINGS_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_LAZY_VECTORS_get")] + public static extern int FZ_STEXT_LAZY_VECTORS_get(); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_FUZZY_VECTORS_get")] + public static extern int FZ_STEXT_FUZZY_VECTORS_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_STEXT_MEDIABOX_CLIP_get")] public static extern int FZ_STEXT_MEDIABOX_CLIP_get(); @@ -83998,6 +84135,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_RECOMPRESS_FAX_get")] public static extern int FZ_RECOMPRESS_FAX_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_RECOMPRESS_WHEN_SMALLER_get")] + public static extern int FZ_RECOMPRESS_WHEN_SMALLER_get(); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FZ_RECOMPRESS_WHEN_ALWAYS_get")] + public static extern int FZ_RECOMPRESS_WHEN_ALWAYS_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_color_lossless_image_subsample_method_set")] public static extern void pdf_image_rewriter_options_color_lossless_image_subsample_method_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); @@ -84148,6 +84291,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_bitonal_image_recompress_quality_get")] public static extern string pdf_image_rewriter_options_bitonal_image_recompress_quality_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_recompress_when_set")] + public static extern void pdf_image_rewriter_options_recompress_when_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_pdf_image_rewriter_options_recompress_when_get")] + public static extern int pdf_image_rewriter_options_recompress_when_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_pdf_image_rewriter_options")] public static extern global::System.IntPtr new_pdf_image_rewriter_options(); @@ -85009,6 +85158,9 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_drop_drawn_tiles_for_document")] public static extern void ll_fz_drop_drawn_tiles_for_document(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_drop_flotilla")] + public static extern void ll_fz_drop_flotilla(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_drop_font")] public static extern void ll_fz_drop_font(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -85255,6 +85407,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_find_table_within_bounds")] public static extern global::System.IntPtr ll_fz_find_table_within_bounds(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_flotilla_raft_area")] + public static extern global::System.IntPtr ll_fz_flotilla_raft_area(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_flotilla_size")] + public static extern int ll_fz_flotilla_size(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_flush_output")] public static extern void ll_fz_flush_output(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -86393,6 +86551,9 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_new_draw_device_with_proof")] public static extern global::System.IntPtr ll_fz_new_draw_device_with_proof(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_new_flotilla_from_stext_page_vectors")] + public static extern global::System.IntPtr ll_fz_new_flotilla_from_stext_page_vectors(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_ll_fz_new_font_from_buffer")] public static extern global::System.IntPtr ll_fz_new_font_from_buffer([global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPUTF8Str)]string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4); @@ -93503,6 +93664,39 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzErrorStackSlot_s_num_instances_get")] public static extern int FzErrorStackSlot_s_num_instances_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFlotilla__SWIG_0")] + public static extern global::System.IntPtr new_FzFlotilla__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFlotilla__SWIG_1")] + public static extern global::System.IntPtr new_FzFlotilla__SWIG_1(); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_fz_flotilla_raft_area")] + public static extern global::System.IntPtr FzFlotilla_fz_flotilla_raft_area(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_fz_flotilla_size")] + public static extern int FzFlotilla_fz_flotilla_size(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFlotilla__SWIG_2")] + public static extern global::System.IntPtr new_FzFlotilla__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_delete_FzFlotilla")] + public static extern void delete_FzFlotilla(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_m_internal_value")] + public static extern long FzFlotilla_m_internal_value(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_m_internal_set")] + public static extern void FzFlotilla_m_internal_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_m_internal_get")] + public static extern global::System.IntPtr FzFlotilla_m_internal_get(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_s_num_instances_set")] + public static extern void FzFlotilla_s_num_instances_set(int jarg1); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_FzFlotilla_s_num_instances_get")] + public static extern int FzFlotilla_s_num_instances_get(); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_new_FzFont__SWIG_0")] public static extern global::System.IntPtr new_FzFont__SWIG_0([global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPUTF8Str)]string jarg1); @@ -101297,6 +101491,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_bitonal_image_recompress_quality_get")] public static extern string PdfImageRewriterOptions_bitonal_image_recompress_quality_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_recompress_when_set")] + public static extern void PdfImageRewriterOptions_recompress_when_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_recompress_when_get")] + public static extern int PdfImageRewriterOptions_recompress_when_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_PdfImageRewriterOptions_s_num_instances_set")] public static extern void PdfImageRewriterOptions_s_num_instances_set(int jarg1); @@ -105562,6 +105762,12 @@ static mupdfPINVOKE() { [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_find_table_within_bounds")] public static extern global::System.IntPtr fz_find_table_within_bounds(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_flotilla_raft_area")] + public static extern global::System.IntPtr fz_flotilla_raft_area(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_flotilla_size")] + public static extern int fz_flotilla_size(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("mupdfcsharp.dll", EntryPoint="CSharp_mupdf_fz_flush_output")] public static extern void fz_flush_output(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -116170,6 +116376,11 @@ public static void ll_fz_drop_drawn_tiles_for_document(fz_document doc) { if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); } + public static void ll_fz_drop_flotilla(SWIGTYPE_p_fz_flotilla f) { + mupdfPINVOKE.ll_fz_drop_flotilla(SWIGTYPE_p_fz_flotilla.getCPtr(f)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + } + public static void ll_fz_drop_font(fz_font font) { mupdfPINVOKE.ll_fz_drop_font(fz_font.getCPtr(font)); if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); @@ -116606,6 +116817,18 @@ public static fz_stext_block ll_fz_find_table_within_bounds(fz_stext_page page, return ret; } + public static fz_rect ll_fz_flotilla_raft_area(SWIGTYPE_p_fz_flotilla flot, int i) { + fz_rect ret = new fz_rect(mupdfPINVOKE.ll_fz_flotilla_raft_area(SWIGTYPE_p_fz_flotilla.getCPtr(flot), i), true); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static int ll_fz_flotilla_size(SWIGTYPE_p_fz_flotilla flot) { + int ret = mupdfPINVOKE.ll_fz_flotilla_size(SWIGTYPE_p_fz_flotilla.getCPtr(flot)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static void ll_fz_flush_output(fz_output out_) { mupdfPINVOKE.ll_fz_flush_output(fz_output.getCPtr(out_)); if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); @@ -118971,6 +119194,13 @@ public static fz_device ll_fz_new_draw_device_with_proof(fz_matrix transform, fz return ret; } + public static SWIGTYPE_p_fz_flotilla ll_fz_new_flotilla_from_stext_page_vectors(fz_stext_page page) { + global::System.IntPtr cPtr = mupdfPINVOKE.ll_fz_new_flotilla_from_stext_page_vectors(fz_stext_page.getCPtr(page)); + SWIGTYPE_p_fz_flotilla ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_fz_flotilla(cPtr, false); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static fz_font ll_fz_new_font_from_buffer(string name, fz_buffer buffer, int index, int use_glyph_bbox) { global::System.IntPtr cPtr = mupdfPINVOKE.ll_fz_new_font_from_buffer(name, fz_buffer.getCPtr(buffer), index, use_glyph_bbox); fz_font ret = (cPtr == global::System.IntPtr.Zero) ? null : new fz_font(cPtr, false); @@ -129866,6 +130096,18 @@ public static FzStextBlock fz_find_table_within_bounds(FzStextPage page, FzRect return ret; } + public static FzRect fz_flotilla_raft_area(FzFlotilla flot, int i) { + FzRect ret = new FzRect(mupdfPINVOKE.fz_flotilla_raft_area(FzFlotilla.getCPtr(flot), i), true); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static int fz_flotilla_size(FzFlotilla flot) { + int ret = mupdfPINVOKE.fz_flotilla_size(FzFlotilla.getCPtr(flot)); + if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static void fz_flush_output(FzOutput out_) { mupdfPINVOKE.fz_flush_output(FzOutput.getCPtr(out_)); if (mupdfPINVOKE.SWIGPendingException.Pending) throw mupdfPINVOKE.SWIGPendingException.Retrieve(); @@ -140419,6 +140661,8 @@ public static pdf_zugferd_profile ll_pdf_zugferd_profile_outparams_fn(pdf_docume public static readonly int FZ_STEXT_CLIP_RECT = mupdfPINVOKE.FZ_STEXT_CLIP_RECT_get(); public static readonly int FZ_STEXT_ACCURATE_ASCENDERS = mupdfPINVOKE.FZ_STEXT_ACCURATE_ASCENDERS_get(); public static readonly int FZ_STEXT_ACCURATE_SIDE_BEARINGS = mupdfPINVOKE.FZ_STEXT_ACCURATE_SIDE_BEARINGS_get(); + public static readonly int FZ_STEXT_LAZY_VECTORS = mupdfPINVOKE.FZ_STEXT_LAZY_VECTORS_get(); + public static readonly int FZ_STEXT_FUZZY_VECTORS = mupdfPINVOKE.FZ_STEXT_FUZZY_VECTORS_get(); public static readonly int FZ_STEXT_MEDIABOX_CLIP = mupdfPINVOKE.FZ_STEXT_MEDIABOX_CLIP_get(); public static readonly int FZ_STEXT_BLOCK_TEXT = mupdfPINVOKE.FZ_STEXT_BLOCK_TEXT_get(); @@ -141259,6 +141503,9 @@ public static pdf_zugferd_profile ll_pdf_zugferd_profile_outparams_fn(pdf_docume public static readonly int FZ_RECOMPRESS_J2K = mupdfPINVOKE.FZ_RECOMPRESS_J2K_get(); public static readonly int FZ_RECOMPRESS_FAX = mupdfPINVOKE.FZ_RECOMPRESS_FAX_get(); + public static readonly int FZ_RECOMPRESS_WHEN_SMALLER = mupdfPINVOKE.FZ_RECOMPRESS_WHEN_SMALLER_get(); + public static readonly int FZ_RECOMPRESS_WHEN_ALWAYS = mupdfPINVOKE.FZ_RECOMPRESS_WHEN_ALWAYS_get(); + public static readonly int UCDN_EAST_ASIAN_F = mupdfPINVOKE.UCDN_EAST_ASIAN_F_get(); public static readonly int UCDN_EAST_ASIAN_H = mupdfPINVOKE.UCDN_EAST_ASIAN_H_get(); public static readonly int UCDN_EAST_ASIAN_W = mupdfPINVOKE.UCDN_EAST_ASIAN_W_get(); @@ -145439,6 +145686,29 @@ protected SWIGTYPE_p_f_p_fz_context_p_pdf_processor_float__void() { } namespace mupdf { +public class SWIGTYPE_p_fz_flotilla { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal SWIGTYPE_p_fz_flotilla(global::System.IntPtr cPtr, bool futureUse) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + protected SWIGTYPE_p_fz_flotilla() { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_fz_flotilla obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal static global::System.Runtime.InteropServices.HandleRef swigRelease(SWIGTYPE_p_fz_flotilla obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } +} + +} +namespace mupdf { + public class SWIGTYPE_p_f_p_fz_context_p_fz_document_p_fz_output__void { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/MuPDF.NET/structures/Outline.cs b/MuPDF.NET/structures/Outline.cs index ffef933..2a71ec5 100644 --- a/MuPDF.NET/structures/Outline.cs +++ b/MuPDF.NET/structures/Outline.cs @@ -1,9 +1,10 @@ -using mupdf; +using mupdf; +using System; using static System.Net.Mime.MediaTypeNames; namespace MuPDF.NET { - public class Outline + public class Outline : IDisposable { static Outline() {