Hi
I’m using Visual Studio 2013, with Aspose Words 16.6.
I’m having an issue when generating documents in different formats when basing the original Words Document object on a template (.dotx) file.
The problem lies with footnotes. When I save the Document object as a docx file, everything is fine, but when I save it as a PDF, there is an excessive amount of space between the line separating footnotes from text, and the first footnote.
I have attached a zip file containing the template file, along with a docx and pdf file generated using the following code:
<pre style=“font-family: “Courier New”; font-size: 12px; background: white;”>
License lic =
new License();
lic.
SetLicense(
“Aspose.Total.lic”);
Document doc = new Document(“Report.dotx”);
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write(“This is some sample text”);
builder.InsertFootnote(FootnoteType.Footnote, “This is a footnote.”);
builder.Writeln(".");
string docxFile = “FootnoteSample.docx”;
doc.Save(docxFile);
SaveOptions options = new PdfSaveOptions
{
SaveFormat = SaveFormat.Pdf
};
string pdfFile = “FootnoteSample.pdf”;
doc.Save(pdfFile, options);
Could you have a look at this, and advise if there’s anything I can do to fix this problem?
Thanks
Chris Fairall.
Hi
Could you provide an update as to the priority and progress of this issue? It has been outstanding for almost 3 months now.
Thanks
Chris.
Thanks for your reply.
While it doesn’t solve the problem entirely, it did point me in the direction of a suitable workaround.
As I understand it, the PDF version uses the Normal style in the paragraph containing the line that separates the text of the document from the first footnote. Because my solution changed the spacing after a paragraph with the Normal style, this problem presented itself. So the workaround is to alter the Normal style to contain no spacing after the paragraph. So I created a separate style based on the Normal style and used that style in the body of the document where I was using the Normal style before, and altered that style to include the spacing.
Thanks
Chris.
Hi Chris,
It is great you were able to resolve this issue on your end. We will inform you via this thread as soon as this issue is resolved in Aspose.Words. We apologize for any inconvenience.
Best regards,
The issues you have found earlier (filed as WORDSNET-14008) have been fixed in this Aspose.Words for .NET 17.2.0 update and this Aspose.Words for Java 17.2.0 update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.