简体   繁体   English

我想使用字体信息作为属性值将pdf导出到xml

[英]I want to export pdf to xml with font information as attribute values

I want to export pdf to xml with font information lik font-size, font name, font-style, word spacing, letter spacing etc using any Freely available pdf libraries like PDFSharp, ItextSharp. 我想使用任何免费提供的pdf库(如PDFSharp,ItextSharp)将pdf信息导出为xml,并带有字体信息,例如字体大小,字体名称,字体样式,单词间距,字母间距等。

For example: 例如:

<p font-style="10pt", font-style="italic" letter-spacing="somevalue" word-spacing="somevalue">Paragraph text goes here</p> <p font-style =“ 10pt”,font-style =“ italic” letter-spacing =“ somevalue” word-spacing =“ somevalue”>段落文字在此处</ p>

Is it possible to do using C#? 是否可以使用C#? If possible Where can I get related information? 如果可能,我可以从哪里获得相关信息?

The open source project PDF Clown might help you. 开源项目PDF Clown可能会为您提供帮助。 Following is the url to its features page which includes text imports with formatting info. 以下是其功能页面的网址,其中包括带有格式信息的文本导入。 which you can then turn into XElement , XAttribute etc. etc. and/or finally XMLSerialize into an xml document. 然后可以将其转换为XElement,XAttribute等,等等,和/或最后将XMLSerialize转换为xml文档。

http://www.stefanochizzolini.it/en/projects/clown/features.html http://www.stefanochizzolini.it/en/projects/clown/features.html

The sourcefourge download is following: Sourcefourge下载如下:

http://sourceforge.net/projects/clown/ http://sourceforge.net/projects/clown/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM