I have a pdf document, I open that with adobe acrobat reader and add comments to it, and highlight some content and save the document. When I ask itext to convert this saved pdf to pdfA, I get a pdfa document, but the markings and comments are missing. Can anyone let me know if this can be achieved in any way?
Related
I am creating a word application and in that, I Have to add a new comment on the selected text but from the custom task pane. For adding a link I use Rich Text Box and for convert HTML to OOXML I use the "org.docx4j" package in C#. This package returns OOXML format but when I tried with a hyperlink and unordered list.
Flow:
Call of ajax from office.js file to C# API with HTML body and it returns us an OOXML and add that as comment text and display proper text.
If anyone has an idea please let me know it helps me a lot.
For adding a comments on a selected text, please refer to Word JS API Range.InsertOoxml().
As for adding comments as a link, there is no workaround till now. Please make sure to add your request or vote for an existing on in our UserVoice.
I'm reading in a PDF document with fillable fields, and using PdfStamper to fill in the form, the output of from the stamper is a read only PDF, how can make it output a PDF document with the fields filled but still fillable?
Are you using setFormFlattening(true)? If so, then the behavior is normal. Change true to false and the form will remain "fillable". Learn about the difference by reading my answer to this question: iText How to create multi-page document from a fillable template
This is the most likely reason why your form is no longer interactive: you are removing all the interactivity by flattening the form. (If that's not the case, please share your code so that we can see what is going on.)
Or... is your PDF reader-enabled? If so, use PdfStamper in append mode. Maybe you're experiencing the problem explained in the question Why do I get an error saying that "use of extended features is no longer available"?
I have created a PDF file using Acrobat Adobe 8 that contains fillable fields.
Can that be programmed with ITextSharp instead of Adobe?
Note: I am not referring to filling out the PDF with ITextSharp, instead I would like to create the fillable fields on the PDF file using ITextSharp.
Any code would be appreciated.
thank you for your time!
You can create PDFs that contain fillable fields with iText[Sharp], but they won't look as nice as Adobe Acrobat, which is a much better design tool.
By fillable fields, I'm guessing you mean a TextField. Here's a link with some simple example code from the book to get you started. Specifically, take a look at the CreatePdf() and CellLayout() methods, and the iText API if you need more information.
I am putting a single line of info to the end of first page of a PDF document by using PdfStamper class. Now I need to update that info periodically. How can I modify the text I stamped previously, is there a way for it?
Thanks.
See this post from Bruno Lowagie (the creator of iText) about PDF not being a word processor. In that post he talks about using forms instead to accomplish what you are looking for which is one route you can go down.
The second route, which I'd recommend, is just having two PDFs. Have your base PDF that you open, write to and save to your output PDF. When you need to update the PDF, delete the output PDF, re-open the base PDF, write your new text and save it to the output PDF again. This accomplishes your goals without having to edit anything.
How can I extract the first paragraph of a PDF document using Perl's CAM::PDF?
print CAM::PDF->new('file.pdf')->getPageText(1);
will get you all of the text from the page. But, CAM::PDF is definitely not the best tool for this particular job (I'm the author). I added text extraction as a whim just to see if I could do it.
Plain PDF really is not a markup language. Text is drawn at specific locations. There is something called Tagged PDF and if your documents are tagged, your job might be easier.
I would be inclined to run the documents through a PDF to text translator and grab the first chunk of text out of that if text is stored as text in your PDF and not images.