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ëZŠZ'"y¢w«·žJ©¦)àjwE­çûa¶Úÿ
0²)â×…Ê&ÿ?ÈHÞ&«¶¸ë?÷]<¯o9‰7±¶«ž²ØžÉŠX§‚X¬¶$ÞÆÚzËb¢{%ŠËl²‹«qçè®§zØm¶›?þX¬¶Ë(º·~Šàzw­þX¬¶ÏåŠËbú?Š×¶«ž²Øž

Reply via email to