我需要转换word文档为PDF。我使用spire.doc也是为了同样的目的。除了一个之外,一切都很好。我有一个在Word文档中定义的标题部分,转换后在PDF中丢失。有人能帮我解决这个问题吗?
谢谢
发布于 2015-07-24 14:48:10
你有没有试过这个:
Section section = document.Sections[0];
HeaderFooter header = section.HeadersFooters.Header;
Paragraph HParagraph = header.AddParagraph();
TextRange HText = HParagraph.AppendText("Spire.Doc for .NET");
//Set Header Text Format
HText.CharacterFormat.FontName = "Algerian";
HText.CharacterFormat.FontSize = 15;
HText.CharacterFormat.TextColor = Color.RoyalBlue;
//Set Header Paragraph Format
HParagraph.Format.HorizontalAlignment = HorizontalAlignment.Left;
HParagraph.Format.Borders.Bottom.BorderType=BorderStyle.ThickThinMediumGap;
HParagraph.Format.Borders.Bottom.Space = 0.05f;
HParagraph.Format.Borders.Bottom.Color = Color.DarkGray;来自here的说明
https://stackoverflow.com/questions/31603806
复制相似问题