The filed INCLUDETXT can not be updated correctly when calling document.updateFields

Hi Support,

When the include file has a space in the file name, and ecode the space into %20, this will cause the Document.updateFields can not work correctly for the field INCLUDETXT. Is it a defect?

In addition, Document.updateFields for INCLUDETXT field do not support TXT file format, is there any document that has a detailed list about which file formats can be supported, and which file formats can not be supported?

Thanks & regards.
Vincent

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
File f = new File("c:\test\include 1.doc");

builder.writeln("The first correct:");
// file:/c:/test/inlcude 1.doc, this can work well.
String fieldCode = "INCLUDETEXT "
" + f.toURL().toString() + "
" \* MERGEFORMAT";
builder.insertField(fieldCode, "");
builder.writeln();

builder.writeln("The second wrong:");
// file:/c:/test/inlcude%201.doc, this can not work well.
fieldCode = "INCLUDETEXT "
" + f.toURI().toString() + "
" \* MERGEFORMAT";
builder.insertField(fieldCode, "");
builder.writeln();

builder.writeln("The third wrong:");
f = new File("c:\test\include.txt");

// file:/c:/test/inlcude.txt, this format can not be supported

fieldCode = "INCLUDETEXT "
" + f.toURI().toString() + "
" \* MERGEFORMAT";

builder.insertField(fieldCode, "");

builder.writeln();

doc.updateFields();
doc.save("c:\test-out.pdf");
doc.save("c:\test-out.doc");

Hi
Thank you for reporting these problems to us. I managed to reproduce the problems on my side. Your request has been linked to the appropriate issues. You will be notified as soon as they are resolved.
Best regards,

The issue you reported is about space encoding, or can not support TXT format? Please clarification.

Thanks & regards.

Hi
Thanks for your request. I logged both issues into our defect database. We will let you know once both of them are resolved.
Best regards,

The issues you have found earlier (filed as WORDSJAVA-418) have been fixed in this .NET update and this Java update.

The issues you have found earlier (filed as WORDSNET-5383) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(21)