I'm trying to get an image working in my pdf. I can get the image working locally, however when I try to use an authenticated s3 request I'm running into issues.
First I generate a private url that looks like the following (note this will probably be expired when you look at it):
I have the above embedded in my html as follows:
It works fine when viewed in a browser, however when I try to generate a pdf I get the following (note the url is slightly different as the private s3 url is regenerated a new):
When I use a local file I do NOT get get the 3 messages between "Loading document..." and "Converting document...".
The s3 URL when copied works in curl just fine, though it must be in quotes otherwise I get an error message. The content type seems to be set correctly, etc.
Please help!
Tys von Gaza
First I generate a private url that looks like the following (note this will probably be expired when you look at it):
http://s3.amazonaws.com/development.documents.domain.com/logos/2175/iphone-icon.png?AWSAccessKeyId=137333PGACW9489NFWMDWR2&Expires=1270657888&Signature=G%2F5%2FBm%2FRMFU3J2O8NyIzdQSq%2BJU%3D
I have the above embedded in my html as follows:
<div class='logo'><img src="http://s3.amazonaws.com/development.documents.domain.com/logos/2175/iphone-icon.png?AWSAccessKeyId=137333PGACW9489NFWMDWR2&Expires=1270657888&Signature=G%2F5%2FBm%2FRMFU3J2O8NyIzdQSq%2BJU%3D" /></div>
It works fine when viewed in a browser, however when I try to generate a pdf I get the following (note the url is slightly different as the private s3 url is regenerated a new):
Wed Apr 7 10:27:52 2010: ---- begin
Wed Apr 7 10:27:55 2010: Loading document...
Wed Apr 7 10:27:55 2010: -:76: error: htmlParseEntityRef: expecting ';'
Wed Apr 7 10:27:55 2010: -:76: error: htmlParseEntityRef: expecting ';'
Wed Apr 7 10:27:56 2010: http://s3.amazonaws.com/development.documents.domain.com/logos/2175/iphone-icon_medium.png?AWSAccessKeyId=137333PGACW9489NFWMDWR2&Expires=1270657972&Signature=cWLcY0tf1PVO2Biy3q9J4VG0JWw%3D: warning: Could not load PNG file
Wed Apr 7 10:27:56 2010: Converting document...
Wed Apr 7 10:27:56 2010: finished: success
Wed Apr 7 10:27:56 2010: ---- end
When I use a local file I do NOT get get the 3 messages between "Loading document..." and "Converting document...".
The s3 URL when copied works in curl just fine, though it must be in quotes otherwise I get an error message. The content type seems to be set correctly, etc.
/tmp: curl -v "http://s3.amazonaws.com/development.documents.domain.com/logos/2175/iphone-icon.png?AWSAccessKeyId=137333PGACW9489NFWMDWR2&Expires=1270658513&Signature=nhG9o2hwh7snN7H4R90XB6b%2Ffo0%3D"
* About to connect() to s3.amazonaws.com port 80 (#0)
* Trying 207.171.183.113... connected
* Connected to s3.amazonaws.com (207.171.183.113) port 80 (#0)
> GET /development.documents.domain.com/logos/2175/iphone-icon.png?AWSAccessKeyId=137333PGACW9489NFWMDWR2&Expires=1270658513&Signature=nhG9o2hwh7snN7H4R90XB6b%2Ffo0%3D HTTP/1.1
> User-Agent: curl/7.19.6 (i386-apple-darwin10.0.0) libcurl/7.19.6 zlib/1.2.3
> Host: s3.amazonaws.com
> Accept: */*
>
< HTTP/1.1 200 OK
< x-amz-id-2: k84tnUQsb+cs6P+vOi4HezqHwQjOimoQy1lYejqFoqhshqecXAFoRp/Caz4MSTkA
< x-amz-request-id: 833990239E48734C
< Date: Wed, 07 Apr 2010 16:37:04 GMT
< Last-Modified: Wed, 07 Apr 2010 15:58:56 GMT
< ETag: "146d3264de2325f7d7e3eaa89ad630fd"
< Content-Type: image/png
< Content-Length: 2980
< Server: AmazonS3
binary gibberish...
Please help!
Tys von Gaza