Giter Site home page Giter Site logo

word-save-as-daisy's Introduction

"Save as DAISY" Add-In for Microsoft Word

The "Save as DAISY" Add-In for Microsoft Word is a collaborative standards-based development project initiated in 2007 by the DAISY Consortium and Microsoft. It was initially developed by Sonata Software (versions 1.x), then further developed by Intergen (up to version 2.5.5.1).

The code available in this GitHub project has been initially copied from its original location on SourceForge as the openxml-daisy project.

Building requirement

The project is being updated to build with visual studio 2019, using the dotnet4 plugin and the wix toolser in its version 3.11.

Architecture

word-save-as-daisy's People

Contributors

npavie avatar rdeltour avatar bertfrees avatar

Stargazers

 avatar  avatar  avatar Jennifer Wagner avatar  avatar Richard Orme avatar  avatar Pantelis Koukousoulas avatar

Watchers

 avatar Jon Pielaet avatar James Cloos avatar  avatar  avatar  avatar Avneesh Singh avatar  avatar

word-save-as-daisy's Issues

Embedded pipeline 1 - 32 bits voices

The current SAPI connector of the embedded pipeline does not seems to find or use voices that are installed in the 32 bits registry of windows.

Windows 11 support

A user reported an error when trying to translate a document on Windows 11 :

  • “Check that DaisyAddinLib.resources is imbedded or linked”

The problem might be related to basic windows 11 support, we might a need to do a quick check on project configuration to fix that regarding resources.

Unknown error raised for hyperlinks in footnotes

A user reported an unknown error on a document.

After debug analysis, the problem came from an hyperlink within a footnote:
The Anchor function of the DaisyClass seems to only search for anchor targets within the document.xml relathionships and not the footnotes one.

Switch to DAISY pipeline 2 for conversions

Context

The actual conversion of the word document to any format (dtbook xml or daisy 2.02) within the addin is currently done using the following chain of treatment :

  • A first pass of data pre computation is done using Word object model to retrieve complex data like math equations and vectorial shapes
  • The word document xml is then converted to dtbook using a set of xslt 1 stylesheets (and a csharp helper class) with the .net internal xsl engine
  • The dtbook xml is then cleaned up and optionnaly converted to DAISY 2.02 using the daisy pipeline 1.

Problematic

The current chain has 2 main issues :

  • the pipeline 1 used in the addin has reached end of support, with possibly only one last update planned in the ongoing year
    • All development efforts are mainly dedicated to the DAISY Pipeline 2, including the addition and support of new export format like EPUB 3
  • The conversion with xslt 1 stylesheets limit the reusability of the code for other project, especially for the DAISY Pipeline 2 that uses the Saxon engine

Objectives

  • #27
  • #28
  • Fix SAPI / OneCore TTS within DAISY pipeline 2
  • #29

SAPI And OneCore voices issue

Users reported issues when trying to use specific voices when converting to DAISY with the embedded pipeline:

  • The pipeline does not seems to use 32 bits SAPI voices for a specified language when they are only available in 32bits on the user machine

  • If a document does not have a language setting defined, the pipeline does not seems to recognise the system default voice if the voice is a MS "OneCore" voice.
    Instead, it uses a low quality SAPI voices matching the system language if there is one installed.

The user that found this last issue reported that the pipeline was correctly using English UK or US OneCore voices when changing the document language setting.

Error while converting with DAISY Pipeline 2

An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.1.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22631
  • User or system wide install: user

Error while converting with DAISY Pipeline 2

  • システム コールに渡されるデータ領域が小さすぎます。 (HRESULT からの例外:0x8007007A)

