cancel
Showing results for 
Search instead for 
Did you mean: 

Get Document Outpu Format in Publication

Former Member
0 Kudos

Hi There,

I am currently writing a small java program that prints some info about publications.

I am looping through all documents of the publication and printing out some info as well. I would like to know if it is possible to get the output format for each document, as seen in the screenshot.

best regards, and many thanks four your help

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

You'll have to dig into the properties list for this.  I used QueryBuilder to look at the properties of a publication to figure out where this is.  The information can be found using something like the following:

IInfoObject.getProcessingInfo().properties().getProperties("SI_PROCESSINFO_PER_DOC") will get you a set of properties for each document in the publication.  Iterate through this list something like this:

IProperties docProcessInfos = myInfoObject.getProcessingInfo().properties().getProperties("SI_PROCESSINFO_PER_DOC");

Integer docCount = docProcess.getInt("SI_TOTAL");

for (Integer i = 1; i <= docCount; i++){

  IProperties docInfo = docProcessInfos.getProperties(i.toString());

  IProperties docFormats = docInfo.getProperties("SI_FORMAT_INFOS");

  Integer formatCount = docFormats.getInt("SI_TOTAL");

  for (Integer j = 1; j <= docCount; j++){

    IProperties docFormat = docFormats.getProperties(j.toString());

    String format = docFormat.getString("SI_FORMAT");

    System.out.print(format);

  }

}

You'll probably want to translate the information from SI_FORMAT into something more meaningful.  Here's a list of the values of SI_FORMAT and what they mean:

u2fcr:0          Crystal

u2fcr:2          Crystal (RPTR)

crxf_xls:9      Excel (97-2003)

crxf_xls:10    Excel Data Only (97-2003)

crxf_xls:11    Excel Workbook (97-2003)

u2fwordw:0   Microsoft Word

crxf_pdf:0      PDF

crxf_rtf:0        RTF

u2ftext:0        Plain Text

u2ftext:2        Paginated Text

u2ftext:1        Tab Separated Text

u2fsepv:3      CSV

u2fxml2:0      XML

crxf_html:4    HTML

-Dell


Former Member
0 Kudos

Many thanks for you help.

This was exactly the code I was looking for, it works perfectly in my app.

Very much appreciated!

Best Rergards.

Answers (0)