Adds the option to set the BreakAcrossPages property, which corresponds to the "Allow row to break across pages" property in Word: http://fiveminutelessons.com/learn-microsoft-word/stop-table-rows-microsoft-word-splitting-across-pages
Inserting a chart in a template throws exception "Message='rId10' ID conflicts with the ID of an existing relationship for the specified source."
provided by mmirabito.
InsertList(List list, double fontSize)
InsertList(List list, System.Drawing.FontFamily fontFamily, double fontSize)
and a new example of usage: DocumentsWithListsFontChange();
Thanks to those 2 methods you can easily set font family and font size when inserting new lists.
Issue shows that document does not contain 'r' xml element on the line which starts with 'tab'. This causes exception in processing.
The line is enclosed in the 'pPr' element though.
Fix by MiroJanosik
Adds the SetLineSpacing method to the Paragraph class. This method can be used to set or remove line spacing from a paragraph.
One method uses two parameters: the type of spacing and the amount of spacing (float). The other method uses one parameter: the type of spacing for which to set the value to auto; can be either before, after or both. The second method can also be used to remove spacing by using the type None.
Patch provided by Annika89. Great work!
This patch adds support for images inside <v:shape> tags (besides the already supported images inside <w:drawing> tags). InsertDocument method no longer results in a corrupt/invalid document when an inserted document contains an image that is inside <v:shape> rather than <w:drawing> tags.
Code provided by andreasbotsikas from GIT repository:
- If custom property value is null insert empty string (This will avoid crashing the AddProperty. Another way would be to throw an application exception, but it's much more intuitive to set an empty string instead.)
- Check if stream can seek (This will allow devs to save the document directly on a System.Web.HttpResponseStream without the need to create yet another memory stream.)
- Fix duplicate custom properties (Check if property exists ignoring case as it would produce a corrupted docx otherwise.)
Merged from GIT source code. Code provided by Randall Borck and Fainzanj
Changes:
- Fix to allow font family for a paragraph text to be set and read. (faizanj)
- Tightened up how a paragraph is designated as a list item. (faizanj)
- Feature add insert next page section (rgborck)
- Added examples for the section break and the new next page break. (Randall Borck)
- Added Next Page Section break functionality. The new method is called InsertSectionPageBreak(...). (Randall Borck)
- Fix for bug with entering more than one numbering. The system was inserting the abstract in the wrong place. Now the abstract sections are grouped at the beginning and the num section is grouped at the end. This should allow word to find the correct list formatting when a document with multiplelists is created from docx. (Randall Borck)
- Fix for list defaults to help them be more consistant with MS Word. Bullets were indenting twice that of numbers, now they increase the same amount. (Randall Borck)
- Added test for creating text with formatting (fainzanj)
- Added capability to detect underlinestyle (fainzanj)
- Updated the default values to specify Heading styles. (Randall Borck)
- Updated DocX to allow you to create an empty list object. This change is useful for creating a list and then running an iterator or loop to populate it.(Randall Borck)
- Fixed issue with multiple lists in the same document. The second list was overwriting the document numbering instead of appending to it. Also updated the default to be numbering instead of bullet. Added an example of how to create lists.(Randall Borck)
- Updated list items to allow for a start value. (Randall Borck)
- Fixed the Apply Template unit test. (Randall Borck)
- Removed unneeded test. (faizanj)
- Fixed unit tests. (Randall Borck)
- Cleaned up redunant parameters in AddItemList(...) call. (Randall Borck)
- Undid signature changes because of issues. (Randall Borck)
- Fixed a method signature. (Randall Borck)
- Added test for List property (fainzanj)
- Added test for List property(fainzanj)
- Updated documentation comments and default values. (Randall Borck)
- Updates/refactoring changes to list. (Randall Borck)
- Added capability to append list to previous list (fainzanj)
- Updated docx to support adding a list. Added preliminary list support to allow docx to create a list. Currently missing functionality to add elements to the previous list (so each list can only have 1 element in the creation of new lists so far). (faizanj, brendanjerwin)
- Added tests for adding a list (fainzanj)
Known issues:
- Charts related documents doesn't open in Word 2012 (opens up fine in Word 2010)
Additionally:
- Removed StrongNameFile.pfx for easy compile
- Renamed file UnitTests1.cs into DocXUnitTests.cs
- Created Documentation.chm and commited with this release
Upgrade: New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link: http://go.microsoft.com/fwlink/?LinkId=254563
Before change one had to use:
Picture headPicture = header.CreatePicture();
headPicture.Height = 161;
headPicture.Width = 610;
Afer change it's possible to use oneliner:
Picture headPicture = header.CreatePicture(161, 610);
Now both options are available.
Reinserting the same document a large number of time > 100 caused the styles table to explode.
This should not have happened because each iteration contributes no new style. This has been fixed and tested with reinsertion as large as 1,000 times.
Word 2007 and 2010 has no problem opening these documents... apart from the fact that they are massive > 100MB uncompressed.