We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Edit Radio button on PDF

I’m making the call to get all radio buttons on a PDF and if I take one and put it back on the PDF, it gives an error. I’ve worked on this for hours.

I haven’t even tried editing it before putting it back, which is what I really want to do. With text fields, I can edit the field and update it on the PDF without an error, but it’s a different call.

For both scenarios, my Client object looks basically the same, so I think this is formatted correctly and something is wrong with the API call. I could be wrong though.

Here is the PHP code:

$name = ‘full_packet_conc.pdf’;
$folder = ‘template’;
$response = $this->pdfApi->getDocumentRadioButtonFields($name, null, ‘template’);
$field = $response->getFields()->getList()[0];
$fieldName = $field->getPartialName();
$response = $this->pdfApi->putRadioButtonField($name, $fieldName, $field, ‘affiliation’, $folder);

Client object just before Curl

object (GuzzleHttp\Psr7\Request )[192 ]

private ‘method’ => string ‘PUT’ (length=3) private ‘requestTarget’ => null private ‘uri’ => object(GuzzleHttp\Psr7\Uri)[190] private ‘scheme’ => string ‘https’ (length=5) private ‘userInfo’ => string ‘’ (length=0) private ‘host’ => string ‘api.aspose.cloud’ (length=16) private ‘port’ => null private ‘path’ => string ‘/v3.0/pdf/full_packet_conc.pdf/fields/radiobutton/Have%20you%20ever%20been%20affiliated%20with%20PenFed%20Realty%20LLC%20before’ (length=127) private ‘query’ => string ‘storage=affiliation&folder=template’ (length=35) private ‘fragment’ => string ‘’ (length=0) private ‘headers’ => array (size=5) ‘Host’ => array (size=1) 0 => string ‘api.aspose.cloud’ (length=16) ‘User-Agent’ => array (size=1) 0 => string ‘aspose pdf cloud sdk’ (length=20) ‘Accept’ => array (size=1) 0 => string ‘application/json’ (length=16) ‘Content-Type’ => array (size=1) 0 => string ‘application/json’ (length=16) ‘Authorization’ => array (size=1) 0 => string ‘Bearer ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ(hidden)’… (length=906) private ‘headerNames’ => array (size=5) ‘user-agent’ => string ‘User-Agent’ (length=10) ‘accept’ => string ‘Accept’ (length=6) ‘content-type’ => string ‘Content-Type’ (length=12) ‘authorization’ => string ‘Authorization’ (length=13) ‘host’ => string ‘Host’ (length=4) private ‘protocol’ => string ‘1.1’ (length=3) private ‘stream’ => object(GuzzleHttp\Psr7\Stream)[159] private ‘stream’ => resource(13 , stream) private ‘size’ => null private ‘seekable’ => boolean true private ‘readable’ => boolean true private ‘writable’ => boolean true private ‘uri’ => string ‘php://temp’ (length=10) private ‘customMetadata’ => array (size=0) empty

Here is the error.

Fatal error: Uncaught Aspose\PDF\ApiException: [500] Server error: PUT https://api.aspose.cloud/v3.0/pdf/full_packet_conc.pdf/fields/radiobutton/Have%20you%20ever%20been%20affiliated%20with%20PenFed%20Realty%20LLC%20before?storage=affiliation&folder=template resulted in a 500 Internal Server Error response: {“RequestId”:“2dZZZZZZZZZZZZZZZZ(hidden)”,“Error”:{“Code”:“internalError”,“Message”:"Object reference not set (truncated…) in /var/www/aspose-pdf-cloud-php/src/Aspose/PDF/Api/PdfApi.php on line 109091


We are sorry for the inconvenience. We have logged a ticket(PDFCLOUD-3691) to investigate and fix your reported issue. We will keep you updated about the issue resolution progress within this thread. Meanwhile, please share your sample document with us as well.

Here is the file I was using.full_packet_conc.pdf (2.3 MB)


Thanks for sharing the input file. Definitely, it will help us investigate and fix the problem.