Closed AlbrightPatents closed 4 years ago
Firstly, really useful piece of software so many thanks!
I am having an issue with markup not appearing in the converted PDF and have some suggested changes:
git diff of changes below:
git diff
--- a/OfficeToPDF/WordConverter.cs +++ b/OfficeToPDF/WordConverter.cs @@ -90,7 +90,7 @@ namespace OfficeToPDF try { // Try to set a property on the object - word.ScreenUpdating = false; + word.Visible = false; } catch (COMException) { @@ -286,16 +286,18 @@ namespace OfficeToPDF } catch (Exception) { } - // Hide comments + // Show revisons if required try { + bool withMarkup = showMarkup == WdExportItem.wdExportDocumentWithMarkup; word.PrintPreview = false; + docWinView.MarkupMode = WdRevisionsMode.wdInLineRevisions; docWinView.RevisionsView = WdRevisionsView.wdRevisionsViewFinal; - docWinView.ShowRevisionsAndComments = false; - docWinView.ShowComments = false; - docWinView.ShowFormatChanges = false; - docWinView.ShowInkAnnotations = false; - docWinView.ShowInsertionsAndDeletions = false; + docWinView.ShowRevisionsAndComments = withMarkup; + docWinView.ShowComments = withMarkup; + docWinView.ShowFormatChanges = withMarkup; + docWinView.ShowInkAnnotations = withMarkup; + docWinView.ShowInsertionsAndDeletions = withMarkup; } catch (SystemException e) { Console.WriteLine("Failed to set revision settings {0}", e.Message);
Now using your latest code and it seems to be working fine with the new options. Many thanks for making these changes.
Firstly, really useful piece of software so many thanks!
I am having an issue with markup not appearing in the converted PDF and have some suggested changes:
git diff
of changes below: