Giter Site home page Giter Site logo

shestakov / wordroller Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 5.0 186 KB

Free Microsoft Word document (aka .docx) processing library for .Net

Home Page: https://www.nuget.org/packages/Wordroller/

License: Apache License 2.0

C# 100.00%
docx docx-library microsoft msword officeopenxml ooxml word

wordroller's People

Contributors

shestakov avatar thechampagne 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  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

wordroller's Issues

Сохраняет только одно изображение из документа

Добавляю несколько изображений в цикле, как это сделано в тесте библиотеки, но все картинки отображаются только как первая. В архиве они есть, но в document.xml.rels тоже только первая.

foreach (var A in Doc.Attachments)
{
    if (A.AType == Types.AttachmentType.Photo)
    {
        var Photo = A as Types.Attachment.Photo;
        var image = document.AddImage(new System.IO.MemoryStream(Photo.Data), Wordroller.Content.Images.KnownImageContentTypes.Jpg);
        var picture = section.WrapImageIntoInlinePicture(image,
                                                         $"{Photo.Id}",
                                                         Photo.Text,
                                                         300,
                                                         Photo.GetHeight(300));

        var paragraph = section.AppendParagraph();
        paragraph.AppendPicture(picture);
    }
    else
    {
        var paragraph = section.AppendParagraph();
        paragraph.AppendText(A.ToString());
    }
}

Implement Table Cell Shading

Hello. Why ThemeShading does not work with hex values.
If I try to send 2digit values shading also does not work.
Can you help me please?
Снимок экрана 2023-05-03 001310

Replace an image

Hello,

Firstly, thank you very much for this lib, it's a pleasure to work with. Easy to use, fast, and well documented thanks to the tests.

I work for a small company here in Switzerland, we use Wordroller to generate documents from existing templates. However, we would also need to replace images in a document.

Wordroller can replace text and add images to a document, so I think we're not so far away. I've tried many ways to accomplish this with the current version, but it looks like it's not a supported scenario...

I would be really happy to contribute to this project by adding this feature myself, but I'm completely new to the Office Open XML world and would probably need some guidance if it's possible,

Thanks again for the great work accomplished, it's very helpful !

Selmir

Не вставляет изображения в существующие docx файлы

Действую по вашем примерам, размер файла увеличивается, а изображения нет.

document = new WordDocument(new MemoryStream(Resources.test));
//document = new WordDocument(CultureInfo.CurrentCulture);
section = document.Body.Sections.Last();
var stream = new FileStream(@"D:\photo\photo.jpg", FileMode.Open);
var image = document.AddImage(stream, KnownImageContentTypes.Jpg);
var picture = section.WrapImageIntoInlinePicture(image, "123", "321", 200, 200);
var paragraph = section.AppendParagraph();
paragraph.AppendPicture(picture);

var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Write);
document.Save(fileStream);

Так-же, при такой вставке, могут слетать стили и форматы предустановленных колонтитулов

Версия 1.1.1 из NuGet

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.