Start a Conversation

Unsolved

This post is more than 5 years old

800

October 16th, 2013 01:00

how to upload any format file and store as pdf

I want to upload a file and storing as pdf.

in jsp page I have write :

in java action page :

IDfSysObject annexObj = (IDfSysObject) session.newObject("enotesheet_annexure");

annexObj.setString("annex_desc", value);

  annexObj.setString("file_id", file_id);

  // FileBrowse

  FileBrowse fileBrowse = (FileBrowse) getControl("browse",FileBrowse.class);

  String fileName = fileBrowse.getValue();

  // getting the file name

  String fileNames[] = fileName.split("\\\\");

  int len = fileNames.length - 1;

  int a = fileNames[len].indexOf(".");

  String browsedFileName = fileNames[len].substring(0, a);

  annexObj.setObjectName(browsedFileName);

  annexObj.setString("a_content_type","pdf");

  annexObj.setContentType("pdf");

  annexObj.setFile(fileBrowse.getValue());

  annexObj.link("/ENotesheet" + "/" + file_id + "/Annexures");

  annexObj.save();

it is not converting  any file format to another format . How can we achieve it . I am new in documentum.

October 16th, 2013 01:00

thank u for answering. But  i did't able to file out where I will convert . can FileBrowse object give me the content of the file ? or  return file object ?

October 16th, 2013 01:00

The file you upload is storead as it is. If you want to convert it to another format you have to convert it by using another program (either CTS or another third-party tool) after it is uploaded.

377 Posts

October 16th, 2013 10:00

Please move this question as-is (no need to recreate) to the proper forum for maximum visibility. 

You can do so by selecting "Move" under ACTIONS along the upper-right.  Then search for and select: "Documentum Support Forum".

For further guidance on engaging with the communities for Documentum and related products, please refer to the IIG Communities Getting Started Guide.

No Events found!

Top