Stacktrace:

   場所 Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   場所 Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   場所 System.StubHelpers.MngdNativeArrayMarshaler.ConvertContentsToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome)
   場所 org.daisy.jnet.JNIEnv.NewObject(IntPtr clazz, IntPtr methodID, JValue[] args)
   場所 org.daisy.jnet.JavaNativeInterface.NewObject(IntPtr javaClass, String signature, Object[] args)
   場所 org.daisy.jnet.JavaNativeInterface.NewJavaWrapperObject(Object obj)
   場所 org.daisy.jnet.JavaNativeInterface.NewHashMapFrom(IDictionary map)
   場所 org.daisy.jnet.JavaNativeInterface.NewJavaWrapperObject(Object obj)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2.Start(String scriptName, Dictionary`2 options)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2Script.ExecuteScript(String inputPath, Boolean isQuite)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline.Pipeline2.Scripts.DtbookCleaner.ExecuteScript(String inputPath, Boolean isQuite)
   場所 Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)

Replace all occurences of "Daisy translator"

"Daisy" should be in capitals, and it might be better to just use the term "SaveAsDAISY" everywhere instead of mixing the two.

  • In window title of export form
  • In Windows' add/remove software
  • In the name of the instruction manual
  • In the installer
  • In the documentation.
  • ...

Also the name of the installer ("DaisyInstaller") could be improved.

Since we need to come up with a new more general name for an add-in that can produce EPUB too, it might be better to do this change after we have the new name.

Languages issue

Issue extracted from Pipeline_App_Issues_Tracker.xlsx

Dipendra : Word to DTBook xml to DAISY 3 with TTS audio is our prefered work flow. Most time wrong language tags are  added in DTBook xml. Thus almost all books do not get created in right language and voice. Users have to manually open DTBook xml to correct language tags for any book to get recorded. Let Pipeline app over-ride language tag of DTBook xml until the Save As DAISY issue on this is resolved.

Lukerya : In many sentences Armenian text was ignored and not recorded. Only numbers were recorded in English voice. In other places Armenian voice was used.
This is happening because of wrong language  tags in the DTBook XML due to an issue in Save As DAISY. Separate issue is being created for this. If language tags are correct, then recording is fine.

@prashantverma2014 if you can gather additionnal informations regarding addin version used by testers and example documents with expected results, i will look at them asap.

Embedded pipeline 1 - OneCore voices support

The "OneCore" voices of windows are currently not found or used by the current pipeline SAPI connector.

Those voices are declared in a separate registry within windows and used by a specific version of the SAPI library provided by microsoft.
By default, those voices can be invisible through the old SAPI settings panel while displayed by the new "Narrator" settings panel.

About Note conversion

I've tryed the AddFootnote button from Accessibility Tab of word ribbon but i can't make it work. So i use the native word function. Attached is a docx + xml i used for testing.

I'm note sure about the best way to manage notes, but here are some feedback:

At XML conversion Notes gets a textual number added

  • It's a problem if we edit the XML file after conversion and need to add / suppress notes.
  • This numbering starts at 0 (it should start at 1)

A way could be to provide option for note conversion. something like : numbering or Add a generic character (*) or place link on the related word.

Endnotes are not translated

I get a link but loose the content

Test document for notes.zip

Paragraph closed without closing style when creating pagenums

The following exception was reported by the saveAsDaisy addin while converting a document to dtbook xml

Report

An error occured while converting a document to dtbook XML :
La balise de début 'bdo' sur la ligne 2 à la position 287392 ne correspond pas à la balise de fin de 'pagenum'. Ligne 2, position 287427.

à Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing) dans F:\Nextcloud\Devs\word-save-as-daisy\Common\DaisyConverterLib\Converter.cs:ligne 337
à Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings) dans F:\Nextcloud\Devs\word-save-as-daisy\Word2007\DaisyWord2007AddIn\Connect.cs:ligne 755 - Inner exception : La balise de début 'bdo' sur la ligne 2 à la position 287392 ne correspond pas à la balise de fin de 'pagenum'. Ligne 2, position 287427.

à Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing) dans F:\Nextcloud\Devs\word-save-as-daisy\Common\DaisyConverterLib\Converter.cs:ligne 337
à Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings) dans F:\Nextcloud\Devs\word-save-as-daisy\Word2007\DaisyWord2007AddIn\Connect.cs:ligne 755

Details

Addin version - 2.8.0.0

Ribbon UI and functionnalities review

With latest updates and the new development plan, we might need to rework the ribbon to better reflect what should be done by the add in, and what should be done using native MS Word functionalities.

The following issues provide a preliminary list of changes required:

  • #16 : we should remove the footnote button from the ribbon and check if the manual redirect user to Word footnotes and end notes documentation
  • #4 : We need to rename the ribbon, possibly after finding a new name for the addin
  • #5 : Updates the screen shot with the updated ribbon UI

A review of the current ribbon functionalities is required, checking if they still work as expected and if there is a matching native word functionality.

Text decoration splitted

Text decoration like emphasis and strong applied on a phrase is splitted in many blocks of text with decoration.
If possible, those decoration applied on a phrase should translate into a single decoration block in the XML.

Exception raised by the Daisy.SaveAsDAISY.Conversion.ConversionParameters.usingMainDocument

The following exception report was sent by a user

Object reference not set to an instance of an object.

at Daisy.SaveAsDAISY.Conversion.ConversionParameters.usingMainDocument(DocumentParameters mainDocument)
at Daisy.SaveAsDAISY.Conversion.ConversionParametersForm..ctor(DocumentParameters document, ConversionParameters conversion, ResourceManager labelsManager)
at Daisy.SaveAsDAISY.Forms.GraphicalConverter.requestUserParameters(DocumentParameters currentDocument)
at Daisy.SaveAsDAISY.Addins.Word2007.Connect.SaveAsDaisy(IRibbonControl control, ConversionParameters conversionIntegrationTestSettings)

Investigation is ongoing, as I was not able yet to reproduce the issue.

<em> tags makes spaces disapear

The following text in word : "BRÉVIAIRE DES ARTIFICIERS" has Italic set up (all characters including the spaces).

After conversion i get :

<em>BRÉVIAIRE</em><em /><em>DES</em><em /><em>ARTIFICIERS</em>

The spaces have disappeared.

Error while converting with DAISY Pipeline 2

An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.5.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22631
  • User or system wide install: user
  • Addin settings:
<Settings><PageNumbers  value="Custom" /><CharacterStyles value="False" /><ImageSizes value="resize" samplingvalue="96" /><Footnotes level="0" position="inline" numbering="none" startValue="1" numberPrefix="" numberSuffix="" /><TTSConfig file="" /></Settings>

Error while converting with DAISY Pipeline 2

  • システム コールに渡されるデータ領域が小さすぎます。 (HRESULT からの例外:0x8007007A)

Stacktrace:

   場所 Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   場所 Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   場所 System.StubHelpers.MngdNativeArrayMarshaler.ConvertContentsToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome)
   場所 org.daisy.jnet.JNIEnv.NewObject(IntPtr clazz, IntPtr methodID, JValue[] args)
   場所 org.daisy.jnet.JavaNativeInterface.NewObject(IntPtr javaClass, String signature, Object[] args)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2.makePrintStream(String filepath)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2..ctor()
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2.get_Instance()
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2Script.ExecuteScript(String inputPath, Boolean isQuite)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline.Pipeline2.Scripts.DtbookCleaner.ExecuteScript(String inputPath, Boolean isQuite)
   場所 Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)

Footnotes positionning customization

Footnotes are currently inserted within the resulting dtbook when a pagebreak is encountered in word.
AVH is requesting the possibility to choose where the note are inserted after the reference is encountered.
Mainly to allow to position the notes at the end of a specific level.
Another option would be to also inline each note after the reference is encountered.

File not found error on special characters found

A user reported a File not found exception raised in the conversion process in the pipeline lite.
After case study, the error was due to commas being present in the word file name.

In the waiting of a correction in the pipeline side, a file name validation and possibly a renaming form could be presented to users, to allow them to correct the file name and avoid the error.

Error in converting links in footnotes

An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.1.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22621
  • User or system wide install: user

Conversion of single docx to dtbook XML: task crashed

  • Une ou plusieurs erreurs se sont produites.
  • Invalid XML error reported: '=' est un jeton inattendu. Le jeton attendu est ';'. Ligne 2, position 430634.
    before:
7B45h_lAEk</a> (vidéo-clip du rappeur Médine « Don’t laїk ».</p></note><note id="footnote-285" class="Footnote"><p> <a href="http://videos.tf1.fr/infos/2015/critique-pour-son-morceau-don-t-laik-le-rappeur-medine-livre-sa-8558814.html?xtmc=médine&xtcr

token: =
after:

=1">http://videos.tf1.fr/infos/2015/critique-pour-son-morceau-don-t-laik-le-rappeur-medine-livre-sa-8558814.html?xtmc=m%C3%A9dine&amp;xtcr=1</a>.</p></note><note id="footnote-286" class="Footnote"><p> Entretien n° 24.</p></note><note id="footnote-287
  • '=' est un jeton inattendu. Le jeton attendu est ';'. Ligne 2, position 430634.

Stacktrace:

   à Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing) dans F:\Nextcloud\Devs\word-save-as-daisy\Common\DaisyConverterLib\Converter.cs:ligne 342
   à Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   à System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   à System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   à System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
   à Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing) dans F:\Nextcloud\Devs\word-save-as-daisy\Common\DaisyConverterLib\Converter.cs:ligne 322
   à Daisy.SaveAsDAISY.Conversion.Converter.<>c__DisplayClass37_0.<Convert>b__0() dans F:\Nextcloud\Devs\word-save-as-daisy\Common\DaisyConverterLib\Converter.cs:ligne 319
   à System.Threading.Tasks.Task`1.InnerInvoke()
   à System.Threading.Tasks.Task.Execute()
   à System.Xml.XmlTextReaderImpl.Throw(Exception e)
   à System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
   à System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
   à System.Xml.XmlTextReaderImpl.ParseAttributes()
   à System.Xml.XmlTextReaderImpl.ParseElement()
   à System.Xml.XmlTextReaderImpl.ParseElementContent()
   à System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   à System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   à System.Xml.XmlDocument.Load(XmlReader reader)
   à System.Xml.XmlDocument.Load(String filename)
   à Daisy.SaveAsDAISY.Conversion.WordToDTBookXMLTransform.MergeDocumentInTarget(DocumentParameters documentToMerge, XmlDocument mergeTarget) dans F:\Nextcloud\Devs\word-save-as-daisy\Common\DaisyConverterLib\WordToDTBookXMLTransform.cs:ligne 952

pagenums create paragraphs breaks

When Page numbers are set to Automatic in addin settings, page breaks that are within a paragraph are breaking the paragraph in 3:

  • One paragraph with content before the pagebreak
  • One paragraph with only the pagenum
  • One paragraph with the content after the pagebreak

The pagebreak within the paragraph should not break the paragraph to insert the pagenum, but should insert the pagenum within the content.

Hyperlinks validation before conversion

An invalid URI exception was raised when preprocessing a document in the SubdocumentManager.FindSubdocuments method by this method call :
mainPartxml.GetRelationships()

I discovered that the mainPartxml.GetRelationships() can throw an uri exception if an invalid relationship URI is found in the document.xml file of a docx, making the rest of the packge analysis and file resolution crash.
More specifically, this can happens with malformed hyperlink targets.

This causes many sub issues in the conversion process:
For any search of relationships in the document, like resolving hyperlinks or notes, the conversion is throwing URI exception with no indication of what is the problematic URI.

We might need to do some hyperlinks validation before the conversion process.

add Lao and Khmer TTS and speech synthesis functions.

In the non-profit organization I belong to, we are progressing with the development of "accessible digital educational materials" for children with disabilities in Cambodia and Laos.

To create multimedia books, we are utilizing "Save as Daisy" (although it has not officially been announced to be compatible with MS365 Word, it has been confirmed to work) to convert them into "Daisy 3.0". However, we are facing difficulties in generating synthetic voices for Lao (Laotian) and Khmer (Cambodian).

Languages such as Japanese, English, and Portuguese have been verified and generated MP3(speechgen0002.mp3) files in these languages has been confirmed.

One possible reason is that the language packs for Lao and Khmer added to the "Region & Language" settings in Windows 11 Home (64-bit) do not include "text-to-speech" capabilities.

In "Immersive Reader," reading aloud in Lao and Khmer is possible, but it only works in online Ms365 and MsEdge. Furthermore, I understand that in the process of using "Save as Daisy" in Word to convert to Multimedia Daisy files, TTS and voice synthesis functionality used is not from Immersive Reader but is directly added to Windows.

Since reading aloud in these languages is already possible in Immersive Reader, we’d like to know if it's possible to integrate this functionality as a Windows language pack, or if there are third-party, paid solutions to add these languages.

Based on the above, please advice on how to incorporate Lao and Khmer TTS and how to get it.The ability to add "voice synthesis" for these languages is a critical issue in our project and could significantly improve accessibility in developing countries if resolved.

I have also contacted MS365 Ambassadors, but was not able to receive a solution, so I'd greatly appreciate if you could lend me your wisdom in this community.

Support documents saved in OneDrive

Reported by Prashant.

There seems to be an issue when converting documents saved in OneDrive. The following error is raised:

The given path's format is not supported.    at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
   at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at DaisyWord2007AddIn.Connect.PrepareForSaveAsDaisy(IPluginEventsHandler eventsHandler, Document activeDocument, String controlId)   at DaisyWord2007AddIn.Connect.SaveAsDaisy(IRibbonControl control)

Error while converting with DAISY Pipeline 2

An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.4.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22631
  • User or system wide install: user
  • Addin settings:
<Settings><PageNumbers  value="Custom" /><CharacterStyles value="False" /><ImageSizes value="resize" samplingvalue="96" /><Footnotes level="0" position="inline" numbering="none" startValue="1" numberPrefix="" numberSuffix="" /><TTSConfig file="" /></Settings>

Error while converting with DAISY Pipeline 2

  • システム コールに渡されるデータ領域が小さすぎます。 (HRESULT からの例外:0x8007007A)

Stacktrace:

   場所 Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   場所 Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   場所 System.StubHelpers.MngdNativeArrayMarshaler.ConvertContentsToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome)
   場所 org.daisy.jnet.JNIEnv.NewObject(IntPtr clazz, IntPtr methodID, JValue[] args)
   場所 org.daisy.jnet.JavaNativeInterface.NewObject(IntPtr javaClass, String signature, Object[] args)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2.makePrintStream(String filepath)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2..ctor()
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2.get_Instance()
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline2Script.ExecuteScript(String inputPath, Boolean isQuite)
   場所 Daisy.SaveAsDAISY.Conversion.Pipeline.Pipeline2.Scripts.DtbookCleaner.ExecuteScript(String inputPath, Boolean isQuite)
   場所 Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)

