Eric White
Forum Replies Created
-
AuthorPosts
-
April 7, 2016 at 11:27 pm in reply to: setting element value which includes < , > , & not work properly #3326
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
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.
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
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
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.
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.
March 29, 2016 at 12:28 pm in reply to: How to create Header and footer with VB.net in Open XML Word document #3294I 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.
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?
Also take a look at OpenXmlRegex. It is a superset of TextReplacer.
http://www.ericwhite.com/blog/blog/openxmlregex-developer-center/
March 28, 2016 at 7:45 am in reply to: How to create Header and footer with VB.net in Open XML Word document #3285I 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:
There are videos on various tools that can help you get your job done.
Cheers
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:
March 24, 2016 at 12:18 pm in reply to: How to create Header and footer with VB.net in Open XML Word document #3268Sure, 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?
March 24, 2016 at 12:10 pm in reply to: Merging two documents and setting a sectionbreak odd page between them #3267Yes, 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.
March 24, 2016 at 4:21 am in reply to: How to create Header and footer with VB.net in Open XML Word document #3263Hi,
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
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.
Cheers, Eric
-
AuthorPosts