From #1356124: XFDF generation fails if PDF-field key contains an apostrophe:

However, I am 95% sure that there is no need for this code at all. The code converts an array with PDF-field keys containing periods into a multidimensional array for generation of nested field elements in the XFDF. I believe the @name of a field element can contain the original PDF-field key with periods and it will work the same way, no need for nested elements. I don't have a PDF like that which would allow me to test this. If anyone has or can make a test PDF, I will test and simplify the code if it works.

I can create a PDF like that with LiveCycle. If we change that logic we will want to test it.

Please email me a PDF with PDF-field keys containing periods and I will test.

Comments

liam morland’s picture

Status: Active » Needs review
StatusFileSize
new1.66 KB

Here is a patch implementing the simplified XFDF generation. This needs to be tested with a PDF which has field keys containing periods.

wizonesolutions’s picture

Status: Needs review » Patch (to be ported)

Works for me with my LiveCycle test PDF, which has periods in it. Committed. Needs backport.

liam morland’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new3.22 KB

D6 version attached. xfdf.inc files are now identical in D6 and D7.

liam morland’s picture

wizonesolutions’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
wizonesolutions’s picture

Status: Needs review » Fixed

Thanks! Committed in 6874d5a.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit cbdacec on 7.x-1.x, 7.x-2.x, 7.x-2.x-tests1, 7.x-1.x-ubercartbackporttest authored by Liam Morland, committed by wizonesolutions:
    Issue #1393022: Always use PDF key as-is.