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

Remove Empty Paragraphs using PDF converter

Thread ID:

Created:

Updated:

Platform:

Replies:

102193 Jan 8,2012 09:27 AM UTC Jan 17,2012 04:26 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: PDF
Tasha
Asked On January 8, 2012 09:27 AM UTC

Hi Support,

I have a print report feature using mail merge template in my application.
i'm using MailMerge.RemoveEmptyParagraphs method on print to word feature and it works perfectly.
My question is, how to use it if i want to print the document to pdf?
My code:

Dim document As New WordDocument
document = New WordDocument("..\x.doc")
document.MailMerge.RemoveEmptyParagraphs = True
document.MailMerge.ExecuteNestedGroup(SetPrintTable(), SetPrintCommand())
document.Save("x.doc")

Dim converter As DocToPDFConverter = New DocToPDFConverter()
Dim pdfDoc As PdfDocument = converter.ConvertToPDF(document)

i still able to see the empty paragraph.
attached are the word template file, the file result in word format, and the file result in pdf format.

Any advice?

Karina Tasha



Training_Schedule_List_f1623ff6.zip

Poornima R [Syncfusion]
Replied On January 9, 2012 06:14 AM UTC

Hi Karina,

Thank you for your interest in Syncfusion Products.

We could able to reproduce the mentioned issue with the “Preservation of empty paragraph in the converted Pdf even after setting MailMerge.RemoveEmpty paragraph as true value.”. Could you please report this issue through Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents ), because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well? Please ignore if you have already reported this issue.

As a work around, please try converting the saved word document (x.doc) into pdf instead of converting document object into Pdf and let us know whether the mentioned issue is resolved.

Modified code snippet:
Dim document As New WordDocument
document = New WordDocument("..\x.doc")
document.MailMerge.RemoveEmptyParagraphs = True
document.MailMerge.ExecuteNestedGroup(SetPrintTable(), SetPrintCommand())
document.Save("x.doc")

Dim converter As DocToPDFConverter = New DocToPDFConverter()
Dim pdfDoc As PdfDocument = converter.ConvertToPDF("x.doc")

Please find the sample from the below link illustrating the same. Try running the sample and let us know if this helps you.
Sample:
SampleDocIO-572680974.zip

Please let us know if you have any questions.

Regards,
Poornima



Tasha
Replied On January 13, 2012 09:57 AM UTC

Hi Support

thanks for the update.. it works perfectly!!!

Karina Tasha


Deivaselvan Y [Syncfusion]
Replied On January 17, 2012 04:26 AM UTC

Hi Karina,

Thank you for your update.

Please let us know if you have any other questions.

Regards,
Deiva selvan




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

;