如何使用itextsharp或pdf sharp只复制pdf文件的主体 [英] how to copy only body of pdf file using itextsharp or pdf sharp

查看:66
本文介绍了如何使用itextsharp或pdf sharp只复制pdf文件的主体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我正在开发一个名为pdf recovery的项目.在这种情况下,我只想使用itextsharp或pdfsharp将文件主体复制到另一个pdf文件中.我想在得到正文后立即解析整个文件,即

"1 0 obj< .....> endobj"

根据pdf参考.然后将整个主体复制到另一个pdf文件.
我正在使用itextsharp lib创建文件.如果pdfsharp提供此功能,我将移至该位置.还请提供有关这两个库的一些提示.

提前致谢. :)

Hello,
I am developing a project called pdf recovery. In that i want to just copy the body of file into another pdf file using itextsharp or pdfsharp. i want to parse entire file as soon as i get body i.e.

" 1 0 obj<<....>>endobj "

according to pdf reference. then copy full body to another pdf file.
I am using itextsharp lib for creating a file. if pdfsharp provides this i will move to that one. Also give some tips about both lib.

Thanks in advance. :)

推荐答案

PDF文件的主体"到底是什么意思?您是在引用PDF文件中的所有对象,页面对象及其所有子对象,还是页面内容还是其他?

我无法对iTextSharp进行评论,但是我在其中一个项目中使用了PDFSharp.它非常易于使用,并允许在对象级别使用PDF.但是,它不支持最新版本的PDF文件格式.
What do you mean exactly by the "body" of the PDF file? Are you referring to all objects in the PDF file, the page object and all of it''s child objects, just the page content, or something else?

I can''t comment on iTextSharp, but I''ve used PDFSharp in one of my projects. It was fairly easy to use and allows working with a PDF at the object level. However, it does not have support for the most recent versions of the PDF file format.


这篇关于如何使用itextsharp或pdf sharp只复制pdf文件的主体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