Avoiding blank page in PDF generated from doc file

I have a blank space / newline (br tags) / paragraph (p tags) appearing at the end of my word file. In a way all these are the white spaces appearing at the end of my document. I do not have full control on these trailing white spaces.

When such word file is converted to PDF, I had a problem. In some cases user tend to get a blank PDF page at the end. I found that page is not blank, but it is displaying trailing white spaces.

While I am working on to cleanup the source document itself, so that source word file will be clean. I was curios to know if (by handling some event / applying some setting) can I avoid such blank page creation while converting doc into PDF using Aspose Words .Net? Please suggest. Thanks in advance.

I have a blank space / newline (br/> tags) / paragraph (

tags) appearing at the end of my word file. In a way all these are the white spaces appearing at the end of my document. I do not have full control on these trailing white spaces.

When such word file is converted to PDF, I had a problem. In some cases user tend to get a blank PDF page at the end. I found that page is not blank, but it is displaying trailing white spaces.

While I am working on to cleanup the source document itself, so that source word file be clean. I was curios to know if (by handling some event / applying some setting) can I avoid such blank page creation while creating PDF? Please suggest.

@Aniruddha.Bhide,

Please ZIP and upload your sample input Word document here for testing. We will investigate the issue on our end and provide you more information.

Sorry for the delay in response, but it took me a while to reproduce this case.
Here with I am sharing attachment doc file used for PDF generation. I have provided the output PDF file as well.

Attachment Details -

  1. Document “Template_20171204065459-00048.doc” is a word file input to Aspose for conversion
    to PDF.
    A. “Body_POCWord.htm” has the body content appearing in word file.
    B. Folder “Body_POCWord” has the header and footer section references in word file.

  2. “Template_20171204065459-00048.pdf” is a PDF file generated by Aspose.

Word file has two pages in it. both having some content in it.
PDF produced by Aspose has two pages, but as you can observe in attachment - all the content is fitted in single page and second page appears as blank.

Please suggest. Thanks in advance”

Here is the attachment -

Masked Content - To share with Aspose Support.zip (123.8 KB)

@Aniruddha.Bhide,

I have converted your ‘Template_20171204065459-00048.doc’ document to PDF by using Aspose.Words for .NET 17.11 and MS Word 2016 and attached them here for your reference (see 17.11.pdf (51.2 KB) and msw-2016.pdf (81.8 KB)). In this case, the latest version of Aspose.Words mimics the way the Microsoft Word works. Please upgrade to latest version and see how it goes on your end. Hope, this helps.

I got the licensed version of Aspose Words .Net dll now. Please refer Component Source Order ID: 428809 for details.
Sorry, but issue still persists. I had cooked similar scenario as explained earlier. Please refer word file and PDF attached.

Waiting for your response, thanks in advance.Certificate_20180409105608-02912.zip (212.5 KB)

@Aniruddha.Bhide,

We are checking this scenario and will get back to you soon.

@Aniruddha.Bhide,

For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-16678. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Thanks for the information.

Any time line for this? Knowing that will help us to communicate with our client. Thanks in advance.

@Aniruddha.Bhide,

Regarding WORDSNET-16678, currently this issue is pending for analysis and is in the queue. There is no ETA available at the moment. Once the analysis of this issue is completed, we may then be able to share estimates with you. Rest assured, we will inform you via this thread as soon as this issue is resolved. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-16678) have been fixed in this Aspose.Words for .NET 23.8 update also available on NuGet.