We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Doc to Html Conversion - Issue with CHECK BOX/CHECKLIST - DATE PICKERS

Team,


We are using ASPOSE WORDS.net to convert Doc to Html with below code:

C# Implementation :



Aspose.Words.License license = new Aspose.Words.License();

license.SetLicense(“Aspose.Words.lic”);



Aspose.Words.Document doc = new Aspose.Words.Document(filePath
+ fileName);

HtmlSaveOptions options = new
HtmlSaveOptions(SaveFormat.Html);

options.ExportTextInputFormFieldAsText = false;

options.ExportDropDownFormFieldAsText = false;

options.CssStyleSheetType =
CssStyleSheetType.Inline;

options.ExportPageSetup = true;

options.ExportListLabels =
ExportListLabels.ByHtmlTags;



options.ExportPageSetup = true;

options.ExportHeadersFootersMode =
ExportHeadersFootersMode.FirstPageHeaderFooterPerSection;

options.SaveFormat = SaveFormat.Html;

options.ImagesFolderAlias =
System.Configuration.ConfigurationManager.AppSettings[“ImageFileUploadPath”].ToString()
+ sessionUserID;



doc.Save(filePath + Path.GetFileNameWithoutExtension(filePath +
fileName) + “.htm”, options);



But the generated html has no check
Boxes in the converted html instead showing them as
Question Marks(?) . And Date Picker in the second document is not binding since it is converted as a plain text .

Please guide us . Look forward your reply

Hi Natalie,


Thanks for your inquiry. After an initial test with Aspose.Words 16.8.0, I was unable to reproduce this issue on my side (see attachment). I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.
http://www.aspose.com/downloads/words/net

Best regards,

Hi Awais Hafeez,


Thanks replying.

FYI ,we are currently using the latest version of Aspose.Words for .NET 16.8.0.

The Problem here is with generated characters in Business Trip Checklist.docx like;

☒ and ☐

for checkbox as selected and checkbox as unselected instead actual html checkbox element while converting to html from DocX.

AND <span style=“color: white; font-family: “Tw Cen MT”, sans-serif; font-size: 16pt;”>[Pick the date]

‘Pick the Date’ for Calendar to select the date is not binding in the generated html as to select the date in Business Report.docx

Please guide us to properly convert DocX to Html .

Thanks in advance.


Hi Natalie,


Thanks for your inquiry. First one seems not an issue with Aspose.Words 16.10.0. To adjust your browser’s encoding settings, just follow the browser-specific steps below.

Chrome

  1. Click the Chrome menu on the browser toolbar.
  2. Select “Tools”.
  3. Select “Encoding”.
  4. Pick one “Unicode (UTF-8)” from the menu of encodings

Firefox

  1. Select “View” from the top of your browser window.
  2. Select "Character Encoding."
  3. Select “Unicode (UTF-8)” from the dropdown menu.

Internet Explorer

  1. Navigate to the page you’re having trouble viewing.
  2. Right-click on the page.
  3. Mouse over "Encoding."
  4. In the expanded menu, select "Unicode (UTF-8)."

Hope, this helps.

Secondly, Aspose.Words mimics the behavior of MS Word 2016. You can convert this document to Html using MS Word 2016 and observe that “Pick the Date” is exported as plain text in Html.

Best regards,

Hi Awais Hafeez,


Thanks replying.

The problem here is the generated html for Checkbox is like below:


instead usual html checkbox element like below:


Secondly what will be the solution if i want to use Aspose Words.net to convert Docx to html to get the control for "Pick the Date"

Please guide us on the above.

Thanks in advance.

Hi Natalie,


Thanks for your inquiry.

Natalie:
The problem here is the generated html for Checkbox is like below:


instead usual html checkbox element like below:

We have logged this requirement in our issue tracking system as WORDSNET-14318. Our product team will further look into the details of this problem and we will keep you updated on the status of this issue. We apologize for your inconvenience.

Natalie:
Secondly what will be the solution if i want to use Aspose Words.net to convert Docx to html to get the control for "Pick the Date"
We are in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,

Hello Awais Hafeez,


Is there any update on the previous requested ? Waiting for your update in completing the dependent functionality in our system.

Thanks in advance.
Hi Natalie,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. Our product team has completed the analysis of WORDSNET-14318 and the root cause has been identified. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Regarding export of "Pick the Date" control, we are in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,

Hello Awais Hafeez,


Is there any update on the previous requested ? Awaiting for a solution for the requested issue.

Thanks in advance.
Hi Natalie,

Thanks for your inquiry. Unfortunately, your issues are not resolved yet. Our product team has completed the initial analysis of these issues (WORDSNET-14318 and WORDSNET-14354). We will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Best regards,

Hi,


Thanks for your inquiry. Unfortunately, these issues are not resolved yet. We will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Regarding WORDSNET-14354, unfortunately there isn’t a calendar control in native HTML.
But we have implemented HTML5 output mode on the November release, HTML5 have date input type and that shows calendar popup.
But it is not supported in Internet Explorer 10 and earlier versions.
So, that works on HTML5 only. e.g.

<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>  Date:
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>  
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>

Best regards,

Hi Awais Hafeez,


Thanks for the reply.

But our application supports browsers: IE(>=9), Chrome, Firefox, Safari and Opera.So please provide appropriate solution accordingly for WORDSNET-14318 and WORDSNET-14354

Look forward your reply.

Hi Natalie,


Thanks for your inquiry. We have passed your concern to our product team and will keep you posted on any further updates.

Best regards,

Hi Awais Hafeez,


Thanks for the reply.

But i think you also know the fact that for each and everything we should have some estimate to FINISH, right? So please let us know the estimate on the same.
Look forward your reply.
Hi Natalie,

Thanks for your inquiry. Unfortunately, your issues are not resolved yet. We have asked the ETAs of these issues from our product team and will update you as soon as any estimates are available. We apologize for your inconvenience.

Best regards,

Hi,


I am afraid, currently we can’t provide support for third-party HTML controls and the only way to use date picker control in HTML is to use HTML5 date input type.

For checkbox HTML code will be:

<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>	
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>


For date picker HTML code will be:

<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>	
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”>

This solution won’t currently work in Internet Explorer and Firefox (works in Microsoft Edge and Chrome, possibly Internet Explorer and Firefox will add support for date input type soon).

If you want solution for Internet Explorer and Firefox, please use HTML metadata which Aspose.Words provides in DIV elements using -aw-sdt-tag and -aw-sdt-tile properties to find HTML code and replace it with your own HTML.

We can add additional metadata property -aw-sdt-type, which for date picker will have value “date”, this will make it easier for you to find needed HTML.

That is our decision and we are waiting for your further feedback on this topic. Thanks for your cooperation.

Best regards,

The issues you have found earlier (filed as WORDSNET-14318) have been fixed in this Aspose.Words for .NET 21.11 update also available on NuGet.