Conversion of single docx to dtbook XML: task crashed

An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.6.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22631
  • User or system wide install: user
  • Addin settings:
<Settings><PageNumbers  value="Custom" /><CharacterStyles value="False" /><ImageSizes value="original" samplingvalue="96" /><Footnotes level="0" position="inline" numbering="none" startValue="1" numberPrefix="" numberSuffix="" /><TTSConfig file="" /></Settings>

Conversion of single docx to dtbook XML: task crashed

  • One or more errors occurred.
  • An error occured during the XSL-based conversion
  • An error occurred during a call to extension function 'FootNoteId'. See InnerException for a complete description of the error.
  • Input string was not in a correct format.

Stacktrace:

   at Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   at Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   at Daisy.SaveAsDAISY.Conversion.Converter.<>c__DisplayClass37_0.<Convert>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args)
   at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
   at <xsl:template name="InsertFootnotes">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 level, IList`1 verfoot, IList`1 characterStyle, String sOperators, IList`1 sMinuses, String sNumbers, IList`1 sZeros)
   at <xsl:template name="compiler:generated"> (31)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, XPathNavigator quote, IList`1 charparahandlerStyle, IList`1 dpiPara, IList`1 imgOptionPara, IList`1 mastersubpara, IList`1 level, IList`1 txt, IList`1 custom, IList`1 sZeros, String sNumbers, IList`1 sMinuses, String sOperators, IList`1 checkid, String flagNote, IList`1 VERSION, IList`1 prmTrack, IList`1 flag)
   at <xsl:template name="compiler:generated"> (112)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, IList`1 newlevel, IList`1 checkid, IList`1 sZeros, String sNumbers, IList`1 sMinuses, String sOperators, IList`1 characterStyle, IList`1 verfoot, IList`1 level)
   at <xsl:template name="InsertFootnotes">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 level, IList`1 verfoot, IList`1 characterStyle, String sOperators, IList`1 sMinuses, String sNumbers, IList`1 sZeros)
   at <xsl:template name="compiler:generated"> (31)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, XPathNavigator quote, IList`1 charparahandlerStyle, IList`1 dpiPara, IList`1 imgOptionPara, IList`1 mastersubpara, IList`1 level, IList`1 txt, IList`1 custom, IList`1 sZeros, String sNumbers, IList`1 sMinuses, String sOperators, IList`1 checkid, String flagNote, IList`1 VERSION, IList`1 prmTrack, IList`1 flag)
   at <xsl:template name="Matter">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 prmTrack, IList`1 version, IList`1 custom, IList`1 masterSub, String sOperators, XPathNavigator sMinuses, String sNumbers, XPathNavigator sZeros, IList`1 imgOption, IList`1 dpi, IList`1 charStyles, String matterType)
   at <xsl:template name="BodyMatter">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 prmTrack, IList`1 version, IList`1 custom, IList`1 masterSub, String sOperators, XPathNavigator sMinuses, String sNumbers, XPathNavigator sZeros, IList`1 imgOption, IList`1 dpi, IList`1 charStyles)
   at <xsl:template name="compiler:generated"> (117)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 doclang, IList`1 doclangbidi, IList`1 doclangeastAsia, IList`1 documentDate, IList`1 documentSubject, IList`1 documentDescription)
   at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
   at Daisy.SaveAsDAISY.Conversion.WordToDTBookXMLTransform.ConvertDocument(DocumentParameters document, ConversionParameters conversion, XmlDocument mergeTarget)
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at Daisy.SaveAsDAISY.Conversion.DaisyClass.FootNoteId(Int32 i, Int32 level)

