iTextSharp z-index [英] iTextSharp z-index

查看:146
本文介绍了iTextSharp z-index的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用itextSharp在pdf文档中添加anotations。

I'm using itextSharp to add anotations in a pdf document.

我有一个pdf文档已经包含一个保存在其中的图像,它是一个标记。

I have a pdf document that already contains an image saved in it, it's a stamp.

所以我在邮票上的这个pdf上画了一些笔画,当我在WPF中绘制它们时一切都很好但是当我使用iTextSharp通过电子邮件发送pdf进行转换时我绘制的线现在在邮票下方。

So I draw some stroke on this pdf in the stamp and everything is fine when I draw them in my WPF but when I send the pdf by email using iTextSharp for the conversion the line I drawed is now below the stamp.

我如何解决这个问题?

谢谢

推荐答案

您发布的回答(顺便说一下,更多的是编辑你的问题来包含那些数据)解释了这个问题。

The explanation you posted as an answer (BTW, more apropos would have been to edit your question to contain that data) explains the issue.

有两种主要类型的对象可见PDF页面:

There are two principal types of objects visible on a PDF page:


  1. PDF页面内容;

  2. 与页面关联的注释。

如果完全显示注释,则注释总是显示在页面内容上方。

The annotations are always displayed above the page content if they are displayed at all.

在您的情况下,您将图像添加到PDF页面内容(使用OverContent或UnderContent仅更改相关的位置您添加的其他PDF页面内容材料)。另一方面,印章最有可能通过注释来实现。因此,图章注释总是高于你的添加。

In your case you add the image to the PDF page content (using OverContent or UnderContent only changes where in relation to other PDF page content material your additions appear). The stamp, on the other hand, most likely is realized by means of an annotation. Thus, the stamp annotation always is above your additions.

如果你想让你的附加物出现在图章上方,你要么必须添加你的附加作为某种注释或者,或者你必须在添加你的东西之前将标记注释压平到页面内容中。

If you want to have your additions appear above the stamp, you either have to add your additions as some kind of annotation, too, or you have to flatten the stamp annotation into the page content before adding your stuff.

这些变量哪个更好,取决于你的要求。是否有任何要求迫使邮票保留邮票注释?是否有任何要求强制您的添加内容仍然是内容的一部分?请详细说明您的要求。由于内容和注释在显示或打印时具有一些不同的属性,请说明所有要求。

Which of these varients is better, depends on the requirements you have. Are there any requirements forcing the stamp to remain a stamp annotation? Are there any requirements forcing your additions to remain part of the content? Please elaborate your requirements. As content and annotations have some different properties when displayed or printed, please state all requirements.

此外,请提供样本文件。

And furthermore, please supply sample documents.

这篇关于iTextSharp z-index的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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