-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This document is missing a relationship #863
Comments
Can you include a snippet of how you tried to use the RemoveMalformedHyperlinksRelationshipErrorHandler? Also, you're saying you used 2.11.3 but also tried the RemoveMalformedHyperlinksRelationshipErrorHandler? That infrastructure was introduced with 2.12.0 |
Oh, the question occur in Version: (2.11.3), but when I update to 2.12.1,use code var openSettings = new OpenSettings()
{
RelationshipErrorHandlerFactory = p => new RemoveMalformedHyperlinksRelationshipErrorHandler(p)
};
using (WordprocessingDocument doc = WordprocessingDocument.Open(memoryStream, true, openSettings)){} In this class ‘RemoveMalformedHyperlinksRelationshipErrorHandler‘, I can override and return a new uri to Ignore some mistakes by partUri or url. The RemoveMalformedHyperlinksRelationshipErrorHandler from |
Yes, but I'm still confused as to what you are looking for. That It seems like you are asking for a way to handle cases like this with the |
I think the reason is that package ' System.IO.Packaging.Package'. 我认为可能是'System.IO.Packaging.Package'包的问题。 |
We can probably make the RelationshipErrorHandler handle this kind of thing, but it doesn't appear to out of the box. I'm fairly busy right now and can't investigate the design of this. I'll have some time in about a month. In the meantime, feel free to propose an API and I'm happy to review it. |
See #247 dotnet/runtime#26084 #715 Can it fix this? See my Chinese blogs too. |
Description
This document is missing a relationship,say "数据包中不存在指定部件", how to skip error or provide callback function ?
Please provide a simple description of the issue encountered.
Information
Repro
#858
When I unzip the docx file, on the path " word_rels\document.xml.rels", I found "Target="../NULL"/"
Are there any where to skip error relationship or delete error relationship ?
I use RemoveMalformedHyperlinksRelationshipErrorHandler to solve, but It not work.
Observed
Please add your observed behavior here
Expected
Please add your expected behavior here.
Skip error or fix document.
Or use code do like this:
https://docs.microsoft.com/en-us/office/troubleshoot/word/image-part-relationship-rld8-not-found-error-microsoft-word
The text was updated successfully, but these errors were encountered: