This project has moved and is read-only. For the latest updates, please go here.

deleting blank pages in the word doc using htmltoopenxml

Jul 30, 2015 at 6:00 PM
Hello friends,

I have been using this library for the last 6 months and let me tell you, its really wonderful which made creating the word document simpler for us.

Lately I have been facing some issues with the blank pages getting generated in the word document. I have identified the issue cause, its more of a issue with how the html is created.

Is there a way, where we can delete the blank pages in the word document before the response is sent to the user.

Thanks
Coordinator
Jul 31, 2015 at 8:25 AM
Hello,


Thanks you for your kind comment :-)
Do you know what causes these blank pages?

At the end of the conversion, the lib is cleaning itself with all these blank paragraphs. Take a look at HtmlConverter.RemoveEmptyParagraphs()
In any cases, once the conversion is completed, it will appends everything inside your word document. But you still have full access to that document, and you can apply another transformation using OpenXml SDK on it.