cancel
Showing results for 
Search instead for 
Did you mean: 

Change default pdf file name

Former Member
0 Kudos

Hi,all

How can I change a default pdf file name from unknown.pdf to something else?

Regards,

Michael

Edited by: Michael Beilin on Feb 6, 2008 9:47 AM

Accepted Solutions (1)

Accepted Solutions (1)

angel_dichev
Active Participant
0 Kudos

HI Michael,

Yes you can do that,

Just do something like

IWDAttributeInfo attInfo = wdContext.currentContextElement().node().getNodeInfo().getAttribute("PdfSource");

ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();

IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;

binaryType.setFileName("TravelRequest.pdf"); // Set file name

binaryType.setMimeType(WDWebResourceType.PDF); // set the mime type

for example in the doInit() before providing the file for download

Regards, Angel

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Is there any way to achieve this within the live cycle designer?..

Thanks,

lisha

former_member191062
Active Contributor
0 Kudos

Hello,

this is unfortunatelly always has the name: unkonwn.pdf

Best regards,

Dezso