pdf-annotations

How can I export the stamp annotation from image to an image file?

痴心易碎 提交于 2021-02-11 14:49:27
问题 How can I export the “stamp annotation from image” to an image file? I have a pdf which contains stamp annotions (in fact it's an image), I want to export all these kinds of images to file and get the x/y position. I am new to pdf. Any idea or code will be appreciated. [--- Edited on 2019/08/08 ---] private void btnExtractAnnotaion_Click(object sender, EventArgs e) { PdfReader reader = new PdfReader(this.txtPdf.Text); PdfDictionary pageDict = reader.GetPageN(reader.NumberOfPages); PdfArray

Multiline markup annotations with iText

陌路散爱 提交于 2019-12-25 07:25:14
问题 I want to highlight a text passage in a PDF document using iText. This passage can also span across several lines, so the highlighted region is not necessarily one rectangle. But to the PdfAnnotation.createMarkup(...) methods I can only pass or describe one rectangle and also the PDF reference only allows for four QuadPoints to describe the region. I would be very happy if I could achieve this with one single annotation. I know that this is possible, because I have seen documents with multi

How do I mark/unmark, write as Accepted/Rejected/Cancelled a text annotation using iTextSharp C#

99封情书 提交于 2019-12-24 05:54:44
问题 I'm working with iTextSharp on Visual Studio. I created a Pdfannotation like that: PdfAnnotation annotation = PdfAnnotation.CreateText(stamper.Writer, rect, "Author", "I write my text", true, "New Paragraph"); stamper.AddAnnotation(annotation, 1); So my annotation contents a text "I write my text". When I go on Adobe Acrobat Reader to open my pdf, and when I click on the button "Comment" to see all the comments I wrote on my pdf, I see my comment and near to my comment "I write my text", I

How to Merge PDF file with Annotation

纵然是瞬间 提交于 2019-12-23 12:33:30
问题 i used this link 's code to merge pdf file ,pdf merge sucessfully with loss of annotation i want to merge pdf with annotattion i checked following link: How to Merge Multiple PDF Files Into One PDF Merge 2 pdf files in iOS any other method to merge pdf file with annotation Please Help me 回答1: For adding annotations to a PDF document I suggest you use this library which provides a sample code of PSPDFKIT. Also please follow this link which has loads of methods and libraries to add annotations

Displaying pdf files using the PDFKit interface

岁酱吖の 提交于 2019-12-12 19:13:02
问题 I am working on a Mac OS 10.12, and have an application to display pdf files using the PDFKit interface. But I encountered the following issues Set pdf document to PDFView, in original OS,e.g. OS10.11 , there will invoke PDFView->drawPage() function, but in OS10.12,the function is not invoked; PDFView can't draw pdf annotation in OS10.12; Solution to the above will be appreciated 回答1: I reckon this is either a straight out bug or an as yet undocumented API change. I logged this as a bug

iOS PDFKit: make Text Widget PDFAnnotation readonly

心不动则不痛 提交于 2019-12-10 19:08:57
问题 I would like to make the Text Widget PDFAnnotation readonly. I tried to set the isReadOnly flag to true , but it doesn't seem to make any difference. The user is still able to edit the annotation after tapping it. 回答1: It seems to be a bug/oversight that PDFKit doesn't honor the isReadOnly attribute on annotations. However I was able to work around this by adding a blank annotation over other annotations in the document. I added a makeReadOnly() extension to PDF document that does this for

iText duplicates /Popup annotations when copying pages

坚强是说给别人听的谎言 提交于 2019-12-06 13:44:52
问题 When using the following code to copy annotated pages, iText 7.1.0 duplicates the /Popup annotation, the only difference between the "original" and the duplicate being that one has a /Parent entry and the other doesn't. Unfortunately, the one without the missing /Parent is registered in the /Annots list of the /Page dictionary. How can I make iText not duplicate the annotations or at least register the one with the /Parent entry? Any explanation for the odd behavior? import com.itextpdf

iText duplicates /Popup annotations when copying pages

那年仲夏 提交于 2019-12-04 18:52:04
When using the following code to copy annotated pages, iText 7.1.0 duplicates the /Popup annotation, the only difference between the "original" and the duplicate being that one has a /Parent entry and the other doesn't. Unfortunately, the one without the missing /Parent is registered in the /Annots list of the /Page dictionary. How can I make iText not duplicate the annotations or at least register the one with the /Parent entry? Any explanation for the odd behavior? import com.itextpdf.kernel.pdf.*; import java.io.IOException; public class CopyPdfTest { public static void main(String[] args)

iText - clickable image should open ms word attachment

纵饮孤独 提交于 2019-12-02 05:00:53
问题 How can I make an image clickable so the attached ms word document opens? I have some PDFs here where there are some images (ms word icon with the ms word file name beneath the icon) which open the attached ms word document by clicking on the images and I wondered how can I do this with the iText library. I can add the images and attach the ms word documents but I haven't figured out how I can apply somwthing like an action (GoToE seems only available for PDF attachments) or a link? 回答1:

Add pdf annotation with PDF Kit in OS 10.12

半腔热情 提交于 2019-12-01 08:42:20
问题 Now the latest os10.12 operating system, PDF annotation can be displayed, but now I still have a problem, I recorded coordinate information in PDFView ->mouseDragged before, and then automatically will invoke the PDFView->drawPage function, this function I will draw the NSBezierPath curve to determine the dynamic annotation bounds. but now in the process of mouseDragged has not been call the drawPage:toContext function. So I can't see the dynamic curve of adding annotation. I use the refresh