Free Support Forum - aspose.com

Change PdfFileInfo on existing pdf

After create and merge some pdf Files i would like to the set the Author and some Meta Information.



This works fine as long as I save the result in a new pdf-File like:



PdfFileInfo file_info = new PdfFileInfo(old_file);

file_info.setCreator(“bla”);

file_info.setMetaInfo(“key”,“value”);

file_info.saveNewInfo(new_file);



Is there any way to save the FileInfo to the same file, without creating a new file (which means I have to copy and delete some maybe big files).



best regards

Arne



PS: And whats the right format for



file_info.setCreationDate("??:??:???")

arne411:
After create and merge some pdf Files i would like to the set the Author and some Meta Information.

This works fine as long as I save the result in a new pdf-File like:

PdfFileInfo file_info = new PdfFileInfo(old_file);
file_info.setCreator("bla");
file_info.setMetaInfo("key","value");
file_info.saveNewInfo(new_file);

Is there any way to save the FileInfo to the same file, without creating a new file (which means I have to copy and delete some maybe big files).

best regards
Arne

Hi,

Thanks for contacting support.

I am afraid you might not be able to save the updated information in input/same document. However you may consider saving the output in Stream Object. Please try using following overloaded method saveNewInfo(java.io.OutputStreamoutStream)

arne411:
PS: And whats the right format for
file_info.setCreationDate("??:??:????")</div></BLOCKQUOTE></font></div><div><font face="Arial" size="2">I am working over this query and will get back to you soon.</font></div>
arne411:
PS: And whats the right format for
file_info.setCreationDate("??:??:????")</div></BLOCKQUOTE><div>Hi,</div><div><br></div><div>Please try setting the Creation date information of PDF file using following code line.</div><div><br></div><div><span style="background-color: rgb(255, 255, 0);">info.setCreationDate("D:20121125142237");</span></div><div><br></div><div>Where 2012 is year, 11 is month, 25 is date, 14 is time (<i>time is calculated in 24 hours so it will be 02:00 PM</i>), 22 is minute and 37 is seconds value.</div><div><br></div><div>In the event of any further query, please feel free to contact. </div>