I have a requirement to convert PDF to XML/JSON to get the properties of the text, can I do that using itext?
If so, please let me know which class, that you are aware of, can do that.
I tried looking into the API but could not find any method.
Related
I am working on a prototype using iText7 for C#. The PDF I am using is an XFAForm PDF and was created in Adobe Live Cycle Designer. From my research, XFAForms do not support annotations. I was going to add an annotation to the field with a link.
I want to be able to edit the value in a field to include a URL. For example,
Name : Marc
should be:
Name : Marc https://www.google.com
I am able to modify the value in this field, but no luck adding a URL that is clickable. I have tried the following:
element.Add(new XAttribute("href", injectedURL)); element is an XElement
Injecting HTML as the new value with a link
I was thinking about reading the XML, parsing it and injecting the URL in the XML and then writing it back to the PDF, but I do not feel that is a good solution.
Has anyone been able to do this?
I am not able to find any document/tutorial/example, hence, posting it.
Can someone help point to a document which shows how to convert a POJO to XML using VTD-XML library? I looked into their API doc, but didn't find anything there.
hi im working on pdf manipulation.
my requirements are to edit the existing pdf document.
looks like there is no actual way to do it. i found out using javascript i can edit the html contents.
so now that my pdf is in uiwebview is there any way to convert pdf document to html content???
i have to do it programatically.
preferred language is objective c but its k if any suggestions in C/C++
thanks in advance
You will have to drop down to C if you want to do this. Basically you need to get hold of a CGPDFDocumentRef reference, and through that iterate each CGPDFPageRef. From the page you can get access to the CGPDFContentStreamRef.
From the content stream you can parse out the primitive data that is is PDF document. From there only a good understanding of the PDF document format can help you.
I would advice you to find a commercial tool, hire an experience contractor, or change your plan. What you have your sights on is allot of hard work.
I wanted to create a PDF with a Text Annotate. I came across the 3rd Party library called libharu. Can anybody tell me how to create a PDF with a text annotate using this library or any documentation related to it.
The libharu site has an example of annotation in C.
I am trying to read a PDF on iPhone, I got to know that we can get the info about PDF from CGPDFDocumentGetCatalog method. But, this method returns a CGPDFDictionaryRef. I have browsed through the documentation and didn't find any method to extract its Key/Values. Please help me if anybody has solution for the problem. Or you can tell if we can have any other way to extract data from PDFs.
It seems that you have to extract the names of the values first. Take a look to this site especially the allScriptsInPDFDocument method
I have just checked out the documentation and it has a load of functions for getting key value pairs. If you don't know what the keys are you can use CGPDFDictionaryApplyFunction to with an appropriate callback.
Alternatively, check out the PDF Specification for a detailed description of the catalog (section 7.7.2).