Free Support Forum - aspose.com

Object of class stdClass could not be converted to string

I need to integrate Mailmerge in my application using PHP SDK

This function does not work for me
$result = $doc->ExecuteMailMerge($mainDocument, $xml->asXML());

Within ExecuteMailMerge method:
$responseStream = Utils::processCommand($signedURI, “POST”, “”, $strXML);
$json = json_decode($responseStream);

I’m getting json string as “Object of class stdClass could not be converted to string”

I’ve attached the sample documents.

Hi Suresh,

Sorry, I was unable to reproduce this issue. Can you please share your complete code including App SID and App Key?

I was able to successfully execute mail merge using your document and XML. The only problem with your document is that field names in your document do not match the field names in the XML as you can see in the attached image. This produces the output but merge fields appear in the output document without any change/mail merge.

Please change the names of merge fields in your document according to the names in XML and try again. You can also use attached document with updated field names.

Best Regards,
Muhammad Ijaz

Support Developer, Saaspose
Sialkot Team
http://www.saaspose.com

Hi Suresh,

We didn't hear anything from you regarding this issue? Is this issue resolved at your end? If not, could you please share the required information for further investigation including example code, App SID, App Key, input document etc? We'll further investigate and guide you accordingly. We're sorry for any inconvenience caused by this issue.

Thanks & Regards
Shahzad Latif
Saaspose Support Team.