IDocumentFormatProvider provider Import is not working for docx file with images

7 posts, 1 answers
  1. Sreevalli
    Sreevalli avatar
    7 posts
    Member since:
    Sep 2012

    Posted 20 Nov 2013 Link to this post

    Hi Team,

    I'm  trying to import my docx file to Raddocument. its working when docx file is not having any images in it. But,if any images are there its giving Nullable object must have a value exception. Kindly find the below code snip,

     
      private void btnBrowse_Click(object sender, RoutedEventArgs e)
            {
                RadDocument document = new RadDocument();
                IDocumentFormatProvider provider = new DocxFormatProvider();
                OpenFileDialog openDialog = new OpenFileDialog();
                openDialog.Filter = "Documents|*.docx";
                openDialog.Multiselect = false;
                bool? dialogResult = openDialog.ShowDialog();
                if (dialogResult == true)
                {
                    using (FileStream stream = openDialog.File.OpenRead())
                    {
                        document = provider.Import(stream);
                    }
                }
                this.radRichTextBox.Document = document;
            }
     
    using dlls of version 2011.3.1116.1040

    also i tried with dlls version 2012.3.1129.1050

    Help me in this. its very urgent for me:( 

    Thanks in advance
      
  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 22 Nov 2013 Link to this post

    Hi,

    Could you please check the behavior in our online demo which targets the most recent official release of RadControls for Silverlight? Provided that you are experiencing the same issue in the demo, please send us a document which we can use to troubleshoot the issue on our side, as I was unable to replicate it.

    I'm looking forward to your reply.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Sreevalli
    Sreevalli avatar
    7 posts
    Member since:
    Sep 2012

    Posted 26 Nov 2013 Link to this post


    Hi Petya,

    I have already seen in Online Demos. but didn't fount any solution to resolve my issue. 

    kindly follow Docx File of .docx file which i'm trying to import  



  5. Petya
    Admin
    Petya avatar
    975 posts

    Posted 28 Nov 2013 Link to this post

    Hello,

    Thank you for the provided document.

    We investigated the issue and it turns out it is related to an unsupported feature of RadRichTextBox. What you can do in order to show the document in the control for now is to modify the picture on the bottom of the document (the one with the signature), so that it is not aligned with value Inside/ Outside. 

    Let us know if you have other comments or questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Sreevalli
    Sreevalli avatar
    7 posts
    Member since:
    Sep 2012

    Posted 28 Nov 2013 Link to this post

    Hi,

    Thank you so much. it helped me:)
  7. Sreevalli
    Sreevalli avatar
    7 posts
    Member since:
    Sep 2012

    Posted 29 Nov 2013 Link to this post

    Hi Petya,

    I'm not able to read and replace document data which is in toggle field codes.

    Is there any way to read?? kindly find Sample Document.

    Thanks in advance
  8. Sreevalli
    Sreevalli avatar
    7 posts
    Member since:
    Sep 2012

    Posted 09 Jan 2014 Link to this post

    Hi Petya,


    when i'm trying to import Docx file (Docx File) its giving me error as "Value was either too large or too small for an Int32".

    _document = new RadDocument();
                           byte[] doc = Convert.FromBase64String(MergeCollection[_attachmentCount].Body);
                           IDocumentFormatProvider provider = new DocxFormatProvider();
                           MemoryStream stream = new MemoryStream(doc);
                           _document = provider.Import(stream);

    Please kindly help me in this.
Back to Top
DevCraft banner