Right now we have a new need, remove the header and footer from every single page of a word document, I’ve tried this:
request_save_options_data = HtmlSaveOptionsData.new(
FileName: "#{file_name_without_extension}.html",
ImagesFolder: 'images/',
SaveFormat: 'html',
ExportHeadersFootersMode: 'None'
)
request = SaveAsRequest.new(name: file_name, save_options_data: request_save_options_data, folder: folder_name)
@words_api.save_as(request)
Using the ExportHeadersFootersMode: 'None'
but it is still saving the doc with the footers and headers.
I’ve seen we can use this Delete all HeaderFooter objects from a Word document online|Documentation
but I’m not sure how to combine both things in the same request, or if I should save the doc in aspose first, then execute the delete_headers_footers_online
and last use the save_as
to convert it to HTML.
I’m doing that on this way:
request = SaveAsRequest.new(name: file_name, save_options_data: request_save_options_data, folder: folder_name)
@words_api.delete_headers_footers_online(request)
@words_api.save_as(request)
but it shows this error ArgumentError - Incorrect request type
which is expected.
What is the correct approach to accomplish this? it is still probably that we need to use other methods to improve our ingestion process, so the headers and footers won’t be our only issue so far, we’ll probably need to play around with math formulas, images, tables, sub and super indexes, etc