Hello
I have a word template with single page Fixed Header and Footer (SalesOrder1.docx).
when we merge the data into this template and convert into pdf (ORDER CONFIRMATION_1888959.pdf) it automatically create second blank page.which is unnecessary there is much space in first page repeater area.
Please look into word template and suggest what is the issue in word template.
Hi Manish,
Hello I updated the aspose version, but still facing two page issue.
attach is some example.
please respond on this asap as my clients are waiting for update on this.
Hi Manish,
See attached a word and pdf example. The attached example does not use page borders, it uses tables. If we delete empty rows in a table it does not work for us as then the formatting changes. Hence please do not suggest to delete empty rows. We just want the second page to be deleted , the first page is correct.
Hi,
int pageCount = doc.PageCount;
Table table = doc.FirstSection.Body.Tables[0];
foreach (Row row in table)
{
if (string.IsNullOrEmpty(row.ToString(SaveFormat.Text).Trim()))
{
LayoutCollector collector = new LayoutCollector(doc);
if (collector.GetEndPageIndex(doc.FirstSection.Body.LastParagraph) == pageCount)
{
row.RowFormat.ClearFormatting();
foreach (Cell cell in row)
{
cell.FirstParagraph.ParagraphBreakFont.Size = 1;
}
}
else
{
break;
}
}
}
doc.Save(MyDir + @"17.1.0.docx");
doc.Save(MyDir + @"17.1.0.pdf");
We have two types of documents. Some which have page borders and some which have tables. Both these types of documents give a blank second page. Please confirm that your code will resolve both these types of documents
Hello Thanks for reply but provided code generate blank rows in document.
This does not remove the Blank page which is created with Header and Footer only . There is no BODY in it . We do not want that to be generated as it is extra page . How can we do that .
We do not get the number of Product Lines in the Repetitive table .
Please check the Initial Query in this POST which tells everything and the attachment also
Second Page Generate After Merge the data using Aspose Word
Also for your reference we have sent the Standalone Application with this issue also in below ticket . Please check it :
Footer on only Last Page
Also please reply as how to implement the below:
Footer on only Last Page
I am worried did you understand my issue or not.if need more explanation.
please let me know.
Hi,