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.
Unfortunately, activation email could not send to your email. Please try again.

Text is printed outside the Table cell in PDF.....

Thread ID:

Created:

Updated:

Platform:

Replies:

117690 Nov 28,2014 06:28 AM Apr 7,2015 01:22 AM Windows Forms 12
loading
Tags: DocIO
Amit Kumar
Asked On November 28, 2014 06:28 AM

I am creating the PDF using the Syncfusion dll. First I create a word document then i convert word into the PDF using the below code.

 DocToPDFConverter converter = new DocToPDFConverter();
                            string fileName = "RFPQuoteSlip_" + UserContext.TenantName.ToString() + ".pdf";

                            //Convert word document into PDF document
                            PdfDocument pdfDoc = converter.ConvertToPDF(wordDoc);
                           
                                //Stream the output to the browser.                                
                            pdfDoc.Save(fileName, Response, HttpReadType.Open);

I have created a table in the word then i have added a paragraph in the table cell and in the added paragraph i have appended the below HTML using the Paragraph.AppendHTML method. Now half of the text available in the below HTML is printed inside the table cell and half of the text is printed outside the table cell. Please help me on that how can i print the complete text inside the table cell only. If text is very big then it should be wrap in the table cell. Please provide me some solution for that so that child table could be fit inside the parent table cell.

<table width="539" style="width: 404pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0">
    <colgroup><col width="124" style="width: 93pt;" /><col width="415" style="width: 311pt;" /></colgroup>
    <tbody>
        <tr height="20" style="height: 15pt;">
            <td align="right" class="xl63" style="width: 93pt; height: 15pt;">325132b5</td>
            <td class="xl63" style="width: 311pt; border-left-style: none;">wwerwe rwetet wete3 rtwejhtwe tjwe twetw eqwrw2rwrjwer qwnerhqwerqwerhqwe rjhwqerqwe rjhqwer qwjehrvqwh erjhqwevlr qwegrvqwe rqwegjrv qwejrgjcqwjer qwjegrvqwe rq</td>
        </tr>
    </tbody>
</table>



Thanks
Amit Kumar

Sathish K [Syncfusion]
Replied On December 1, 2014 06:44 AM

Hi Amit,

 

Thank you for your interest in Syncfusion products.

 

We are unable to reproduce the mentioned issue with table content in Doc to Pdf conversions with our latest version of Essential studio 12.3.0.36. Could you please let us know currently which version of Essential studio you are using? It will help us to analyse further on the mentioned issue.

 

You can download our latest version Essential studio from below link:

https://www.syncfusion.com/forums/117495/essential-studio-2014-volume-3-final-release-v12-3-0-36-available-for-download

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Amit Kumar
Replied On December 2, 2014 03:14 AM

Hi Sathish,
Thanks for your replly.
Currently we are using version 11.3040.0.30. So please let me know that is there any fix available for this Version for the above problem?


Thanks
Amit Kumar


Sathish K [Syncfusion]
Replied On December 3, 2014 01:52 AM

Hi Amit,

 

We unable to reproduce the mentioned issue with table contents in Doc to Pdf conversion even with 11.3.0.30 version also. We have prepared a sample to illustrate the same. Kindly modify the attached sample to reproduce the issue and update us the same. Thereby we will analyze further on the mentioned issue and provide you appropriate solution.

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Attachment: Sample_c68da185.zip

Amit Kumar
Replied On December 3, 2014 02:46 AM

Hi Sathish,
Please find the sample with the attachment. I have replicated it. Actually i have set the column width of the parent table and child table is bigger than parent table that is why it is getting out but what i want that i want to fix the initial width of the parent table and if the child table is bigger that the parent table then the parent table size will be increased itself.

Thanks
Amit Kumar

Attachment: Sample_c68da185_72916b1f.zip

Sathish K [Syncfusion]
Replied On December 4, 2014 01:05 AM

Hi Amit,

 

Thank you for your update.

 

When we set “Automatically resize to fit contents” property of the table in the Word document to true, then the viewer (MS Word) will automatically resizes the width of the table based on the contents while opening the document. MS Word generated Pdf documents will contain the same width for the table when “Automatically resize to fit contents” property is set to true.

 

By default value of the “Automatically resize to fit contents” property is false. You can define this property value to true in DocIO by using the below code snippet.

 

Code snippet:

table.TableFormat.IsAutoResized = true;

 

This will be reflected in the Word document while opening the document in MS Word and it will not be reflected in the generated Pdf document since currently DocIO doesn’t support “Automatically resize to fit contents” property in Doc to Pdf conversion. We have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.  

 

As a workaround kindly define the desired width to the table in order to retain the expected format. We have modified your sample according to the same. Please find the modified sample from below link.

 

Modified sample link:

http://www.syncfusion.com/downloads/support/directtrac/general/Sample501008199.zip

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Nishant Garg
Replied On February 19, 2015 06:09 AM

Hi Sathish,

I am still waiting to resolve this issue, I believe you guys have implemented. 

So please let me know the patch details for the same.

Thanks,
Nishant

Sathish K [Syncfusion]
Replied On February 20, 2015 05:50 AM

Hi Nishant,

Thank you for your interest in Syncfusion products.

Auto fit to contents for tables in Doc to Pdf conversion is not yet added in DocIO.
We have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.  

Please let us know if you have any other questions.

Regards,
Sathish



Nishant Garg
Replied On February 27, 2015 01:56 AM

Hi Sathish,
 
Thanks for your reply.
 
It is very highly visiblity issue for our client & we don't have any resolution for the same. As you informed us on December 4, 2014 01:05 AM that you will provide us a new release in three month & now you are saying the same thing so please let us know when the new version will be available.
 

Thanks!!!
Nishant

Sathish K [Syncfusion]
Replied On March 2, 2015 06:59 AM

Hi Nishant,

Thank you for your update.

Microsoft Word adjusts table/cell width automatically while rendering the table based on its content in Word documents. Whereas Essential DocIO renders the table/cell using the width defined in the Word documents, causes difference in table width preservation compared to the Microsoft Word. In order to render the table/cell similar to Microsoft Word, we need to implement auto fit table lay outing algorithm specifically to calculate the table/cell width and render table/cell based on the calculated width. This implementation requires in depth analysis of the Microsoft Word auto fit table lay outing algorithm and it greatly depend upon the factors like product design, code complexity and compatibility. Hence we cannot provide a concrete timeline for this feature implementation. We will update you once this feature is implemented.

Thanks,
Sathish


Sathish K [Syncfusion]
Replied On March 2, 2015 07:07 AM

Hi Nishant,

As mentioned earlier, kindly define the desired width for the table cells in the input Word document in order to preserve the well formatted table in the generated Pdf document.

Thanks,
Sathish



Nishant Garg
Replied On April 6, 2015 03:13 AM

Hi Sathish,
 
Any update on this issue. I am waiting for new release.
 
Regards,
Nishant

Sathish K [Syncfusion]
Replied On April 7, 2015 01:22 AM

Hi Nishant,

Thank you for your update.

The Auto fit to content support of tables in Doc to Pdf conversion is not yet implemented. We have already explained the complexities associated with the development of Auto Fit to content support of tables in Doc to Pdf conversion and hence we can’t provide any concrete timeline for this feature implementation. We will let you once we have implemented this feature.

Thanks,
Sathish



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.

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.

;