PDF Certification signature: View initial revision - pdf

I have a pdf document with multiple signature fields. The first field is signed with a certification signature. Whenever an approval signature is added to my document, a new revision is created and it is possible to view this specific revision in acrobat.
Is it also possible to view the original/initial version of the document? I cannot find this option in acrobat reader.
Edit: #mkl showed me the solution. I didn't find this option before, because I always used a rather old sample pdf from adobe (see screenshot).
For some reason the 'View signed version' option is not available there

[For] an approval signature [...] it is possible to view this specific revision in acrobat.
Is it also possible to view the original/initial version of the document? I cannot find this option in acrobat reader.
In your screen shot you show that the option to view the signed revision is immediately accessible from the signature panel for approval signatures but not for certification signatures.
If you right-click a signature there, though, to get its context menu, you'll find that option there for certification signatures, too:
PS: In English speaking forums it may be better to switch the language of a program to English before making a screen shot.
In a comment you say about that option that
for the sample doc I always used for evaluating, it is not available (see my edit). Do you have any idea what's different?
Your example file is not a "normal" PDF, it merely serves as a container for transporting a XFA form definition. (These piggyback XFA definitions have been deprecated in ISO 32000-2.)
When Adobe Reader (or an other XFA aware PDF viewer; there are not many) displays such a PDF, it ignores regular PDF contents completely and instead draws a form based on the attached XFA XML file.
Apparently Adobe's signature panel does not support the same features for such XFA PDFs as it does for "normal" PDFs.

Related

How to display custom content in protected PDF files?

When a PDF document is protected with a security policy from Adobe LiveCycle ES or Adobe AEM Forms, it can only be opened by Adobe Reader. Here's what it looks like when you try to open it in another PDF viewer.
Microsoft Edge:
Firefox (internally uses PDF.js):
But I have seen secured PDF documents that in other viewers show customised instructions to download and install Adobe Reader. Obviously there is a way to add unprotected content to protected PDF files, that other PDF viewers will display. How can I do it?
Here's an example of a PDF file I'm talking about.
When opened in Adobe Reader:
When opened in Firefox:
I also posted this question on Adobe forums, and someone replied with the correct answer there. AEM Forms has a feature that allows to add cover page to a policy-protected document: https://help.adobe.com/en_US/AEMForms/6.1/RMHelp/WS2d2a17056e219198-31ba356e14172797744-8000.html
I believe the only way to do what you are asking would be to supply the 'custom content' during initial authoring of the PDF with Adobe LiveCycle ES for instance.
(How this is accomplished may be similar to how it works for dynamic XFA content where the page contains some content that non-XFA compliant readers can fallback on to display instead of just erring out.)
But I think the only way to add such content to an existing PDF using non-Adobe software would involve violating the Rights Managment policy the author intended, which is not something you want to do.

How to check the genuineness of a PDF file [duplicate]

I want to insert blank page at end of the digitally PDF using itext library.and my confusion is adding pages will invalidate the existing signatures?
Thank you.
To put Joeri's answer into context, have a look at the Adobe technical white paper Adobe Acrobat 9 Digital Signatures, Changes and Improvements, especially its section "Allowed and disallowed changes." Here Adobe clarifies the allowed changes (as seen by Acrobat 9 and up) that can be made to a certified or signed document without invalidating the signatures applied to the document.
Allowed actions for certified documents
Certified with no changes allowed
Allowed
No changes allowed
Disallowed
Digitally signing
Supplying form field values
Adding or editing annotations
Adding form fields
Changing page content
Certified with form fill-in and digital signatures allowed
Allowed
Supplying form field values
Digitally signing
Disallowed
Adding or editing annotations
Adding form fields
Changing page content
Certified with annotations, form fill-in, and digital signatures, allowed
Allowed
Adding or editing annotations
Supplying form field values
Digitally signing
Disallowed
Adding form fields
Changing page content
Allowed actions for signed but uncertified documents
Allowed
Adding signature fields (see Limitations on adding signature fields to signed but uncertified documents)
Adding or editing annotations
Supplying form field values
Digitally signing
Disallowed
Adding form fields other than signature fields
Changing page content
As you see "Changing page content" always is in the "Disallowed" category. As adding a page changes page content — afterwards there is at least a white page where there used to be nothing —, this is not allowed.
(Even though not explicitly mentioned here, instantiating page templates most likely also is allowed whenever form fill-ins are allowed as that would conform to the PDF standard, cf. ISO 32000-1 section 12.8.2.2.2. But making use of such page templates would at least require the document to be specially prepared before signing, and your question sounds like the documents are already signed without any such preparation...)
PS: Obviously even these allowed changes need to be added in append mode aka incremental updates. Anything else will break the signature for good. For some backgrounds see this answer.
Yes it will. The signature is based on the content that is signed, so if you change the content, the signature is no longer valid.
If you're the signer, you can just sign the document again.
Whether the pages you add are blank is irrelevant.

