|
3 | 3 | using System.Runtime.InteropServices; |
4 | 4 | using System.Text; |
5 | 5 | using mupdf; |
| 6 | +using Newtonsoft.Json.Linq; |
6 | 7 |
|
7 | 8 | namespace MuPDF.NET |
8 | 9 | { |
@@ -720,17 +721,21 @@ public void InitDocument() |
720 | 721 | Dictionary<string, string> values = new Dictionary<string, string>() |
721 | 722 | { |
722 | 723 | { "format", "format" }, |
723 | | - { "title", "info:Title" }, |
724 | | - { "author", "info:Author" }, |
725 | | - { "subject", "info:Subject" }, |
726 | | - { "keywords", "info:Keywords" }, |
727 | | - { "creator", "info:Creator" }, |
728 | | - { "producer", "info:Producer" }, |
729 | | - { "creationDate", "info:CreationDate" }, |
730 | | - { "modDate", "info:ModDate" }, |
731 | | - { "trapped", "info:Trapped" } |
732 | 724 | }; |
733 | 725 |
|
| 726 | + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) |
| 727 | + { |
| 728 | + values.Add("title", "info:Title"); |
| 729 | + values.Add("author", "info:Author"); |
| 730 | + values.Add("subject", "info:Subject"); |
| 731 | + values.Add("keywords", "info:Keywords"); |
| 732 | + values.Add("creator", "info:Creator"); |
| 733 | + values.Add("producer", "info:Producer"); |
| 734 | + values.Add("creationDate", "info:CreationDate"); |
| 735 | + values.Add("modDate", "info:ModDate"); |
| 736 | + values.Add("trapped", "info:Trapped"); |
| 737 | + } |
| 738 | + |
734 | 739 | foreach ((string key, string value) in values) |
735 | 740 | { |
736 | 741 | MetaData.Add(key, GetMetadata(value)); |
@@ -4029,7 +4034,8 @@ public void Select(List<int> list) |
4029 | 4034 | Marshal.Copy(list.ToArray(), 0, pNumbers, list.Count); |
4030 | 4035 | SWIGTYPE_p_int swigNumbers = new SWIGTYPE_p_int(pNumbers, true); |
4031 | 4036 |
|
4032 | | - pdf.pdf_rearrange_pages(list.Count, swigNumbers); |
| 4037 | + pdf.pdf_rearrange_pages(list.Count, swigNumbers, pdf_clean_options_structure.PDF_CLEAN_STRUCTURE_DROP); |
| 4038 | + |
4033 | 4039 | ResetPageRefs(); |
4034 | 4040 | } |
4035 | 4041 |
|
|
0 commit comments