Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Sep 09, 2014 6:58 pm

Hi,
We are using spire.doc to create a PDF from HTML. So far it is working good but it appears that footnotes are not supported when Spire.Doc is used to generate a PDF. The code below works fine when FileFormat is set to "Spire.Doc.FileFormat.docx" but footnotes are not created when FileFormat is changed to "Spire.Doc.FileFormat.PDF".

Code Snippet
Code: Select all
Document doc = new Document();

Section section = doc.AddSection();
section.BreakCode = SectionBreakType.NewPage;
Paragraph paragraph = section.AddParagraph();                                       
paragraph.AppendHTML(<out HMTL content>);

//Add Footnote to first section
Section sectionforFootnote = doc.Sections[0];
Paragraph para = sectionforFootnote.Paragraphs[0];

Footnote footnote = para.AppendFootnote(FootnoteType.Footnote);
TextRange text = footnote.TextBody.AddParagraph().AppendText("Check Wiki to get more information");
text.CharacterFormat.FontName = "Arial Black";
text.CharacterFormat.FontSize = 8;
text.CharacterFormat.TextColor = Color.SlateGray;

footnote.MarkerCharacterFormat.FontName = "Calibri";
footnote.MarkerCharacterFormat.FontSize = 15;
footnote.MarkerCharacterFormat.Bold = true;
footnote.MarkerCharacterFormat.TextColor = Color.DarkCyan;

MemoryStream stream = new MemoryStream();
doc.SaveToStream(stream, Spire.Doc.FileFormat.PDF);
return stream.ToArray();

akhan2003
 
Posts: 11
Joined: Tue Sep 09, 2014 6:47 pm

Wed Sep 10, 2014 1:59 am

Hello,

Thanks for your interest in our product.
Sorry that we don't support footnotes when Spire.Doc is used to generate a PDF at present.
We have added the feature into our schedule and will tell you when it is supported in the future.
Please feel free to contact us if you have any problems.

Best wishes,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc