Eric White

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • in reply to: ObjectDisposedExceptions and IsolatedStorageException #8848

    Eric White
    Keymaster

    I have never heard that this has been fixed in .NET, although my information may be out of date.

    If you have multithreaded access, you have only two options:
    – Use .NET core, which has a new implementation of System.IO.Packaging.
    – Put all Open XML processing out into a separate process (not thread), then use inter process communication.

    This includes if you are running on a web server that essentially uses multithreading.

    Eric


    Eric White
    Keymaster

    Hi Jason,

    I have that code somewhere in the archives. I go dig it out, post the link here. It may take me a day or two. 🙂

    Cheers, Eric

    in reply to: Good ways to insert/modify a Gantt chart in Word? #7923

    Eric White
    Keymaster

    Hi,

    If you can do it in Word, then you can see the markup and the parts necessary for creating a document that looks like what you want. So the first step is to manually create a document that looks like what you want.

    There are screen-casts that explain how to use the various tools that enable you to suss out what the markup / parts should be.

    Introduction to Open XML

    Regards, Eric

    in reply to: Insert images in word file #7920

    Eric White
    Keymaster

    Hi Ash,

    Watch screen-cast #5 in this series:

    Introduction to WordprocessingML

    Regards, Eric

    • This reply was modified 5 years, 3 months ago by  Eric White.

    Eric White
    Keymaster

    Hi Elena,

    Your issue seems a fairly complex one. It is not entirely clear from your description what the situation is.

    It probably would take a few hours to suss out the issue and solve it. Unfortunately, I’m not in the position to do unpaid work, but if you want to engage me to solve the problem, you can reach out to me at eric@ericwhite.com

    Best regards, Eric

    in reply to: How to find Current Page Number using openxml #7914

    Eric White
    Keymaster

    Hi,

    Regarding 1., there is no way to do this. To do this, one would have to build a paginator – layout engine, which would exactly duplicate the internal algorithm of Word. This has not been written, nor is it on the schedule.

    Regarding 2., I don’t understand the question.

    in reply to: Powershell Cmdlets #7851

    Eric White
    Keymaster

    Hi Nicolas,

    Mostly there is no chance that the cmdlets will return to the project. I don’t have any agenda to do so, and in general, probably, no customer is willing to pay for it.

    Regards, Eric


    Eric White
    Keymaster

    I would bet that there is a way to do it, but it would be an engineering exercise – would take some time. The Open-Xml-Sdk-JavaScript enables you to do quite a lot with creation of DOCX files, but it is still a work-in-progress. In particular, it has issues when creating large documents.

    in reply to: altChunk html img alt text #7815

    Eric White
    Keymaster

    The import of HTML by Word via altChunk is a black box. As developers, we have no control over what Word does. So yes, if you need the alt text, you have to get creative.

    in reply to: DocumentBuilder.BuildDocument gives Lag in application #7664

    Eric White
    Keymaster

    Hi, I am somewhat doubtful that the delay that you see is caused by DocumentBuilder. I suggest that you do some logging, and further diagnostics to determine what is causing the delay.

    in reply to: Retrieve words out of excel #7662

    Eric White
    Keymaster

    Take a look at the SmlDataRetriever module in Open-Xml-PowerTools.

    in reply to: OutOfMemory – Large MergeDocument #7602

    Eric White
    Keymaster

    There are some scenarios where the only solution is to build a 64-bit exe. I have never run out of memory when using 64-bit.

    in reply to: Current SDK? #7584

    Eric White
    Keymaster

    There has been no development activity on the Open-Xml-Sdk for JavaScript for several years. I am unaware of any new tools for writing Open XML code using JavaScript. Sorry, I wish I had a better answer for you, but I do not.

    in reply to: Why new slides are not added to presentaion.xml sldIdList? #3278

    Eric White
    Keymaster

    Ok, I now understand exactly what is going on. I’ll explain:

    There are two object models that you can use to modify the markup in Open XML:
    – The strongly-typed object model of the Open-Xml-Sdk. This includes the classes you are using when getting the slide size. This also includes, for instance, the Paragraph, Run, and Text classes that we see in WordprocessingML.
    – LINQ to XML, which is the best programming model that I know of for modifying and transforming XML.

    One issue with the strongly-typed OM is that its API does not work for functional construction and certain types of functional transforms. At the time that they were designing that API, I tried my best to get them to fix this, but was not able to convince them (primarily because the designers of the SDK were not schooled in functional programming). I also had plans to fix this as part of my job as maintainer of the open source Open-Xml-Sdk, but it looks like this plan is not going to happen.

    There is magic caching that goes on in the strongly-typed OM of the Open-Xml-Sdk that conflicts with LINQ to XML. I disagree with the decision to have magic caching, but this decision is not reversible.

    Because of the deficiencies in the strongly-typed OM of the Open-Xml-Sdk, I wrote the Open-Xml-PowerTools using LINQ to XML.

    Anyway, key point is that when you open an Open XML document using the Open-Xml-Sdk, you should not use both the strongly-typed OM and LINQ to XML on the same open document. And because Open-Xml-PowerTools uses LINQ to XML, then should not mix use of the Open-Xml-PowerTools and the strongly-typed OM on the same open document.

    If I need to use both APIs, I close and re-open the document, so that I never use both APIs on the same open document.

    I know this is an abysmal state of affairs. Truly I wanted to fix this, but I have never been given leave to do so by the folks in charge of the SDK. Of course, now that the Open-Xml-Sdk is open source, I could certainly fork it, and fix this. However, I also have to focus on providing a livelihood for my family, so can’t do this pro bono. I have contemplated fixing this (along with fixing many other things, and enhancing the SDK in interesting ways) and releasing an Open-Xml-Sdk-Pro, which would be a commercial product, but this hasn’t been attractive enough to impel me to do so.

    This is the explanation for what you are seeing.


    Eric White
    Keymaster

    Unfortunately, I have schedules and such that prohibit debugging the specific code. Have you watched all of the screen-casts in that series? Also have you watched the intro to Open XML screen-cast series:

    Introduction to WordprocessingML

    There are screen-casts in that series that explain the specifics of relationships, relationship types, content types, explicit relationships, and implicit relationships. You will need to understand this in order to create your program.

    If you have specific questions about the markup, or directions to go, happy to hear and give my opinion.

Viewing 15 posts - 1 through 15 (of 17 total)