Skip to content

Commit

Permalink
[#52] Adds a /word_show_hidden switch
Browse files Browse the repository at this point in the history
  • Loading branch information
vittala committed Feb 26, 2020
1 parent bc42d0d commit 33dc66b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion OfficeToPDF/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ static void Main(string[] args)
options["word_show_comments"] = false;
options["word_show_revs_comments"] = false;
options["word_show_format_changes"] = false;
options["word_show_hidden"] = false;
options["word_show_ink_annot"] = false;
options["word_show_ins_del"] = false;
options["word_markup_balloon"] = false;
Expand Down Expand Up @@ -161,7 +162,7 @@ static void Main(string[] args)
{ "excel_delay", "Excel delay milliseconds" }
};

Regex switches = new Regex(@"^/(version|hidden|markup|readonly|bookmarks|merge|noquit|print|(fallback_)?printer|screen|pdfa|template|writepassword|password|help|verbose|exclude(props|tags)|excel_(delay|max_rows|show_formulas|show_headings|auto_macros|template_macros|active_sheet|worksheet|no_recalculate|no_link_update)|powerpoint_(output)|word_(header_dist|footer_dist|ref_fonts|no_field_update|field_quick_update(_safe)?|max_pages|keep_history|no_repair|fix_table_columns|show_(comments|revs_comments|format_changes|ink_annot|ins_del|all_markup)|markup_balloon)|pdf_(page_mode|append|prepend|layout|clean_meta|owner_pass|user_pass|restrict_(annotation|extraction|assembly|forms|modify|print|accessibility_extraction|full_quality))|working_dir|\?)$", RegexOptions.IgnoreCase);
Regex switches = new Regex(@"^/(version|hidden|markup|readonly|bookmarks|merge|noquit|print|(fallback_)?printer|screen|pdfa|template|writepassword|password|help|verbose|exclude(props|tags)|excel_(delay|max_rows|show_formulas|show_headings|auto_macros|template_macros|active_sheet|worksheet|no_recalculate|no_link_update)|powerpoint_(output)|word_(show_hidden|header_dist|footer_dist|ref_fonts|no_field_update|field_quick_update(_safe)?|max_pages|keep_history|no_repair|fix_table_columns|show_(comments|revs_comments|format_changes|ink_annot|ins_del|all_markup)|markup_balloon)|pdf_(page_mode|append|prepend|layout|clean_meta|owner_pass|user_pass|restrict_(annotation|extraction|assembly|forms|modify|print|accessibility_extraction|full_quality))|working_dir|\?)$", RegexOptions.IgnoreCase);
for (int argIdx = 0; argIdx < args.Length; argIdx++)
{
string item = args[argIdx];
Expand Down Expand Up @@ -1097,6 +1098,7 @@ this number of pages.
/word_show_comments - Show comments when /markup is used.
/word_show_revs_comments - Show revisions and comments when /markup is used.
/word_show_format_changes - Show format changes when /markup is used.
/word_show_hidden - Show hidden text.
/word_show_ink_annot - Show ink annotations when /markup is used.
/word_show_ins_del - Show all markup when /markup is used.
/word_show_all_markup - Show all markup content when /markup is used.
Expand Down
8 changes: 4 additions & 4 deletions OfficeToPDF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OfficeToPDF")]
[assembly: AssemblyDescription("Converts MSOffice 2003/2007/2010/2013/2016 documents to PDF")]
[assembly: AssemblyDescription("Converts MSOffice 2003/2007/2010/2013/2016/2019 documents to PDF")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Cognidox Ltd")]
[assembly: AssemblyProduct("OfficeToPDF")]
[assembly: AssemblyCopyright("Copyright © Cognidox Ltd 2019")]
[assembly: AssemblyCopyright("Copyright © Cognidox Ltd 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.9.0.1")]
[assembly: AssemblyFileVersion("1.9.0.1")]
[assembly: AssemblyVersion("1.9.0.2")]
[assembly: AssemblyFileVersion("1.9.0.2")]
3 changes: 2 additions & 1 deletion OfficeToPDF/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=============

This is the Cognidox Ltd Office To PDF tool. It can be used to convert
Microsoft Office 2003, 2007, 2010, 2013 or 2016 documents to PDF from the
Microsoft Office 2003, 2007, 2010, 2013, 2016 or 2019 documents to PDF from the
command line.

In order to run the tool, .net 4 and one of MS Office 2007, 2010, 2013,
Expand Down Expand Up @@ -96,6 +96,7 @@ The following optional switches can be used:
/word_show_comments - show comments when /markup is used
/word_show_revs_comments - show revisions and comments when /markup is used
/word_show_format_changes - show format changes when /markup is used
/word_show_hidden - show hidden text
/word_show_ink_annot - show ink annotations when /markup is used
/word_show_ins_del - show all markup when /markup is used
/word_show_all_markup - show all markup content when /markup is used
Expand Down
1 change: 1 addition & 0 deletions OfficeToPDF/WordConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class WordConverter: Converter
wordOptionList.Add(new AppOption("BackgroundOpen", false, ref wdOptions));
wordOptionList.Add(new AppOption("ShowMarkupOpenSave", false, ref wdOptions));
wordOptionList.Add(new AppOption("SaveInterval", 0, ref wdOptions));
wordOptionList.Add(new AppOption("PrintHiddenText", (Boolean)options["word_show_hidden"], ref wdOptions));
}
catch (SystemException)
{
Expand Down

0 comments on commit 33dc66b

Please sign in to comment.