Professional Web Applications Themes

Reply to Thread

Post a reply to the thread: note 33904 added to function.fdf-enum-values

Your Message

Click here to log in

 

Send Trackbacks to (Separate multiple URLs with spaces)

You may choose an icon for your message from this list

Topic Review (Newest First)

  • July 10th, 04:13 PM
    ceo@rack1.php.net

    note 33904 added to function.fdf-enum-values

    If you need something like this in a pre 4.3 version, here is a rough hack I was working on before I realized I didn't need this after all.

    preg_match('/Fields\[(.*)\]/', $raw_pdf, $field_data);
    echo "Fields: ", htmlentities($field_data[1]), "<HR>\n";
    $field_data = $field_data[1];
    $key_value = explode(">><<", $field_data);
    $key_value[0] = substr($key_value[0], 2);
    $key_value[count($key_value) - 1] = substr($key_value[count($key_value) - 1], 0, -2);
    while (list(, $kv) = each($key_value)){
    list($key, $value) = explode("/V", $kv);
    $key = substr($key, 2);
    if ($key[0] == '('){
    $key = substr($key, 1, -1);
    }
    if ($value[0] == '/'){
    $value = substr($value, 1);
    }
    if ($value[0] == '('){
    $value = substr($value, 1, -1);
    }
    echo "Key: $key Value: $value<BR>\n";
    }

    The $raw_pdf can either be the $HTTP_RAW_POST_DATA before you write a submitted PDF, or it can just be the raw PDF data you would read from a PDF using, say:
    $raw_pdf = implode("", file("/path/to/your/fdf/whatever.pdf"));

    You'll probably need to tweak this to do something more interesting than just printing the stuff.

    Hmmmm. Think they'll throw me in jail for this post? Oh well.
    ----
    Manual Page -- [url]http://www.php.net/manual/en/function.fdf-enum-values.php[/url]
    Edit Note -- [url]http://master.php.net/manage/user-notes.php?action=edit+33904[/url]
    Delete Note -- [url]http://master.php.net/manage/user-notes.php?action=delete+33904&report=yes[/url]
    Reject Note -- [url]http://master.php.net/manage/user-notes.php?action=reject+33904&report=yes[/url]

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139