Setting margin is making the text overlap with footer at the bottom in aspose.words?

i have a paragraph in first page of word document and the same paragraph content is continuous in second page of word document ...while continuing paragraph from first page to second page it is getting overlap with footer in first page ....

if i have a paragraph which is ended in first page itslef and in second page new paragraph started in tht case no overlap with footer in first page becoz the paragraph is ended in first page itself not continuing to second page....if the paragraph is continuing to second page in tht case iam able to seee overlap with footer......

how to avoid overlap of first page paragraph content with footer when the paragraph is continuos to second page ?

i kept top,bottom,left,right margins for word document....

oDocBuilder = new Aspose.Words.DocumentBuilder(oDocument);

Aspose.Words.PageSetup oPageSetup = oDocBuilder.PageSetup

oPageSetup.BottomMargin="0.05"

i think here margin is making the text in first page overlap with footer at the bottom......

Hi,


Thanks for your inquiry. Could you please attach your input Word document, you’re getting this problem with here for testing? I will investigate the issue on my side and provide you more information. Moreover, please explain, are you getting this problem during rendering your document to fixed page formats e.g. to PDF?

Best Regards,

yes.i think iam getting this problem during rendering document to fixed page formats..iam not sure pls help me out.....finally in pdf iam getting overlap ....see my code below...

foreach (Paragraph para in oCurrentDoc.GetChildNodes(NodeType.Paragraph, true))

{

para.ParagraphFormat.SpaceAfterAuto = false;

para.ParagraphFormat.SpaceAfter = 0;

}

oCurrentDoc.FirstSection.HeadersFooters.LinkToPrevious(false);

oCurrentDoc.FirstSection.PageSetup.PageWidth = tempDoc.LastSection.PageSetup.PageWidth;

oCurrentDoc.FirstSection.PageSetup.PageHeight = tempDoc.LastSection.PageSetup.PageHeight;

oCurrentDoc.FirstSection.PageSetup.Orientation = tempDoc.LastSection.PageSetup.Orientation;

if (htmlcontent)

{

oDocBuilder = new Aspose.Words.DocumentBuilder(oDocument);

Aspose.Words.PageSetup oPageSetup = oDocBuilder.PageSetup;

oPageSetup.TopMargin = 0.5

oPageSetup.BottomMargin = 0.5

oPageSetup.LeftMargin = 0.55

oPageSetup.RightMargin = 0.55

HeaderFooter oPrimaryHeader = oDocument.FirstSection.HeadersFooters[HeaderFooterType.HeaderPrimary];

if (oPrimaryHeader == null || oPrimaryHeader.ToTxt().Trim() == "")

{

oPageSetup.HeaderDistance = 0.9

oPageSetup.FooterDistance = 0.9

}

else

{

oPageSetup.HeaderDistance = 0.9

oPageSetup.FooterDistance = 0.9

}

}

oDestDoc.AppendDocument(oCurrentDoc, ImportFormatMode.KeepSourceFormatting);

Hi,


Thanks for the additional information. But, could you please also attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

Best Regards,