This is a migrated thread and some comments may be shown as answers.

Error when importing file with external image links using DocxFormatProvider

4 Answers 300 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 10 Sep 2018, 09:55 AM

I have the following code which fails at the `.Import` statement:

public byte[] PopulateHtmlAndTextBookmarks(byte[] input, List<BookmarkInfo> bookmarks)
{
    // Get the bytes into the Telerik doc object and load that into an editor
    DocxFormatProvider provider = new DocxFormatProvider();
    RadFlowDocument document = provider.Import(input);

 

The error is "System.ArgumentNullException: 'Value cannot be null. Parameter name: relationshipId'"

The issue appears to be that I have two images in that file (Open XML relationship IDs "rId7" and "rId8") that point to external URLs.  If I change those images to point at files inside the DocX container it works fine.

Does DocxFormatProvider work with external image links?   

(I'm using 2018.2.619.40)

PS I've tried to attach the file but it says only .jpg, .jpeg, .gif, .png are allowed

4 Answers, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 10 Sep 2018, 10:08 AM
Just realised I need to create a ticket to submit a file, I've done that now.
0
Georgi
Telerik team
answered on 13 Sep 2018, 09:45 AM
Hello Tom,

Thank you for sending us the document in the ticket. I am posting the reply here in case someone else encounters the same question.

Currently importing of images linked as an external resource is not supported in WordsProcessing. We have logged a feature request in our feedback portal: Implement support for linked picture reference, where you can vote to increase the priority and subscribe to be notified for any status updates.

Unfortunately, with the current implementation of WordsProcessing, there is no workaround I can propose to you.

Regards,
Georgi
Progress Telerik

0
Tom
Top achievements
Rank 1
answered on 13 Sep 2018, 11:16 AM
Hi Georgi, no problem, we can work round this for now I think, we just needed to know what the expected behaviour was.  Can I suggest updating the Images section of the documentation to make it clear this isn't currently supported?
0
Georgi
Telerik team
answered on 18 Sep 2018, 10:26 AM
Hi Tom,

Thank you for the provided suggestion. Each feedback is important for us, in order to improve the quality of our products and services. I will update the Features section of the documentation to clarify the missing support of linked resources.

In appreciation for bringing this to our attention, I have added Telerik points to your account.

Regards,
Georgi
Progress Telerik

Tags
WordsProcessing
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or