I did that and it works for the properties of pdf.
But my problem is the saving name which come on
save window when you click it on top of menus in Adobe. After using the code
posted earlier when i click save it puts in the name of the file to be
saved the whole name of the servlet that generated the pdf file and query string
with a lot of params there from generation.
This string has to be the filename of pdf
saved on hard drive. So, it's not wright because it contains a lot of bad
caracters for a filename. So the system gets an error of disk full because it
can't manage to save the file with that wrong name.
That's the real issue.
If someone can help me with that
i will appreciate that.
Thank you.
----- Original Message -----
Sent: Thursday, August 26, 2004 1:09
PM
Subject: Re: [iText-questions] File SAVE
Problem
Sorry - didn't read the
question very well!
so the server
creates the pdf fine, but when you download it, the browser won't save it
properly - is that correct? If so then the directory for the servlet name is a
bad idea - my fault.
You're
probably right that the file name is too long. Why do you need to store the
servlet and query string? My idea about the PDF properties might be worth a
shot if they need preserving. I've not done it myself, but, if you look at the
PdfDocument.PdfInfo internal class, then you should be able to do this. My
understanding is that this populates the fields you get if you open a PDF in
Acrobat Reader and goto File > Document Properties > Description
I hope that helps
Kieran Metcalfe Senior Software
Developer
![]() http://www.generation10.net Office Phone Number: +44 151 255 1160 Cell Phone Number: +44
7746 383902 [EMAIL PROTECTED]
| "cristian"
<[EMAIL PROTECTED]>
26/08/2004 09:42
|
|
To
| <[EMAIL PROTECTED]>
|
|
cc
|
|
|
Subject
| Re: [iText-questions]
File SAVE Problem |
|
I am using the iText example of creating a pdf on the fly. I
don't know any other way. Please, can you show me an example? Thanks.
----- Original Message ----- From: [EMAIL PROTECTED]
To: cristian Sent: Thursday, August 26, 2004 11:35 AM Subject: Re: [iText-questions] File SAVE Problem
Can you not just keep the filename to
the fields you show in your mail?
What about having a directory for the servlet and
writing the querystring into a property of the PDF file?
Kieran Metcalfe Senior Software
Developer
![]() http://www.generation10.net Office Phone Number: +44 151 255 1160 Cell Phone Number: +44
7746 383902 [EMAIL PROTECTED]
"cristian"
<[EMAIL PROTECTED]> Sent by:
[EMAIL PROTECTED]
26/08/2004 09:18
|
|
To
| <[EMAIL PROTECTED]>
|
|
cc
|
|
|
Subject
| [iText-questions] File
SAVE Problem |
|
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.
|