Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Change default pdf file name

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

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question