将目录从一个PDF复制到另一个PDF [英] Copy Table of Contents from one PDF to another

查看:1014
本文介绍了将目录从一个PDF复制到另一个PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能会发现它与此问题,但我没有得到任何解决方案。我的方案就像是从现有PDF创建PDF并进行一些编辑。一切正常。我的问题是我想在新创建的PDF中添加元数据,目录,书签,PDF格式的元数据。我无法理解建议的XMP格式此处。有什么办法可以直接将TOC添加到新的PDF中。
我正在使用以下功能,但它根本不起作用。

You might find it as duplicate of this Question, but I didnt get any solution there. My scenario is like I am creating a PDF from existing PDF with some edits. That all works fine. My question is I want to add metadata, table of contents, bookmarks, what ever you call that is in metadata of PDF to newly created PDF. I am not able to understand XMP format as suggested here. Is there any way I can directly add TOC to new PDF. I am using following function but it is not working at all.


CGPDFContextAddDocumentMetadata(pdfContext,contdata);

CGPDFContextAddDocumentMetadata(pdfContext, contdata);

任何人都可以建议我正确的方向来挖掘。任何第三方工具也会这样做。我试过podofo,但我没有办法在ios中移植它。

Can any one suggest me right direction to dig in. Any 3rd party tool will also do. I tried podofo but I m not getting any way for porting it in ios.

推荐答案

XMP元数据和TOC /书签是两回事。虽然可以使用CGPDF *函数读取PDF文件中的TOC,但它不能在另一个PDF文件中复制,因为CGPDF * API不允许您创建PDF对象并将其插入PDF文件中。

The XMP metadata and TOC/bookmarks are 2 different things. While the TOC in a PDF file can be read using the CGPDF* functions, it cannot be duplicated in another PDF file because the CGPDF* API does not let you create PDF objects and insert them in a PDF file.

这篇关于将目录从一个PDF复制到另一个PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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