Ecrion Software Inc. Homepage
Forum Home Forum Home > XF Rendering Server > XSL-FO
  New Posts New Posts RSS Feed: External graphic and Forms authentication
  FAQ FAQ  Forum Search   Register Register  Login Login

External graphic and Forms authentication

 Post Reply Post Reply
Author
Message / View First Unread Post
newedge View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Nov 2008
Location: London
Posts: 6
Post Options Post Options   Quote newedge Quote  Post ReplyReply Direct Link To This Post Topic: External graphic and Forms authentication
    Posted: 27 Nov 2008 at 7:00am

Hi

I am using the following line of code to access an image from our db which works fine through the browser but when the pdf is created I have no image:

<fo:external-graphic src="http://localhost/research/usr_int/img/img_get.ashx?img_id=1261" width="250pt" height="250pt" content-height="scale-to-fit" content-width="scale-to-fit" scaling="uniform" content-type="image/pjpeg" />

The folder it is trying to access is secure so requires a login, i've tried identity impersonate but that doesn't work.   The image access has to be secure so I can't move it to a public folder to get it to work (which does work since I've tried it).

Any ideas?

regards

B
Back to Top
florinv View Drop Down
Admin Group
Admin Group


Joined: 19 May 2008
Posts: 82
Post Options Post Options   Quote florinv Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 10:19am
The reason why the access is denied is that the server is running under the System account.
You can either:
a) Grant access to the System account. This will work if the images reside on the local computer.
b) Make Ultrascale to run as a user with access rights. Just doubleclick the service and click on the Log On tab.
 
Back to Top
newedge View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Nov 2008
Location: London
Posts: 6
Post Options Post Options   Quote newedge Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jan 2009 at 7:45am
Thanks for your reply, but I think the problem still exists here, basically from what I've read I will have to use an XmlUrlResolver() which resolves calls to external urls, however, I don't think this will resolve urls which use forms authentication.  ie. The call will return a login box to the protected page.
B
Back to Top
newedge View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Nov 2008
Location: London
Posts: 6
Post Options Post Options   Quote newedge Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jan 2009 at 9:08am
ok, further findings on this external-graphic problem, this is a really useful post and it works:
 
 
I used similar image embedding:
 
<fo:external-graphic src="data:image/gif;base64,R0lGODdhwA..." content-width="scale-to-fit" scaling="uniform" content-type="image/gif"/>
 
The image renders perfectly, Ecrion seems to support embedding images in this manner and it now works.  This is a better solution to either a) storing images to file instead of database b) putting our webservice in a public web folder outside of forms authentication.
 
Ecrion any views on this?  Will image embedding be supported by your renderer in future releases?
 
thanks
 
Back to Top
gabig View Drop Down
Admin Group
Admin Group


Joined: 06 Aug 2008
Posts: 144
Post Options Post Options   Quote gabig Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jan 2009 at 9:21am
Originally posted by newedge

Ecrion any views on this?  Will image embedding be supported by your renderer in future releases?

Yes, embedding images as base64 will always be supported in our rendering software.
Back to Top
newedge View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Nov 2008
Location: London
Posts: 6
Post Options Post Options   Quote newedge Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jan 2009 at 12:06pm
Thanks for the reply, one other question, I've attempted this but it doesn't display:
 
<fo:external-graphic src="data:application/pdf;page=1;base64,JVBERi0xLjQNJeLj..." width="530pt" height="600pt" xf:filter="IgnoreClips()" content-height="scale-to-fit" content-width="scale-to-fit" scaling="uniform" content-type="application/pdf" xmlns:xf="http://www.ecrion.com/xf/1.0" />
 
Can you embed pdf documents like this? 
 
Back to Top
newedge View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Nov 2008
Location: London
Posts: 6
Post Options Post Options   Quote newedge Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jan 2009 at 8:09am
I'm using the rendering server v5.6.  Does it matter what version of the renderer I have to be able to embed pdf's using base64?
Back to Top
newedge View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Nov 2008
Location: London
Posts: 6
Post Options Post Options   Quote newedge Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jan 2009 at 7:32am
Any suggestions, anyone?
Back to Top
florinv View Drop Down
Admin Group
Admin Group


Joined: 19 May 2008
Posts: 82
Post Options Post Options   Quote florinv Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 4:54pm
Please use the latest Ultrascale engine (version 3.0.0 or later).
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz

This page was generated in 0.094 seconds.