We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Xamarin, DocIO and functionality

Thread ID:

Created:

Updated:

Platform:

Replies:

119389 Jun 15,2015 09:25 AM UTC Mar 1,2018 07:39 AM UTC Xamarin.Android 9
loading
Tags: DocIO
Benjamin
Asked On June 15, 2015 09:25 AM UTC

Xamarin, DocIO and functionalities

Hello, my company needs to work with doc files in Xamarin-Android.

I have 2 questions :


1. Can i convert doc files to pdf ? I found not but is there something planned in the future ? When ?

2. Can i merge image in doc files ?

Thanks for your answers.

Regards.

PS : English is not my natural born language, sorry for my english.

Sarathkumar V [Syncfusion]
Replied On June 16, 2015 08:47 AM UTC

Hi Benjamin,

Thank you for using Syncfusion products.

Regarding Query #1:

We have confirmed the reported issue, “Word to pdf conversion in Xamarin platform” as a feature and we will implement it in any of our upcoming releases. Please let us know if you require further assistance.

Regarding Query #2:

From your requested query we may suspect that you’re trying to perform the following two operation with images:

Case 1 – Insert/Add images:

If you are trying to add/insert the image in word document use the below code snippet:

Code Snippet:

// Creating a new document.

WordDocument document = new WordDocument();

//Adding a new section to the document.

WSection section = document.AddSection() as WSection;

//Add the paragraph to the section

IWParagraph paragraph = section.AddParagraph();

 

//get the image as stream

Assembly assembly = GetType().Assembly;

Stream imageStream = assembly.GetManifestResourceStream("<<imagefilepath>>");

//append the picture to the paragraph

WPicture picture = paragraph.AppendPicture(imageStream) as WPicture;

//change the picture properties

picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText;

picture.VerticalOrigin = VerticalOrigin.Margin;

picture.VerticalPosition = 24;

picture.HorizontalOrigin = HorizontalOrigin.Column;

picture.HorizontalPosition = 263.5f;

picture.WidthScale = 20;

picture.HeightScale = 15;

 

Case 2- Mail Merge with images:

If you are trying to perform the mail merge with images in the word document use the below provided code snippet. In that snippent, template document with merge field is opened using DocIO and merge fields are updated with images using MailMerge Event handler “MergeImageFieldEventHandler”.

Code Snippet:

//create new word document

       WordDocument document = new WordDocument();

       //Open the template document

       document.Open(“<<filename>>”);

       //create the event handler to perform the image merge

       document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_Image);

//Handler implementation

       private void MergeField_Image(object sender, MergeImageFieldEventArgs args)

        {

            // Get the image from disk during Merge.

            if (args.FieldName == "<<fieldname>>")//field name wont contains the “Image:”

            {

                //get the image as stream

                Assembly assembly = GetType().Assembly;

                Stream imageStream = assembly.GetManifestResourceStream("<<filepath>>");

                args.ImageStream = imageStream;

            }

        }

Note: template document should contains the merge field whose name should prefix with “Image:” keyword.

For example: «Image:ProductImage»

Please let us know if you have any other questions.

Regards,

Sarath


Sarathkumar V [Syncfusion]
Replied On June 16, 2015 09:37 AM UTC

Hi Benjamin,

Kindly ignore the previous update.

Regarding Query #1:

At present DocIO does not have support for Word to pdf conversion in Xamarin platform. We will implement this feature in any of our upcoming releases. At this moment we cannot provide any concrete timeline for this feature. Please let us know if you require further assistance.

Regarding Query #2:

From your requested query we may suspect that you’re trying to perform the following two operation with images:

Case 1 – Insert/Add images:

If you are trying to add/insert the image in word document use the below code snippet:

Code Snippet:

// Creating a new document.

WordDocument document = new WordDocument();

//Adding a new section to the document.

WSection section = document.AddSection() as WSection;

//Add the paragraph to the section

IWParagraph paragraph = section.AddParagraph();

 

//get the image as stream

Assembly assembly = GetType().Assembly;

Stream imageStream = assembly.GetManifestResourceStream("<<imagefilepath>>");

//append the picture to the paragraph

WPicture picture = paragraph.AppendPicture(imageStream) as WPicture;

//change the picture properties

picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText;

picture.VerticalOrigin = VerticalOrigin.Margin;

picture.VerticalPosition = 24;

picture.HorizontalOrigin = HorizontalOrigin.Column;

picture.HorizontalPosition = 263.5f;

picture.WidthScale = 20;

picture.HeightScale = 15;

 

Case 2- Mail Merge with images:

If you are trying to perform the mail merge with images in the word document use the below provided code snippet. In that snippent, template document with merge field is opened using DocIO and merge fields are updated with images using MailMerge Event handler “MergeImageFieldEventHandler”.

Code Snippet:

//create new word document

       WordDocument document = new WordDocument();

       //Open the template document

       document.Open(“<<filename>>”);

       //create the event handler to perform the image merge

       document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_Image);

//Handler implementation

       private void MergeField_Image(object sender, MergeImageFieldEventArgs args)

        {

            // Get the image from disk during Merge.

            if (args.FieldName == "<<fieldname>>")//field name wont contains the “Image:”

            {

                //get the image as stream

                Assembly assembly = GetType().Assembly;

                Stream imageStream = assembly.GetManifestResourceStream("<<filepath>>");

                args.ImageStream = imageStream;

            }

        }

