You might want to use URI.toASCIIString. Be sure to escape the /, ?, and & characters.
Youssef Eldakar
Bibliotheca Alexandrina
-----Original Message-----
From: cristian [mailto:[EMAIL PROTECTED]
Sent: Thu 8/26/2004 11:37 AM
To: [EMAIL PROTECTED]
Cc:
Subject: [iText-questions] Help
Hi!
I am using iText to create a pdf in a web browser. After the pdf creation i am
trying to save it on hard drive but i cant't. It says that the hard is full which is
not true. I am using this part of code:
StringBuffer sbFilename = new StringBuffer();
sbFilename.append( "filename_" );
sbFilename.append( System.currentTimeMillis() );
sbFilename.append( ".pdf" );
It seams that the generated name of the file is too long and contains invalid
chars. How can I solve the problem so the name can be a short one for any type of
file. I have to say that in this moment the filename contains also the name of the
servlet that generated it and added with a query string which contains too many chars
and also invalid chars for a filename.
Thanks for your time.
Christian.
HS^µéX¬²'²Þu¼xµç!r£¬¶âqê'V§ÇtÒ¢x
PÑãèåËouÓJdJâp5CùèåË}Òj÷¹ÒßEëZZ'"y¢w«·J©¦)àjwEçûa¶Úÿ
0²)â×
Ê&ÿ?ÈHÞ&«¶¸ë?÷]<¯o97±¶«²ØÉX§X¬¶$ÞÆÚzËb¢{%Ël²«qçè®§zØm¶?þX¬¶Ë(º·~àzwþX¬¶ÏåËbú?×¶«²Ø