Eric White

Forum Replies Created

Viewing 15 posts - 196 through 210 (of 253 total)
  • Author
    Posts

  • Eric White
    Keymaster

    Hi,

    I am going to have to take a look at this. There should be a way to get this to work, but I need to research the details.

    -Eric

    in reply to: open xml regularExp #3309

    Eric White
    Keymaster

    I totally understand, but it is going to be quite some time, if ever, before I do the conversion of that module to JavaScript.

    Mainly this would come about when I have work or a contract that requires it.

    So you should not wait for this, but consider ways to complete your project without it.

    in reply to: How to add a jquery chart to an openxml word doc? #3303

    Eric White
    Keymaster

    Hi Roger,

    I have worked with DrawingML objects only a couple of times in my entire Open XML experience, so don’t have any insight to your question. However, the Open XML standard certainly documents everything. It’s all in there. In general, I didn’t find DrawingML hard to work with, so I suggest you just dig in and read through the appropriate sections of the standard. This is what I would have to do to answer your question.

    Cheers, Eric

    in reply to: Search for Multiline patterns – OpenXmlRegex #3302

    Eric White
    Keymaster

    Hi,

    This is, unfortunately, not a feature of the OpenXmlRegex class. It is the most requested feature, but I have not had the opportunity to enhance it to enable this feature.

    It is a pretty complicated piece of code to write. Have you watched the screen-casts on OpenXmlRegex? The second screen-cast walks through the algorithm currently implemented for OpenXmlRegex. Unfortunately, that algorithm is not suitable for execution over an entire document – breaking an entire document up into runs of a single character results in too much memory usage. Therefore, OpenXmlRegex does text replacement on a single paragraph at a time.

    I have contemplated another approach that would use far less memory, but have yet to prove out this approach.

    Cheers, Eric

    in reply to: special characters support #3296

    Eric White
    Keymaster

    Replacing content in PresentationML is significantly more complicated than calling a replace function, not least of all because content can be spread across multiple runs, and the content you want to search for might not be in a single run.

    Have you considered using the OpenXmlRegex module? It can search and replace within PPTX. I recommend that you watch the two screen-casts at this link:

    http://www.ericwhite.com/blog/blog/openxmlregex-developer-center/

    • This reply was modified 8 years, 7 months ago by  Eric White.
    in reply to: Dedupe the shredded objects #3295

    Eric White
    Keymaster

    I have no experience with this. PresentationBuilder, which was the most ambitious project I have taken on with PresentationML, works at the granularity of a slide. This is, I think, the code you are referring to when noting that I keep a list of images. This was implemented because many presentations reuse the same image on many slides, and without deduplicating images, the presentation gets too big.

    But I have never looked into de-duplicating other objects.


    Eric White
    Keymaster

    I have never had the experience where my code was writing something, then I saw something different in the file itself. Not saying that it doesn’t happen – just that I have never seen it.

    Have to note something here – I primarily use LINQ to XML to query and modify parts in an Open XML package, not the strongly typed OM of the Open XML SDK, which you are using. However, I have never experienced the symptoms you are seeing using the strongly-typed OM, not to say that it can’t happen. But I don’t think that the strongly-typed OM will add a header and a reference to a header in w:sectPr.

    I would look elsewhere to find the source of the issue you are seeing.

    in reply to: Show thumbnail of an OPC file #3293

    Eric White
    Keymaster

    At this point, I have no further information. I have never read the standard on putting icons on a document – don’t recall that this is in the standard, although it very may well be. Do you know for certain that this is possible?

    in reply to: Merging Manipulated Word Docs #3291

    Eric White
    Keymaster

    Also take a look at OpenXmlRegex. It is a superset of TextReplacer.

    http://www.ericwhite.com/blog/blog/openxmlregex-developer-center/


    Eric White
    Keymaster

    I think you are looking at two different w:sectPr elements. One of the sections has a header, the other does not.

    Are you using the Visual Studio Package Editor PowerTool? It is an important tool.

    I am wondering, have you watched the screen-casts here:

    Open XML Screen-Cast Series

    There are videos on various tools that can help you get your job done.

    Cheers

    in reply to: Show thumbnail of an OPC file #3284

    Eric White
    Keymaster

    I’m afraid this is something that I have no experience with.

    Here is how I would solve this – get a DOCX that has no custom thumbnail, then copy it, add a custom thumbnail to the copy, then use the Open XML SDK Productivity Tool to compare the two. You should be able to identify each and every precise modification that you need in order to create a custom thumbnail.

    I found an interesting thread here:

    http://answers.microsoft.com/en-us/office/forum/office_2010-word/docx-files-do-not-have-thumbnails-but-some-docx/c00a3f68-34bd-4a9d-af69-0bb8bb5380bb?auth=1


    Eric White
    Keymaster

    Sure, happy to help, as much as possible.

    I am not clear on what the actual problem is? When you say it is like this but it should be like that, what do you mean, exactly? What is the error, or misbehavior of your document that you are seeing?


    Eric White
    Keymaster

    Yes, keeping the sections in the other sources will definitely put those sections in the generated document, and a section is defined as the content between it and the previous section, per the spec.

    If you really need to control the very specific properties of each section, then run DocumentBuilder in a loop – add a document – and then tweak the last section in the document, add the next document, and then tweak the last section, and repeat until you have added all of your documents. By tweaking the last w:sectPr in the document, you write a bit of code to go in and make the necessary changes to the property, and save the document.

    It is still going to be very fast – what kind of volumes do you anticipate? It runs in the hundreds of documents per second, if I recall correctly.

    If you review the screen-cast on sections, headers, and footers, you will recall that the last section props is the last child element of the w:body element, so it is easy to get to the last section.


    Eric White
    Keymaster

    Hi,

    Have you validated the XML through the validation functionality of the Open-Xml-Sdk?

    https://msdn.microsoft.com/en-us/library/bb497334(v=office.12).aspx

    This is the first step to finding out what is wrong.

    BTW, it is helpful to me if you include very specific information, rather than just the XML. What exact error message or symptoms are you receiving? What specifically is not working.

    Have you yet watched all of the screen-casts in that series that I referenced?

    Cheers, Eric

    in reply to: replacing the content in slide #3262

    Eric White
    Keymaster

    Hi,

    That module is not available in JavaScript.

    I wrote a blog post on this, because this is a recurring question – how to convert Open-Xml-PowerTools to JavaScript.

    Open-Xml-PowerTools and JavaScript

    Cheers, Eric

Viewing 15 posts - 196 through 210 (of 253 total)