Free Support Forum - aspose.com

Fwd: [Saaspose Support] Re: Execute Template feature with scaled images does not provide results

This is a follow-up to your previous request #89 “Execute Template feature wi…”

Thanks for your email

Please see notes from my developer below

Regards
Stephen Wray
Director

Steve@csbb.com.au
www.csbb.com.au
Ph: 61 2 9793 2345 Fax: 61 2 9708 3694

Warning:This email and any attached file is private and confidential. This
email and attachments are intended for the named recipient(s) only. If you
are not the intended recipient, telephone Cornerstone and promptly delete
this email and any attachments. This email and any attached file are not
guaranteed to be free from viruses, trojans or malicious code. Cornerstone
accept no liability for loss or damage resulting from viewing this email or
any attached file.

Please consider the environment before printing this e-mail notice.

Begin forwarded message:

From: “Dhaval” dhaval.patel@tatvasoft.com
Date: January 9, 2013 9:48:03 PM GMT+11:00
To: “Stephen Wray” sales@csbb.com.au
Subject: Fw: Fwd: [Saaspose Support] Re: Execute Template feature with
scaled images does not provide results

FYI

---------- Forwarded message ----------
From: Shahzad Latif notifications-support@saaspose.zendesk.com
Date: Mon, Dec 10, 2012 at 12:27 PM
Subject: [Saaspose Support] Re: Execute Template feature with scaled images
does not provide results
To: expert devexpert111@gmail.com

**
##- Please type your reply above this line -##

Your request (#89 https://saaspose.zendesk.com/tickets/89) has been
solved. To reopen this request, reply to this email or click the link below:
http://saaspose.zendesk.com/tickets/89
[image: Shahzad Latif]

Shahzad Latif (Saaspose Support)

Dec 10 06:57 (GMT)

Hi,

Did the last suggestion from our support team work for you? Are you good to
move forward with Saaspose APIs? If you find any further questions or need
assistance, please do let us know. We’ll be glad to help you.

Thanks & Regards
Shahzad Latif
Saaspose Support Team.
[image: Support]

Support (Saaspose Support)

Nov 26 11:46 (GMT)

Hi,

You cannot use local path; you need to upload the image on Saaspose storage
and provide the path. If image uploaded at the root folder, you can use
mail_icon.png’ and if the image is uploaded to a specific
folder e.g. ‘Folder1’ then you can use ‘Folder1\mail_icon.png’.

Please follow these guidelines and let us know if you still find any issue.

Best Regards,
Muhammad Ijaz
Support Developer, Saaspose Sialkot Team
http://www.saaspose.com
[image: expert]

expert

Nov 26 07:08 (GMT)

Product: Saaspose.Words
Url:
http://saaspose.com/docs/display/words/Execute+Mail+Merge+Template+(PHP+SDK)http://saaspose.com/docs/display/words/Execute+Mail+Merge+Template+(PHP+SDK)

<?xml version="1.0" encoding="UTF-8" ?> - hello

YOU HI
D:\Projects\AppServ\www\csbbdemo\mail_icon.png

{{#foreach Address}} Address: {{Street}} {{Suburb}} {{City}} {{Image:Img}}
{{/foreach Address}}

Error details: “Path ‘D:\Projects\AppServ\www\csbbdemo\mail_icon.png’
is incorrect. Only absolute paths are allowed.”

Please reply me ASAP


Submitted from: http://saaspose.com/
This email is a service from Saaspose Support.
Message-Id:VSZDA4Q6_50c587f272795_5722188c27c97782f4_sprut

Hi,

I can see scaled image at my end. Please try attached document, image and XML with the following code at your end.

SaasposeApp::$AppSID = "7781c7b2-******-80";
SaasposeApp::$AppKey = "89**************";
SaasposeApp::$OutPutLocation = getcwd() . "\\Output\\";
$mainDocumentFile = getcwd() . "\\Input\\ExecuteTemplate.docx";

$mainDocument = basename($mainDocumentFile);
$xml = simplexml_load_file(getcwd() . "\\Input\\ExecuteTemplate.xml");

//upload main document
echo "Uploading main document...
";
$folder = new Folder();
$folder->UploadFile($mainDocumentFile, "");
$folder->UploadFile(getcwd() . "\\Input\\p2.jpg", "folder1");
echo "Main document uploaded
";

echo "Executing template...
";
//create WordMailMerge object
$doc = new WordMailMerge();

$result = $doc->ExecuteTemplate($mainDocument, $xml->asXML(), "");

Can you please share your document, image, XML and source code for further analysis?

Best Regards,
Muhammad Ijaz
Support Developer, Saaspose Sialkot Team
http://www.saaspose.com

Thanks for good support
and fast respose as well.