I created a custom concurrent program where i send the generated XML data as an output to the program.
I have an XML template attached to the program, so the template picks up the xml output and converts it to a PDF.
so ultimately when i run the concurrent program, the output is a PDF file. This way it is easy for the user to just run a program and get a PDF file.
Now the generated XML data is from an oracle seeded program and it is a BLOB.
I am converting it to a CLOB so that i can write it to the output. if the CLOB doesnt exceed 32K bytes, i have no issues writing it to the output.
But since we cannot write more than 32K bytes, i an using a substr to write chunks of the CLOB for every 30,000 bytes.
since it is chunking at every 30,000 bytes the next 30,000 bytes are coming in the next line and XML publisher is throwing an error with invalid character.
Any idea how i can overcome this?
Either i write the whole 33000+ bytes in one line to the fnd output or try to remove the line breaks from the xml data.
I tried the fnd_file.put and it did not work either. the maximum buffer size is 32K according to the doc and it cannot write more than that in a single line.
In my code, i changed the chunk limit to 20,000 and the fnd_file.put worked for 25,000 size xml data - it put every chunk in one line.
But it is not writing for data greater than 32K in one line. :-(
Any other ideas?