XFA Form conversion to PDFA-1B

We have a requirement to convert XFA Form (Adobe LiveCycle Form) to PDF/A-1B.
We're attempting to use iText 5.4.0 to parse the PDF, populate the XFA fields and then save the modified PDF back out.
All the examples I can find with iText talk about populating XFA fields into PDF.
Can I convert an XFA form ( static / dynamic and generated using LiveCycle) to PDFA 1b directly?
As need PDFA for sure and can’t live with plain PDFs. So as workaround we were thinking about converting the PDF to PDFA. Is that the right approach or we are missing something here.
You can also use Adobe LiveCycle Forms Server or PDF Generator for this purpose. It supports conversion of XFA-based forms (either static or dynamic) to either PDF/A-1b or PDF/A-1a.
Yes, you can convert XFA forms to PDF/A using iText in combination with XFA Worker. However, XFA Worker is a closed source product. So you need to be an iText customer if you want to achieve what you want.
Note that we've done exactly what you need in a project for the Ministry of Justice in Belgium. I've written the following blog post about this project: : http://lowagie.com/xfabpm
Disclaimer: I'm the CEO of the iText Software Group. This answer isn't meant to promote the product. It's a genuine answer to this question.
I was also looking for the same problem and I reached an easy solution, you can try this out:
Drag and drop it xfa format PDF into chrome, it will open in chrome browser.
You will find three options at right corner:
Rotate clockwise
Download
Print
Click on "Print"
Change destination "save as PDF" and save.
Saved PDF is flat PDF(Acroform) and can be edited easily

Is there any file pdf version which allow for automatic(or manual) addition of http source of document?

Is there any pdf version which allow for automatic(or manual) addition of http source of document ?
Scenarion of this problem from user side looks like that :
I found disire document in pdf format on web.
I save it.
In a few months I open this document and I wish to find the web page where I've found it.
It would be nice to have somewhere address of that file, of course it could be manually written in soe text file, but usually there are problems with copy+paste of pdf documents titles.
If you can modify your PDF files before sending them to the browser, then there are several places where you could put the URL where the document came from:
You could use a node in the "logical structure" tree (chapter 14 part 7 of the PDF reference document). This tree will show up in Acrobat Reader in the "Model Tree" tab.
You could add a hyperlink annotation to the top or bottom of each page, or the first page, or in a new page that you can add at the beginning or at the end of the file. I personally think this is the best approach since the link will be click-able.
You could add a button field on a page that fires a GoTo action that is linked to the source URL. Actions are explained in chapter 12 - Interactive Features of the PDF reference document.
You could add a bookmark(outline) that points to a named destination that is linked to the source URL. Named Destinations are also explained in chapter 12. This approach can also be used with just one click, and it is possible to hide the bookmarks tab if we will not use it.
You could add it as a Document property as #Bobrovsky said.
PDF allows you to add custom values to document information dictionary (see 14.3.3, "Document Information Dictionary" in PDF Reference). You might put your URL there. Adobe Reader will show custom values in Document Properties dialog on the Advanced tab.
Starting from PDF 1.4 (Acrobat 5x and later) you might add URL to XMP Metadata stream referenced from document catalog (see 14.3 Metadata in PDF Reference). Adobe Reader will show metadata properties too if you put them in Custom scheme.
Acrobat Professional could be used to add custom values or XMP metadata. Almost any PDF library that can open and save PDFs could be used for the task too.
I think there is no other places in a PDF document that you can use to store your information.
PDF Reference

How can I use revisions to avoid invalidating digital signatures in a PDF?

Using Acrobat 9, if I sign a PDF using a self-signed certificate and then edit the PDF after I sign it, Acrobat will inform me that there is a valid signature on the document but that the document also has unsigned changes. If I then sign the PDF again and look in the signature panel, it will show the first signed revision with a valid signature, notate that changes were made after the first revision was signed and then show a second signed revision with a valid signature.
I am trying to duplicate that behavior using iTextSharp. In code, I create a PDF and sign it. Then, I edit the PDF and sign it again. When I open the document in Acrobat, it shows both revisions but marks the first revision as an invalid signature because the document was altered. From what I can gather, I think iTextSharp is signing the entire document rather than just the first revision inside that document. I have set the Append parameter to true in both the PdfStamper and PdfSignatureAppearance constructors, but it does not seem to have any effect.
Since I can get the desired result using Acrobat, I am assuming I am just not using iTextSharp correctly. Can anyone shed some light on this?
You have to update the existing PDF instead of rewriting it entirely. Set the following attributes to true to enable updating.
PdfReader reader;
...
reader.Appendable = true;
Adobe does this with layers I suppose. Each revision of the PDF is probably placed in a different layer and then signed. If iText supports layers, you may be able to do it in a similar way.