Comments (4)
I believe this is caused by the code that selects the "IntenseQuote" style. If that style is not found (it appears to be renamed in the newest O365 version of the default Word template - and maybe in others), then there are two start tags added which causes the Header to break. One work around I have found is to rename the "Intense Quote" style in your Word document to "IntenseQuote" and then testing.
from html2openxml.
I did some tests and it appears that now, Word lazily instantiate the style IntenseQuote and Heading X.
Thus on an empty document or on a document that are not yet referencing these styles, the style "heading 2" is well applied but refers to an non-existing style.
We first need to ensure the styles exists or push them ourself (like for the Hyperlink or Caption).
from html2openxml.
Even with the lazy loading of the style, the current code, when "IntenseQuote" does not exist, causes both the <w:ind w:left="708" />
and <w:pStyle w:val="IntenseQuote" />
to be added in the ProcessBlockQuote
method (using two BeginTag calls). I'm not sure, but does that cause an issue because the EndTag for a blockquote is only called once in the ProcessClosingBlockQuote
method?
from html2openxml.
Oh yes, you are really right. I resolve the bug in another way but you are raising a real issue and I found that I can see the same bad behavior in the TableColumn. Which surely will fix another issue that was recently raised. Thank you, this is a very nice catch !
from html2openxml.
Related Issues (20)
- I have specified the paragraph color as black in template.docx, but the paragraph generated by H1 tag is still blue. Is there any way to set the color? HOT 1
- ParseHtml does not produce output of any visible kind
- TableGrid style is not working HOT 1
- Exception in code HtmlConverter.ProcessTag.cs:line 281 HOT 2
- Invalid document when html contains images and existing headers/footers contain images
- In-document Links with HTML anchor tag HOT 2
- ImagePrefetcher doesn't actually cache the images HOT 1
- Table CSS issue
- Regex matching Heading numbering incorrect
- HTML table isn't being displayed correctly HOT 2
- Stack empty exception when trying ApplyNumberingToHeadingParagraph
- Non integer font sizes specified with <FONT size= HOT 1
- Border width for tables is faulty
- Compatibilities Issues with .Net 7.0 HOT 3
- HtmlDocumentStyle changes how styles are loaded HOT 1
- The specified argument is not a child of this element HOT 1
- JavaScript Version? HOT 1
- Not compatible with OpenXML 3.01 HOT 4
- Could not load file or assembly 'HtmlToOpenXml, Version=2.4.0.0, Culture=neutral, PublicKeyToken=6ad79d83e2b60e63' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) HOT 4
- Sequence contains no elements on an empty header tag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.