Go Back   TX Text Control Community > TX Text Control Discussion and Support Forums > TX Text Control .NET Server

TX Text Control .NET Server Please use this forum for TX Text Control .NET Server support only. If you need support for a different product, please use the appropriate forum.

Reply
 
Thread Tools Display Modes
  #1  
Old February 16, 2010
brycare brycare is offline
Registered User
 
Join Date: Feb 2010
Posts: 4
Loading a DOCX Template From a URL

Hi.
Does anyone know how to load up a DOCX template retrieved via a URL?
My templates are stored in SharePoint so their location will be like http://test/folder/document1.docx

While the template.LoadTemplate works fine if the file path is a directory (such as C:\document1.docx) it throws an error if the doc location is a URL as above.

The error displayed is "URI formats are not supported.".

Anyone know how to get around this issue?
Apologies if this is a basic question as I have only been working with the TxTextControl for a few days and still trying to familiarise myself with its features
Reply With Quote
  #2  
Old February 16, 2010
Gunnar Giffey's Avatar
Gunnar Giffey Gunnar Giffey is offline
TX Support Engineer
TX Text Control
 
Join Date: Sep 2004
Location: Bremen, Germany
Posts: 3,999
Re: Loading a DOCX Template From a URL

Hello there,
TX Text Control will not load a document from an URI, instead, it requires to have a local path or a byte/string array.
I suggest to download the document into a byte array and load it like this:
Code:
byte[] temp = null;
// put your document in temp with HttpWebRequest or similar .NET methods
textControl1.Load(temp, TXTextControl.BinaryStreamType.WordprocessingML);
__________________
Regards,
Gunnar Giffey, TX Text Control
[Forum Administrator]
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text field lost when saved as docx Syvers TX Text Control .NET 1 November 2, 2009 17:25:00
One template is not enough sman Support Forum 4 June 5, 2009 15:04:28
Adding a template to a template derekk TX Text Control .NET 1 January 24, 2008 09:27:05
Margins not captued when loading a file GillesM TX Text Control .NET 1 February 1, 2005 19:40:20
Editing of document created from a template Unregistered TX Text Control ActiveX 0 April 8, 2004 12:26:18


All times are GMT +1. The time now is 06:21:00.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 1991 - 2010 The Imaging Source Europe GmbH