P T Withington | 1 Oct 2010 16:22
Picon
Favicon
Gravatar

Re: PDF

How about having the server return a URL (in an XML response) that your app then opens in a new browser window?  Just need a little bookkeeping on the server side to match the URL with the submitted data. 

On Oct 1, 2010, at 10:00, Marco Lettere <m.lettere-FZbngtO8GYVsTGs9JXcMDQ@public.gmane.org> wrote:

Hi Henry,
with non-xml responses I mean that upon sending an XML resource, I get back from the server a PDF with no xml wrapping it.
So actually what I get is an Error: "Error ...  client could not parse XML from server " actually because the PDF is a binary and not an XML ....
M.

On 10/01/2010 03:18 PM, Henry Minsky wrote:
You want to use the POST request type, so you do not run into any data size limit.

XML can contain arbitrary data, as long as it is escaped properly, so I don't
understand what you mean by non-xml responses. Can you give an example
of the code and data that causes the problem, maybe there is a bug in the encoding
of the data into the dataset.

On Fri, Oct 1, 2010 at 8:23 AM, Marco Lettere <m.lettere-FZbngtO8GYVsTGs9JXcMDQ@public.gmane.org> wrote:
Hello all,
I have the following scenario: an OL UI filling in an XML. This XML has to be sent to the server who generates a PDF out of the content and returns this PDF to the client. The browser opens the PDF with its native capabilities (asking for saving or opening in system pdf viewer).
My question is very simple: how to do that?
I was trying to use a dataset but it doesn't seem to be able to handle non-xml responses. Right? Anyway how can I interface then with the browser?
I also tried to write a Javascript that does this via an Ajax request and the "loadJS-ing" it through lz.Browser's interface. But here I fail against the limit of characters imposed by the API.

I'm pretty out of ideas now .... any suggestions?
Thanks,
M.



--
Henry Minsky
Software Architect
hminsky-oDN+GTs16Eu/3pe1ocb+swC/G2K4zDHf@public.gmane.org




Gmane