简体   繁体   English

使用C#将PDF转换为XPS的免费方法

[英]Free way to convert PDF to XPS with C#

Are there any free tools that I can use to convert a PDF document into an XPS document? 我可以使用任何免费工具将PDF文档转换为XPS文档吗? Although a nice programmatic API would be nice, I'm not opposed to shelling out to a command line tool to do the conversion. 尽管一个不错的编程API会很不错,但我并不反对使用命令行工具进行转换。

Thanks! 谢谢!

AbcPdf version 7 includes this funcationality, if you link back to their site you can have a free license key. AbcPdf版本7包含此功能,如果您链​​接回他们的网站,则可以拥有免费的许可证密钥。 Utilize the save method to accomplish PDF - XPS conversions. 利用save方法完成PDF-XPS转换。

XPS is exported only if the supplied path ends with ".xps", and it requires the .NET Framework 3.0. 仅当提供的路径以“ .xps”结尾且需要.NET Framework 3.0时,才导出XPS。 XPS is supported via Doc.SaveOptions.FileExtension of the Save method when saving to a stream. 保存到流时,可通过Save方法的Doc.SaveOptions.FileExtension支持XPS。 Set this property to either ".xps" or "xps" otherwise a conventional PDF output will be generated. 将此属性设置为“ .xps”或“ xps”,否则将生成常规的PDF输出。 XPS streams must have FileAccess.ReadWrite and not simply FileAccess.Write otherwise the operation will fail. XPS流必须具有FileAccess.ReadWrite,而不仅仅是FileAccess.Write,否则操作将失败。

virtual void Save(Stream stream)

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

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