日期:2014-05-17  浏览次数:20963 次

如何将pdf中的文件居中?需代码(iTextSharp问题)


HeaderFooter footer = new HeaderFooter(new Phrase("-- ", font), new Phrase(" --", font));  
                footer.Border = Rectangle.NO_BORDER;        // 不显示两条横线  
                footer.Alignment = Rectangle.ALIGN_CENTER;  // 让页码居中  
                document.Footer = footer; 
上面是网上知道的但是出现的问题是HeaderFooter这个类不存在在iTextSharp这个dll文件中

------解决方案--------------------
可能是你的iTextSharp这个dll的版本问题。这篇博客中第9节有提到。http://www.cnblogs.com/LifelongLearning/archive/2010/12/28/1919138.html