Note: template document should contains the merge field whose name should prefix with “Image:” keyword.

For example: «Image:ProductImage»

Please let us know if you have any other questions.

Regards,

Sarath


Steve Spormann
Replied On May 13, 2016 09:44 AM UTC

Hi Benjamin,

Kindly ignore the previous update.

Regarding Query #1:

At present DocIO does not have support for Word to pdf conversion in Xamarin platform. We will implement this feature in any of our upcoming releases. At this moment we cannot provide any concrete timeline for this feature. Please let us know if you require further assistance.

Regarding Query #2:

From your requested query we may suspect that you’re trying to perform the following two operation with images:

Case 1 – Insert/Add images:

If you are trying to add/insert the image in word document use the below code snippet:

Code Snippet:

// Creating a new document.

WordDocument document = new WordDocument();

//Adding a new section to the document.

WSection section = document.AddSection() as WSection;

//Add the paragraph to the section

IWParagraph paragraph = section.AddParagraph();

 

//get the image as stream

Assembly assembly = GetType().Assembly;

Stream imageStream = assembly.GetManifestResourceStream("<<imagefilepath>>");

//append the picture to the paragraph

WPicture picture = paragraph.AppendPicture(imageStream) as WPicture;

//change the picture properties

picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText;

picture.VerticalOrigin = VerticalOrigin.Margin;

picture.VerticalPosition = 24;

picture.HorizontalOrigin = HorizontalOrigin.Column;

picture.HorizontalPosition = 263.5f;

picture.WidthScale = 20;

picture.HeightScale = 15;

 

Case 2- Mail Merge with images:

If you are trying to perform the mail merge with images in the word document use the below provided code snippet. In that snippent, template document with merge field is opened using DocIO and merge fields are updated with images using MailMerge Event handler “MergeImageFieldEventHandler”.

Code Snippet:

//create new word document

       WordDocument document = new WordDocument();

       //Open the template document

       document.Open(“<<filename>>”);

       //create the event handler to perform the image merge

       document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_Image);

//Handler implementation

       private void MergeField_Image(object sender, MergeImageFieldEventArgs args)

        {

            // Get the image from disk during Merge.

            if (args.FieldName == "<<fieldname>>")//field name wont contains the “Image:”

            {

                //get the image as stream

                Assembly assembly = GetType().Assembly;

                Stream imageStream = assembly.GetManifestResourceStream("<<filepath>>");

                args.ImageStream = imageStream;

            }

        }

Note: template document should contains the merge field whose name should prefix with “Image:” keyword.

For example: «Image:ProductImage»

Please let us know if you have any other questions.

Regards,

Sarath


Sarathkumar V [Syncfusion]
Regarding Query #1:
At present DocIO does not have support for Word to pdf conversion in Xamarin platform. We will implement this feature in any of our upcoming releases. At this moment we cannot provide any concrete timeline for this feature. Please let us know if you require further assistance.
Our company is interested in purchasing your software, but we need the function to convert documents from docIO to pdf, has there been any progress on this front so far?

Best regards.








Vijay Ramachandran [Syncfusion]
Replied On May 16, 2016 09:04 AM UTC

Hi Steve,

Thank you for your update.

At present, we do not have any immediate plan to implement this feature. Also, we are unable to provide exact timeline for adding this support. We will notify you once the feature has been implemented.

Regards,
Vijay R


James Neno
Replied On September 19, 2016 02:59 PM UTC

Sarathkumar,

I am also looking for a product for Word to PDF conversion to use with Xamarin, targeting UWP, iOS, and Android.

Do you have any new information regarding the timeline for Word to PDF support in your mobile libraries?


Sivasubramani V [Syncfusion]
Replied On September 20, 2016 09:41 AM UTC

Hi James,

Thank you for interesting in Syncfusion products. .

We will consider your request to add support for Word to PDF conversion in Xamrin platform. Currently Microsoft have some API limitations in Xamarin and UWP platforms. So at present, we are unable to provide tentative timeline for implementing this feature. We will notify you once this feature has been implemented.

Regards,
Sivasubramani 


Pistoolirapu
Replied On October 2, 2016 04:52 PM UTC

Hi James,

Thank you for interesting in Syncfusion products. .

We will consider your request to add support for Word to PDF conversion in Xamrin platform. Currently Microsoft have some API limitations in Xamarin and UWP platforms. So at present, we are unable to provide tentative timeline for implementing this feature. We will notify you once this feature has been implemented.

Regards,
Sivasubramani 


Hello,

Here is one more needing feature of docx to pdf conversion. Now need to create separately docx and pdf if both are needed. Would be very good to create only docx and convert it to pdf, only one thing to update.

Hope the limitations will be sorted soon and this feature comes live. Thanks.


-Juha

Ayswarya Krishna Kumar [Syncfusion]
Replied On October 3, 2016 05:16 AM UTC

Hi Juha,

Thank you for contacting Syncfusion support. We will update you once we implemented the feature.

Regards,
Ayswarya
 


Dilli Babu Nandha Gopal [Syncfusion]
Replied On March 1, 2018 07:39 AM UTC

Hi Juha 
 
Thank you for your patience. 
 
We are glad to announce that Word to PDF conversion in Xamarin platform is supported now. Our Essential Studio 2018 Volume 1 Release v16.1.0.24 is rolled out and is available for download under the following link. 
 
 
For more information, please refer the below KB: 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards, 
Dilli babu. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;