cancel
Showing results for 
Search instead for 
Did you mean: 

Setting PDF format to Publication defaulted to TEXT

Former Member
0 Kudos

The following code snippet failed setting PDF format to the publication.  Everyone I set it, it defaults to TEXT.

IProcessingPublicationInfo processingPublicationInfo = (IProcessingPublicationInfo)newPublication.getDocumentProcessingInfoObject(documentID);

IFormatInfo pdfFormatInfo = processingPublicationInfo.getFormatInfos().add();

pdfFormatInfo.setFormat(CeKind.FullClient, IReportFormatOptions.CeReportFormat.PDF); // Always default to TEXT when viewing in InfoView as well as when the report runs.  It works nicely with EXCEL.  Is this a bug in BO 3.1

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

What source document are you using in the publication.

From the above code snipet it looks like you have a deski(desktop intelligence) artifact.

Below is the line of concern for me

pdfFormatInfo.setFormat(CeKind.FullClient, IReportFormatOptions.CeReportFormat.PDF);

Cekind.FullClient is for Deski documents.

IReportFormatOptions.CeReportFormat.PDF is used to set format options for a crystal report.

Use instead IFullClientFormatOptions.CeFullClientFormat.PDF

Also you have mentioned that you are able to observe the behaviour from Infoview as well, is the publication created using SDK?

What happens if you create a publication from CMC/Infoview rather than SDK. Do you still encounter the issue?

-Prithvi

Former Member
0 Kudos

Hi Prithvi,

Your answer helps me getting that to set the PDF correctly from SDK.  I can see the result in CMC InfoView.  However, I have some follow-up questions if you don't mind.

1) How can I set multiple formats (EXCEL + PDF) at the same time?  I know you can do this in CMC InfoView, but can I achieve the same in SKD?

2) My earlier sample showed I am using FullClient, if I use Webi, will I change it to

IWebiFormatOptions.CeWebiFormat.PDF?

3) I am creating a brand new publication and adding source document to it, when I need to retrieve IProcessingPublicationInfo, do I retrieve it from:

 

A) IProcessingPublicationInfo processingPublicationInfo = (IProcessingPublicationInfo)newPublication.getDocumentProcessingInfoObject(documentID); ?

or

 

B) IProcessingPublicationInfo processingPublicationInfo = (IProcessingPublicationInfo)enterpriseSession.getPluginManager().getPluginInterface(CeKind.FullClient, IPluginMgr.Type.DESKTOP);

If I use A, I will get a null IProcessingPublicationInfo because my newPublication does not have any properties in properties bag to return.  In order for me to get passed that, I have to transfer the properties from document to publication as follows:

 

IProperties properties = document.getProcessingInfo().properties();

newPublication.setDocumentProcessingInfo(documentID, document.getKind(), properties);

Do you see this is feasible to create publication for bursting (dynamic recipients)?

Thanks again for your help.

Answers (0)