Skip to content

Commit

Permalink
fix: refactored the string printing: it got pretty convoluted before …
Browse files Browse the repository at this point in the history
…but has now been separated into three different routines, one for each `flags` mode.

`mutool multipurp` now has `-m 0,1,2` mode arg, which can pick the print mode. `-m1` works best for C# receivers as their JSON deserializer does not like arbitrary changes in format (`-m 2`: HEX+MASSAGED struct instead of STRING when things go bad) -- the C# receiver also doesn't like hex bytes in its JSON string inputs. All of this is resolved by modes 0 and 1, which replace offending codepoints/characters with their hexadecimal value.

Added PDF tests to check proper handling and stability of the tools. (Several tests fail, but that's due to us feeding all sorts of rotten PDFs into the toolset, mostly. Plus possibly a few lingering bugs. *To be investigated.*

`mutool multipurp` now also lists *attached files* inside a PDF: this feature has been added after careful analysis of a couple of live PDFs which have this feature (visible in Foxit Reader, where one could click on the embedded PDFs, contained inside the container PDF)
  • Loading branch information
GerHobbelt committed Feb 18, 2021
1 parent 925af12 commit 86e1282
Show file tree
Hide file tree
Showing 5 changed files with 1,264 additions and 784 deletions.