Git Product home page Git Product logo

docx's People

Contributors

faizanj avatar rgborck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docx's Issues

Bulleted List

I´m trying to write a bulleted list on my document but always write numbered list, no matter what.

This code is from your examples:

image

I have word 2013

How can I customize TableDesign?

I will need to have some rows with top borders, some with bottom borders and only a few with a specific background color. How may I do so?

Font not being set

Font is always set to Calibri regardless of what is set in code. This behaviour is visible even in the Hello World example.

Edit:
Testing environment -
Visual Studio 2010
Windows XP and Windows 7 64 bit

In addition to the Fonts not working, when using lists, the color, size etc are also not being set although they are working for normal paragraphs/text.

Chart issue for word 2013

Hi,
There is an issue while opening the chart documents in word 2013 format. Its showing error as in the attached. Anyone experienced this? Could anyone throw a light on this issue?
screenshot_84

Cells Pictures "NULL REFERENCE EXCEPTION"

Hello every one! I am making a replace text into .docx file, but I need to access the shapes like "checkboxs", these are into a table. When I read the template.Tables[1].Rows[0].Cells[0].Pictures, the last object give me the next exception: System.NullReferenceException
I can not undertund why, I need change this shapes/pictures on my replace process:
This is my code:

   private static DocX CreateInvoiceFromTemplate(DocX template)
    {
        var tables = template.Tables;
        var dataRepository = DataDocumentRepository.Instance;
        template.ReplaceText("{EmployerName}", "PABLO H");
        var pics = template.Tables[1].Rows[0].Cells[0].Pictures;
        template.ReplaceText("{DateImplemented}", DateTime.Now.ToString("yyyy/MM/dd"));
        return template;
    }

Question: git svn config and .rev_map

I've tried to rebind a fork to CodePlex svn to get latest, but had no luck so far.
Can you share your svn-remote section of .git/config and maybe .rev_map?

Cannot add paragraph to List

I'm trying to add a Paragraph to a List using AddItem method:

List L; Paragraph P; L.AddItem(P);

But it never adds it because P.IsListItem is false. How can I create a Paragraph where IsListItem is true?

Thank you.

Different headers in different sections don't seem to be supported

The same goes for when one uses DocX.Insert( to insert a new document - all headers seem to be getting combined.

In my particular case, I need the first two pages to have a different header than the rest of the pages, but I cannot find any way of doing that using this package right now.

If someone could give me some guidance, I could see if I can add this functionality myself, but as of right now I wouldn't know where to start.

List numbering continues no matter what you pass as startNumber

I know it has been a while since there has been any activity on this repo, but since I am having an issue regarding lists in DocX, I thought it should be posted here. I have also made an issue on the CodePlex site: https://docx.codeplex.com/workitem/13437

What happens is that any numbered list inserted into a document when a numbered list is already present, continues numbering. Meaning that I get something like this:

1 List 1, Item 1
2 List 1, Item 2

Some paragraph

3 List 2, Item 1
4 List 2, Item 2

What I want, is that the second lists starts numbering on 1. This never happens, even if I pass 1 as startNumber (I've tested with passing it to the AddList method and the AddListItem method).

In the numbering.xml file, I can see that both numIds and abstractNumIds seem to be generated correctly. The two lists have different numIds which each has its own abstractNumId. Might this be a bug with Word itself? Or some incompatability with Word 2010? I assume that this has worked at some point since you have an example here: http://blog.tnwdevlabs.com/2012/09/06/docx/

DocX.SavE() is not thread safe

I'm using DocX to create several documents from different threads at the same time. The thread that is trying to call DocX.Save() has hung indefinitely.

WindowsBase.dll!MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(int retryCount, out string fileName) + 0x7b bytes   
WindowsBase.dll!MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary() + 0x172 bytes   
WindowsBase.dll!MS.Internal.IO.Packaging.SparseMemoryStream.Write(byte[] buffer, int offset, int count) + 0xac bytes    
WindowsBase.dll!MS.Internal.IO.Packaging.CompressEmulationStream.Write(byte[] buffer, int offset, int count) + 0x3d bytes   
WindowsBase.dll!MS.Internal.IO.Packaging.CompressStream.Write(byte[] buffer, int offset, int count) + 0x8a bytes    
WindowsBase.dll!MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(byte[] buffer, int offset, int count) + 0xad bytes 
WindowsBase.dll!MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(byte[] buffer, int offset, int count) + 0x56 bytes    
mscorlib.dll!System.IO.StreamWriter.Flush(bool flushStream, bool flushEncoder) + 0x62 bytes 
mscorlib.dll!System.IO.StreamWriter.Write(char[] buffer, int index, int count) + 0xab bytes 
System.Xml.dll!System.Xml.XmlEncodedRawTextWriter.FlushBuffer() + 0x3c bytes    
System.Xml.dll!System.Xml.XmlEncodedRawTextWriter.RawText(char* pSrcBegin, char* pSrcEnd) + 0xf1 bytes  
System.Xml.dll!System.Xml.XmlEncodedRawTextWriter.RawText(string s) + 0x23 bytes    
System.Xml.dll!System.Xml.XmlEncodedRawTextWriterIndent.WriteIndent() + 0x22 bytes  
System.Xml.dll!System.Xml.XmlEncodedRawTextWriterIndent.WriteStartElement(string prefix, string localName, string ns) + 0x21 bytes  
System.Xml.dll!System.Xml.XmlWellFormedWriter.WriteStartElement(string prefix, string localName, string ns) + 0x9d bytes    
System.Xml.Linq.dll!System.Xml.Linq.ElementWriter.WriteStartElement(System.Xml.Linq.XElement e) + 0x47 bytes    
System.Xml.Linq.dll!System.Xml.Linq.ElementWriter.WriteElement(System.Xml.Linq.XElement e) + 0x3c bytes 
System.Xml.Linq.dll!System.Xml.Linq.XElement.WriteTo(System.Xml.XmlWriter writer) + 0x49 bytes  
System.Xml.Linq.dll!System.Xml.Linq.XContainer.WriteContentTo(System.Xml.XmlWriter writer) + 0xd4 bytes 
System.Xml.Linq.dll!System.Xml.Linq.XDocument.WriteTo(System.Xml.XmlWriter writer) + 0x79 bytes 
System.Xml.Linq.dll!System.Xml.Linq.XDocument.Save(System.IO.TextWriter textWriter, System.Xml.Linq.SaveOptions options) + 0x3c bytes   
DocX.dll!Novacode.DocX.Save() + 0xc1 bytes  

Searching for this method "CreateUserScopedIsolatedStorageFileStreamWithRandomName" yielded this SO question https://stackoverflow.com/questions/21482820/openxml-hanging-while-writing-elements#

Microsoft published an article about the problem here https://stackoverflow.com/questions/21482820/openxml-hanging-while-writing-elements#

Long story short, "CreateUserScopedIsolatedStorageFileStreamWithRandomName" is not thread safe, so by extension "XDocument.Save" and "DocX.Save" are not thread safe.

For now I will try to work around the issue in my application. I'd recommend a fix within DocX to prevent other users from trying to debug a deadlock.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.