Language detection issue in Save As DAISY

Mail from Dipendra Manocha [email protected]

In our recent tests of Pipeline app, we discovered that Hin text in a bilingual document in word did not get appropriate language markup when converted to DTBook XML.

The work document starts with US English text. Last paragraph is in Hindi starting with a level 2 heading followed with a paragraph in Hindi.

We tried both ways of specifically selecting the Hindi text and choose Hindi as its language in Microsoft Word. We also tried without such assigning of language. In both cases, Hindi language tag did not come in the XML document.

Attaching the word document used for this test.

Backport functionnal fixes to version 2.7

in the wait of the validation of 2.8 that is still under tests phases and is blocked due to a pipeline 2 TTS issue, readd bugfixes from 2.8 in version 2.7.2 to provide a fixed version of the addin.

Create a folder by default (proposition)

Conversion generate files at the root of the selected folder so user is obliged to create new folder for each conversion.

The proposed comportment is that a folder is created at each conversion and named by the FileName of the converted file.

In case a folder with the same name exist, add a digit to the folder name (FileName1).

Error with URL encoding

An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.1.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22621
  • User or system wide install: user

Conversion of single docx to dtbook XML: task crashed

  • '=' est un jeton inattendu. Le jeton attendu est ';'. Ligne 2, position 428280.

