This repository has been archived by the owner. It is now read-only.

DocumentAssembler: Support for Images (#42) #236

Closed
wants to merge 9 commits into
base: vNext
from

Conversation

Projects
None yet
5 participants
@krembf
Copy link

krembf commented Jul 16, 2018

Implementation of feature request to support templated images in Document Assembler.

krembf added some commits Sep 19, 2017

DocumentAssembler: Support for Images
Added ability to embed image content in template. Input image can be supplied either as a base64 encoded string or as a path to file. Supports different layout options. For different samples, see unit tests.
DocumentAssembler: Support for Images
Removed unused "Aspect" attribute
Fix for case with extra character before Image Content Control
It is expected that Image Content Control will immediately follow ImageSelect element, thus containing paragraph as child element. There is a situation where some extra characters apppear before the Image Content Control thus causing a situation where Image Conent Control is inside the paragraph and not vise versa, as expected. In such case, the system should trigger an error.
- Added handling of the situation decrribed above
- Added unit test to verify proper behavior
Added support for image select in header and footer
- Added ability to use image content control inside header and footer
- Added unit tests to verify proper behavior
Fixed image content improperly working with # notation
Modified document assembler to support # notation.
Added unit tests to verify proprer behavior. Tests which are having A suffix (e.g. DA270A-ImageSelect.docx) are duplicates of the original ones, but with # notation used instead.
Removed static class variable _docPrId for thread-safety
Removed static variable _docPrId. Now updating images docPr ids at the end of the processing and not during the transform.
@msftclas

This comment has been minimized.

Copy link

msftclas commented Jul 16, 2018

CLA assistant check
All CLA requirements met.

@twsouthwick twsouthwick requested a review from EricWhiteDev Jul 16, 2018

@krembf

This comment has been minimized.

Copy link
Author

krembf commented Jul 18, 2018

@twsouthwick, @EricWhiteDev I'm not sure, but will that be better if I do merge first, then re-submit the PR? Not sure what is the preferred workflow. Also the unit tests are failing, so I'm assuming it's all related. Please let me know.

@twsouthwick

This comment has been minimized.

Copy link
Collaborator

twsouthwick commented Jul 18, 2018

I'm not sure what you mean. The failing tests are due to your change AFAIK. The workflow is generally to submit a PR, iterate until everyone is happy and all checks are passing, then we can merge.

@krembf

This comment has been minimized.

Copy link
Author

krembf commented Jul 18, 2018

@twsouthwick Thanks for reply. Sure, all I meant to say that I should have done merge/rebase from the OfficeDev/Open-Xml-PowerTools vNext into my fork first and then submit the PR. For whatever reason I haven't done the merge before submitting the PR, so now I'm thinking the test are failing because of this.

@twsouthwick

This comment has been minimized.

Copy link
Collaborator

twsouthwick commented Jul 18, 2018

Ah. Go ahead and merge into your branch and update it here. No need for a new PR. I've enabled squashed merges so it'll all be squashed before merging anyway.

@krembf

This comment has been minimized.

Copy link
Author

krembf commented Jul 23, 2018

I've made the changes. Luckily, this just was an issue with relative path to images in XML data file, nothing serious.
Thanks!

@MalcolmJohnston

This comment has been minimized.

Copy link

MalcolmJohnston commented Aug 24, 2018

Hi Guys,

Any chance of an update on this one? I pulled @krembf's fork months ago and have been using the code as is (with some minor functional improvements) so I'd love to see this merged so I can add some PRs on top.

Also more generally what can we do to speed up the changes with the project? Cards on the table I'm mainly interested in (and hence have a better knowledge of) Document Assembler but would be happy to help out where possible.

Cheers,
Malcolm

@krembf

This comment has been minimized.

Copy link
Author

krembf commented Sep 21, 2018

Is no news a good news?

@tomjebo

This comment has been minimized.

Copy link
Collaborator

tomjebo commented Feb 2, 2019

Closing all PRs as this repo is being archived and will no longer be maintained by Microsoft. The project is licensed for continued use and development by forking to your own repo.

@tomjebo tomjebo closed this Feb 2, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.