Hi carter

look at this code in pdf output page

data is an NSData condaining the PDF data!!


public void appendToResponse(WOResponse response, WOContext context)
{
super.appendToResponse(response, context);
if(data!=null) {
response.disableClientCaching();
response.removeHeadersForKey("Cahce-Control");
response.removeHeadersForKey("pragma");
response.setHeader("application/pdf","content-type");
response.setHeader("inline; attachment; filename=\"generated.pdf\"","content-disposition");
response.setHeader(Integer.toString(data.length()),"content-lenght");
response.setContent(data);
}
}




On 13/ott/06, at 15:30, Carter Wojcik wrote:

Hi All -

I have followed Chuck Hill's example for generating a
PDF in Practical WebObjects Chapter 11 XML and
WebObjects to create a WOComponent to retrieve a pdf
from my database and display it in Safari. The problem
I am having is that when the component is displayed, I
end up with a blank browser page.  But when I view the
source, I can see that the pdf is there.  My page
consists of only the component to display the pdf. 
The component contains the code that Chuck supplied in
his book (modified to use the database pdf instead of
the generated pdf).  Are there any additional
bindings/code that need to be added to correctly
display the pdf in Safari?

Thanks for all your help.

Carter

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to