Cause has been identified : an URL with "&attr=" was present in a footnote without the "&" encoded as "&"

Stacktrace:

   à Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   à Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   à System.Xml.XmlTextReaderImpl.Throw(Exception e)
   à System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
   à System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
   à System.Xml.XmlTextReaderImpl.ParseAttributes()
   à System.Xml.XmlTextReaderImpl.ParseElement()
   à System.Xml.XmlTextReaderImpl.ParseElementContent()
   à System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   à System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   à System.Xml.XmlDocument.Load(XmlReader reader)
   à System.Xml.XmlDocument.Load(String filename)
   à Daisy.SaveAsDAISY.Conversion.WordToDTBookXMLTransform.MergeDocumentInTarget(DocumentParameters documentToMerge, XmlDocument mergeTarget)
   à Daisy.SaveAsDAISY.Conversion.WordToDTBookXMLTransform.ConvertDocument(DocumentParameters document, ConversionParameters conversion, XmlDocument mergeTarget)
   à System.Threading.Tasks.Task`1.InnerInvoke()
   à System.Threading.Tasks.Task.Execute()

Protected view - Command not available issue

When trying to convert a document opened in protected view, the conversion process raises an error saying a command is not available.

After analysis, when opened in protected view, the current document is not registered as "ActiveDocument".
Users should be prompt that current document cannot be document as it is opened in protected view,

Update Megavoice export script

The megavoice scripts have been updated with simpler settings.

The corresponding form of the addin must be updated for the next release.

Conversion of single docx to dtbook XML: task crashed

Uploading 11.Arm.History.docx…
An exception was reported by the saveAsDaisy addin.

  • Addin Version: 2.8.1.0
  • Running Architecture: x64
  • OS: Microsoft Windows 10.0.22631
  • User or system wide install: user

Conversion of single docx to dtbook XML: task crashed

  • The 'strong' start tag on line 2 position 9463 does not match the end tag of 'p'. Line 2, position 9482.

Stacktrace:

   at Daisy.SaveAsDAISY.Conversion.Converter.Convert(DocumentParameters document, Boolean applyPostProcessing)
   at Daisy.SaveAsDAISY.Addins.Word2007.Connect.ApplyScript(Script pipelineScript, IConversionEventsHandler eventsHandler, ConversionParameters conversionIntegrationTestSettings)
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Daisy.SaveAsDAISY.Conversion.WordToDTBookXMLTransform.MergeDocumentInTarget(DocumentParameters documentToMerge, XmlDocument mergeTarget)
   at Daisy.SaveAsDAISY.Conversion.WordToDTBookXMLTransform.ConvertDocument(DocumentParameters document, ConversionParameters conversion, XmlDocument mergeTarget)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Characters in filename and document properties break Save as DAISY

A Word document has the filename Druhý sešit směšných lásek (Czech language) and same for title in document properties.

Save as DAISY throws "An unexpected error occurs" when saving as DTBOOK XML on two different machines.

org.daisy.pipeline.core.script.datatype.DatatypeException: Input file 'C:\Users\Rorme\AppData\Local\Temp\Druhý sešit smešných lásek.xml' does not exist.
	at org.daisy.pipeline.core.script.datatype.FileDatatype.validate(FileDatatype.java:44)
	at org.daisy.pipeline.core.script.JobParameter.setValue(JobParameter.java:74)
	at org.daisy.pipeline.core.script.Job.setParameterValue(Job.java:142)
	at org.daisy.pipeline.lite.PipelineLiteCLI.createJob(PipelineLiteCLI.java:188)
	at org.daisy.pipeline.lite.PipelineLiteCLI.main(PipelineLiteCLI.java:99)

Renamed the source file and the process runs, but the folder that is opened is empty. Browsing to a parent document and the XML is there. Changed the document title in the properties and the XML is saved in the correct location. The XML is then edited to fix the title.

The document can be shared for debugging as necessary but won't be posted here to respect the rights issues.

Default conversion folder and Sapi voice issue

Feedback from a new user of the plugin :

  • Could be usefull to propose a default conversion folder in documents, similarly as what the DAISY Pipeline App does
  • Probleme in the pipeline synthesis while converting a document whit some English part in it :
    The tts log mentioned that the US voice was a SAPI version (while other voices were onecore), and that SapiEngine raised an NullPointerException on line 88 with the message "voice is null" when trying to use it.

Save as Daisy - Proxy error

We are trying to deploy Save-As-Daisy, everything seems to install ok. All clients are required to authenticate to a proxy server. When choosing to save as "DAISY XML (from Single docx)" we get the option to "Export to DTbook XML," I fill out the Title, Publisher then Output Folder then click Translate, a few seconds later an error is returned stating "The remote server returned an error: (407) Proxy Authentication Required." If I bypass the proxy the application successfully completes.

Can you tell me why the application is using the proxy & what it is trying to access? Also, can the plugin be configured to not require an internet connection?

Thanks.

Subdocument not found in single word conversion

Office version : 2019 32bits
Bug : yes
UI action : SaveAsDAISY/DAISY XML (from single docx)

When converting a master document with a subdocument, the conversion process fails to find the subdocuments path.

After checking the document XML, The subdocument path is relative to the master document.

The actual process seems to search for the subdocument near a temporary copy of the master document (in AppData/Local/Temp) instead of the original master document.

Unknow error raises on image not present in the document

An unknown error is sometimes raised after conversion is finished, saying that an image in the Temp folder is not accessible.
The image is not part of converted document.

The issue happens in the following scenario :

  • A word document to convert is opened
  • The user opens an image from a mail client (in my test, thunderbird client and gimp are used)
  • The user launch the conversion

Conversion result seems not to be corrupted by this error.

Logging pipeline error/exceptions

A user reported a "lame not found" issue on a conversion to daisy book.
In this case, the pipeline did not provide details on the exception to the users, while this exception can occured on several occasions, including on a lame encoding issue.
On encoding issue, the pipeline would print errors informations on the stderr output and encapsulate the encoding exception under a "lame not found" exception, the top level exception message being displayed to user.

For better debug/assistance to users in case of pipeline errors, we need to log those errors (and exceptions stacktrace if possible) on a file, that we could retrieve or ask the user to send it to us.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.