Giter VIP home page Giter VIP logo

aspose.words-for-.net's Introduction

Nuget Nuget GitHub

Word Processing API for .NET

Aspose.Words for .NET is a powerful on-premise class library that can be used for numerous document processing tasks. It enables developers to enhance their own applications with features such as generating, modifying, converting, rendering, and printing documents, without relying on third-party applications, for example, Microsoft Word, or Office Automation.

This repository contains Demos, Examples, Plugins and Showcases for Aspose.Words for .NET to help you learn and write your own applications.

Directory Description
Examples A collection of .NET examples that help you learn and explore the API features
Showcases Standalone ready-to-use applications that demonstrate some specific use cases
Plugins Plugins that will demonstrate one or more features of Aspose.Words for .NET

.NET API for Various Document Formats

Aspose.Words for .NET is a powerful on-premise class library that can be used for numerous document processing tasks. It enables developers to enhance their own applications with features such as generating, modifying, converting, rendering, and printing documents, without relying on third-party applications, for example, Microsoft Word, or automation.

Word API Features

  • Aspose.Words can be used to develop applications for a vast range of operating systems such as Windows or Linux & Mac OS and platforms such as Windows Azure, Xamarin.Android, or Xamarin.iOS&Xamarin.Mac.
  • Comprehensive document import and export with 35+ supported file formats. This allows users to convert documents from one popular format to another, for example, from DOCX into PDF or Markdown, or from PDF into various Word formats.
  • Programmatic access to the formatting properties of all document elements. For example, using Aspose.Words users can split a document into parts or compare two documents.
  • High fidelity rendering of document pages. For example, if it is needed to render a document as in Microsoft Word, Aspose.Words will successfully cope with this task.
  • Ability to print a document programmatically using Aspose.Words and the XpsPrint API or via dialog boxes.
  • Generate reports with Mail Merge, which allows filling in merge templates with data from various sources to create merged documents.
  • LINQ Reporting Engine to fetch data from databases, XML, JSON, OData, external documents, and much more.

Read & Write Document Formats

Microsoft Word: DOC, DOCX, RTF, DOT, DOTX, DOTM, DOCM FlatOPC, FlatOpcMacroEnabled, FlatOpcTemplate, FlatOpcTemplateMacroEnabled
OpenOffice: ODT, OTT
WordprocessingML: WordML
Web: HTML, MHTML
Fixed Layout: PDF
Text: TXT

Save Word Files As

Fixed Layout: XPS, OpenXPS, PostScript (PS)
Images: TIFF, JPEG, PNG, BMP, SVG, EMF, GIF
Web: HtmlFixed
Others: PCL, EPUB, XamlFixed, XamlFlow, XamlFlowPack

Platform Independence

Aspose.Words for .NET API can be used to develop applications for a vast range of operating systems (Windows, Linux & Mac OS) and platforms. You can build both 32-bit and 64-bit applications including ASP.NET, WCF & WinForms. Aspose.Words for .NET can also be used via COM Interop from ASP, PHP, Perl and Python.

You can also build applications with Mono as well as on Windows Azure, Microsoft SharePoint, Microsoft Silverlight, Xamarin.Android, Xamarin.iOS & Xamarin.Mac.

Getting Started with Aspose.Words for .NET

Ready to give Aspose.Words for .NET a try? Simply run Install-Package Aspose.Words from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.Words for .NET and want to upgrade the version, please run Update-Package Aspose.Words to get the latest version.

Using C# to Create a DOC File from Scratch

You can execute this snippet in your environment to see how Aspose.Words performs or check the GitHub Repository for other common usage scenarios.

// create a blank document
Document doc = new Document();
// the DocumentBuilder class provides members to easily add content to a document
DocumentBuilder builder = new DocumentBuilder(doc);
// write a new paragraph in the document with the text "Hello World!"
builder.Writeln("Hello World!");
// save the document in DOCX format. 
// the format to save as is inferred from the extension of the file name.
doc.Save(dir + "output.docx");

Using C# to Export DOC to EPUB Format

Aspose.Words for .NET allows you to convert Microsoft Word® formats into bytes, HTML, EPUB, MHTML and other file formats. Following snippet demonstrates the conversion of a DOC file to an EPUB file:

// load the document from disc
Document doc = new Document(dir + "template.doc");
// save the document in EPUB format
doc.Save(dir + "output.epub");

Using C# to Import PDF and Save as a DOCX File

The following code sample demonstrates, how you can import a PDF document into your .NET application and export it as a DOCX format file without the need to install the Microsoft Word®:

// Load the PDF document from directory
Document doc = new Document(dir + "input.pdf");

// Save the document in DOCX format
doc.Save(dir + "output.docx");

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

aspose.words-for-.net's People

Contributors

aamirwaseem avatar adam-skelton avatar adamskelton avatar alex-dudin avatar alexey-butalov-aspose avatar alexeybut avatar andreynnn avatar aspose-words-gists avatar asposemarketplace avatar assadvirgo avatar babar-raza avatar dannycabrera avatar edward-aspose avatar falleretic avatar farooqsheikhpk avatar jawadaspose avatar muhammad-ijaz avatar muzammil-khan avatar naeem244 avatar rizwanniazigroupdocs avatar romankorchagin avatar romans91 avatar salmansarfraz avatar saqib-razzaq-aspose avatar saqibrazzaq avatar sdfleod avatar shahzad-latif avatar stdstring avatar tahir-manzoor avatar zaheertariq 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  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  avatar  avatar  avatar  avatar

Watchers

 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

aspose.words-for-.net's Issues

Aspose.Words with max paragraphs.

Hi team,

Does the Aspose.Words have a max number of readable Bookmarks by document, considering number of paragraphs or lines? I'm not using evaluate version, however, i have a document with 351 lines and 143 paragraphs and some bookmarks at the end of this document does not appear when i list them using method bellow, but, when i remove some lines/paragraphs, those bookmarks are showed.

foreach (Aspose.Words.Bookmark bookmark in this.Doc.Range.Bookmarks) { if (!bookmark.Name.StartsWith("_")) { listaBookmarks.Add(bookmark.Name); } }

Best Regards!

The remote name could not be resolved: 'api.aspose.cloud' for application hosted on China region

I am facing API issue on application hosted on China region and for other regions, it works without any issues.
I think GFW might stoping the requests. Is there any alternative API Url for https://api.aspose.cloud available for China region?
PFB error Log

"ExceptionMessage": "System.Net.WebException: The remote name could not be resolved: 'api.aspose.cloud'\r\n at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)\r\n at System.Net.HttpWebRequest.GetRequestStream()\r\n at Aspose.Words.Cloud.Sdk.ApiInvoker.PrepareRequest(String path, String method, Dictionary2 formParams, Dictionary2 headerParams, String body, String contentType)\r\n at Aspose.Words.Cloud.Sdk.ApiInvoker.InvokeInternal(String path, String method, Boolean binaryResponse, String body, Dictionary2 headerParams, Dictionary2 formParams, String contentType)\r\n at Aspose.Words.Cloud.Sdk.RequestHandlers.OAuthRequestHandler.RequestToken()\r\n at Aspose.Words.Cloud.Sdk.RequestHandlers.OAuthRequestHandler.ProcessUrl(String url)\r\n at Aspose.Words.Cloud.Sdk.ApiInvoker.<>c__DisplayClass10_0.<InvokeInternal>b__0(IRequestHandler p)\r\n

Switch to PackageReference

HI folks, great library! Just wanted to let you know that you can switch to the new <PackageReference> style of importing packages into projects: https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files

There is an easy way to do this via the migration tool: https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference

The main advantage is that the packages are no longer downloaded to the solution folder - both using unnecessary disk space and allowing .csproj files to be opened directly.

The reason for this issue is that I got a message on NuGet.org when a customer tried to run the sample by opening the CSharp.csproj file directly and NuGet failed to restore the files to the correct path.

Let me know if I can help in any way.

PS: Thanks for making use of SkiaSharp, I love working on that library and making improvements. If you have any suggestions, feel free to just open a new issue in the SkiaSharp repo!

PPS: You may also need to switch to package references with your other .NET sample repos.

PageSplitter not working as expected

With Aspose.Words 19.7 trying to use DocumentPageSplitter from the samples in order to get each page from a specific document as a new document. The code used is:

static void Main(string[] args)
{
    try
    {
        const string fileName = "problematic_file.docx";

        var license = new License();
        license.SetLicense(...);
        
        ExtractDocumentToPages(fileName, 1, 1);
    }
    finally
    {
        Console.WriteLine("Done!");
        Console.ReadLine();
    }
}

public static void ExtractDocumentToPages(string docName, int fromPage, int pagesCount)
{           
    string folderName = Path.GetDirectoryName(docName);
    string fileName = Path.GetFileNameWithoutExtension(docName);
    string extensionName = Path.GetExtension(docName);
    string outFolder = Path.Combine(folderName, "_out");

    Console.WriteLine("Processing document: " + fileName + extensionName);

    Document doc = new Document(docName);

    // Split nodes in the document into separate pages.
    DocumentPageSplitter splitter = new DocumentPageSplitter(doc);

    Document pageDoc = splitter.GetDocumentOfPageRange(fromPage, fromPage+pagesCount-1); 
    pageDoc.Save(Path.Combine(outFolder, string.Format("{0} -  Out{1}", fileName, extensionName)));
}

The result file contains two pages instead of one.
Please note that valid license is applied.
The source and the result files are attached to the issue.

problematic_file.docx
problematic_file - Out.docx

Print Multiple copies using IXPSPrintJob(XpsPrint.dll) or How to apply PrinterSettings to IXPSPrintJob(XpsPrint.dll)

Hi,

I am using your code given on the below link to print documents of type Aspose.Word.Document class using XPSPrint.dll by calling its StartJob and CopyJob methods. It is working fine for me as soon as i am printing a single copy of the document. But I am not able to print multiple copies of the document using the same Job. I am able to get those printer settings from PrintDialog window but i dont know how to apply those Printer Settings when printing via XPSPrintJob.dll.

I used this link:

https://github.com/asposewords/Aspose_Words_NET/blob/master/RenderingAndPrinting/PrintDocument/XpsPrint/CSharp/XpsPrintHelper.cs

Can you please suggest me how to resolve this problem.

Many thanks in advance.

Regards
Lucky

Unable to center image

I can't make the image centered in the row,I flipped through the relevant documentation and found no solution.The effect is as follows
1

Setting license in azure environment

I'd like to set the license to Aspose.Words dll, that is deployed on azure environment. The dll is being used with some USQL code behind methods.
When setting the license in the code behind that is being called, it looks like it's being set successfully, but the resulted document (a pdf converted from word document) still has the watermark on it.
Probably the dll that was set with the license information is not the one that was actually running?
Is it possible to set the license in the scenario described above?
If it's possible, what is the proper way to do that?
If it's not possible, is there a way to "pre-license" the dll that will later be registered into azure?
thanks.

Cannot Run Live.Demo.UI with VS2019 16.11.2

After I start the project by following ReadMe.md

I got this error
Could not find a part of the path '...\Aspose.Words.Live.Demos.UI\bin\roslyn\csc.exe'.

I can fixed, thanks

License question

Aspose Words is a commercial product, isn't it? The github distribution is public. There is a MIT license. What kind of license is used for Aspose Words for Android? My employer would not spend a lot of money for a third party component. The company only has two employee. Is a rtf to html conversion using Xamarin Forms cross-platform and vice versa compatible with IOS?

How to implete the chart which is a combination of two charts (Column and Line).

  1. It is feasible on aspose-cell , how can I complete it on aspose-word,like this:

123

  1. code
     Document doc = new Document();
     DocumentBuilder builder = new DocumentBuilder(doc);
     // Insert Column chart.
     Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
     Chart chart = shape.Chart;           
     chart.Series.Add("AW Series 1", new string[] { "Category 1", "Category 2" }, new double[] { 1, 2 });

     dataDir = @"E:\\TestInsertChartColumn_out.doc";
     doc.Save(dataDir);       

Installation on Ubuntu Linux 18.04

I am trying to setup the required . NET SDK on Ubuntu Linux 18.04. I am running the following:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
sudo apt-get update
sudo apt-get install -y --no-install-recommends dotnet-sdk-2.1

After I try to run:

dotnet add package SkiaSharp.NativeAssets.Linux --version 1.68.1
dotnet add package SkiaSharp --version 1.68.1
dotnet add package Aspose.Words

It it breaking with:

The framework 'Microsoft.NETCore.App', version '3.1.2' was not found.
  - The following frameworks were found:
      2.1.0 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.3 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.4 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.5 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.6 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.7 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.8 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.9 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.11 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.12 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.13 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.14 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.15 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.16 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.1.17 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.0 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.3 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.4 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.5 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.6 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.7 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      2.2.8 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      3.0.0 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      3.0.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      3.0.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      3.1.0 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      3.1.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Any ideas?

an issues

In the export of word content need to add an object similar to: CS ChemDraw Drawing for download After downloading Open this object by clicking on the call, what should I do

Aspose.Words 20.10 returns wrong page count.

Hi, I'm using aspose.words 20.10 and I'm trying to fetch the number of pages count for the uploaded document. But It returning very huge and wrong page count.Please help me on this.

private Int32 GetWordPageCount(byte[] docData)
{
Int32 pages = 1;
try
{
using (MemoryStream dataStream = new MemoryStream(docData))
{
StreamReader sr = new StreamReader(dataStream);
asw.License lic = new asw.License();
lic.SetLicense("Aspose.Words.lic");
asw.Document doc = new asw.Document();
asw.DocumentBuilder db = new asw.DocumentBuilder(doc);
db.Writeln(sr.ReadToEnd());
sr.Dispose();
sr.Close();
pages = db.Document.PageCount;
}
}

Originally posted by @amruthats in https://github.com/aspose-words/Aspose.Words-for-.NET/issue_comments/711064417

FindAndHighlight

I used VS2012 pro to open and run the FindAndHighlight.2010.sln

at line 97 [afterRun.Text = run.Text.Substring(position);], I get this

System.ArgumentOutOfRangeException was unhandled
Message=startIndex cannot be larger than length of string.
Parameter name: startIndex
Source=mscorlib
ParamName=startIndex
StackTrace:
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex)
at FindAndHighlightExample.Program.SplitRun(Run run, Int32 position) in c:\Users\Administrator.EYEDOC\Documents\GitHub\Aspose_Words_NET\ProgrammingWithDocuments\UsingFindAndReplace\FindAndHighlight\CSharp\Program.cs:line 97
at FindAndHighlightExample.Program.ReplaceEvaluatorFindAndHighlight.Aspose.Words.IReplacingCallback.Replacing(ReplacingArgs e) in c:\Users\Administrator.EYEDOC\Documents\GitHub\Aspose_Words_NET\ProgrammingWithDocuments\UsingFindAndReplace\FindAndHighlight\CSharp\Program.cs:line 50
at . ()
at Aspose.Words.Range.Replace(Regex pattern, IReplacingCallback handler, Boolean isForward)
at FindAndHighlightExample.Program.Main() in c:\Users\Administrator.EYEDOC\Documents\GitHub\Aspose_Words_NET\ProgrammingWithDocuments\UsingFindAndReplace\FindAndHighlight\CSharp\Program.cs:line 30
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

How to keep table's style in .docx file when copy it?

I have a template word file, and there is a table in it with a table-head, now I need to copy a table from it to another, the code is like this:

    // Get the first table in my template .docx file
    Table table = alltables[0] as Table;
    // Create a row(pseudocode)
     Row row;
    // Add the row
    table.Rows.Add(row);
    //......Other logic code
    // Returns a new .docx file with a table copied from the template file above.

But, the table copied from above template in the .docx file I get at last, which head style is different to my template's table. So, please give me a method to resolve it, thanks.

Trying to get in touch with you regarding a security issue

Hi there,

I couldn't find a SECURITY.md in your repository and so am not sure how to best contact you privately to disclose the security issue.

Can you add a SECURITY.md file with your e-mail to your repository, so that I know who to contact? GitHub suggests that a security policy is the best way to make sure security issues are responsibly disclosed.

Once you've done that, please let me know so I can ping you the info.

Thanks! (cc @JamieSlome)

Convert text to PNG in C# for Unity

Hi,
I want to use this feature "Convert text to PNG in C#" in my unity project. Can you please suggest a way "how to use" this in Unity. What dependencies and plugins do I need to integrate this in my Unity project. What are the steps gonna be. Please help. I have been stuck for a week to achieve this.

I have the package installed still getting the error:
error CS0246: The type or namespace name 'Aspose' could not be found (are you missing a using directive or an assembly reference?)

Screenshot 2023-06-30 at 12 50 15 PM

Thanks in advance.

values have double.NaN.Chart data labels lost and offset when exported to PDF

`public static void DefaultOptionsForDataLabels(string dataDir)
{
// ExStart:DefaultOptionsForDataLabels
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

        Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
        Chart chart = shape.Chart;
        chart.Series.Clear();

        ChartSeries series = chart.Series.Add("Series 1",
            new string[] { "Category0", "Category1", "Category2", "Category3", "Category4", "Category5" },
            new double[] { double.NaN, 2.1, 3.2, double.NaN, 0.8, 3.8 });

        ChartDataLabelCollection labels = series.DataLabels;
        //labels.ShowPercentage = true;
        labels.ShowValue = true;
        //labels.ShowLeaderLines = false;
        //labels.Separator = " - ";

        doc.Save(dataDir + "Demo.docx"); 
        doc.Save(dataDir + "Demo.pdf", SaveFormat.Pdf);
        // ExEnd:DefaultOptionsForDataLabels
        Console.WriteLine("\nDefault options for data labels of chart series created successfully.\nFile saved at " + dataDir);
    }`

Hi, guys, values have double.NaN.Chart data labels lost and offset when exported to PDF.Please see the attachment below
Demo.docx
Demo.pdf

image
//..\Aspose.Words-for-.NET\Examples\CSharp\Programming-Documents\Charts\WorkWithChartDataLabels.cs

Issues building master with aspose.words.17.3.0

I'm busy trying to evaluate aspose.words for .net. I came across the following issues with building master at commit 38ebe36 using aspose.words.17.3.0 from nuget as of 2017-04-12 01:15+00:00

For now I've either commented out the offending lines or replaced them with previous changes (e.g. imageOptions.Resolution).

Convert HTML to word using ASPOSE

We have an webpage built in asp .net that uses jquery.css,bootstrap.css and other 3 rd part CSS for look and feel purposes. These paths in the html are relative references.

I have a need to convert the webpage with all these relative references to WORD document and achieve the same look as UI.
This specifically is for the home page of the UI, which will be rendered as the first page on the word Docx.

The 2 nd page will have data retrieved from the Database and shown as a bulleted list.

Could you please confirm or point me to an example?
1: HTML with relative reference can be generated as Word and the look will be maintained
2: Data from DB can be shown as bulleted list

官方提供的实例程序中没有显示百分比

    [Test]
    public void FormatNumberOfDataLabel()
    {
        //ExStart:FormatNumberOfDataLabel
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);

        Shape shape = builder.InsertChart(ChartType.Column, 432, 252);

        Chart chart = shape.Chart;
        chart.Title.Text = "Data Labels With Different Number Format";

        // Delete default generated series.
        chart.Series.Clear();

        ChartSeries series1 = chart.Series.Add("Aspose Series 1", 
            new string[] { "Category 1", "Category 2", "Category 3" }, 
            new double[] { 2.5, 1.5, 3.5 });
        
        series1.HasDataLabels = true;
        series1.DataLabels.ShowValue = true;
        series1.DataLabels[0].NumberFormat.FormatCode = "\"$\"#,##0.00";
        series1.DataLabels[1].NumberFormat.FormatCode = "0.00%";
        series1.DataLabels[2].NumberFormat.FormatCode = "0.00%";
        

        // Or you can set format code to be linked to a source cell,
        // in this case NumberFormat will be reset to general and inherited from a source cell.
        series1.DataLabels[2].NumberFormat.IsLinkedToSource = true;

        doc.Save(ArtifactsDir + "WorkingWithCharts.FormatNumberOfDataLabel.docx");
        //ExEnd:FormatNumberOfDataLabel
    }

image

Image missing when converting a word document to pdf in linux docker container.

testfile.docx

I create a ASP.NET core 3.1 Web Application and enabled docker suppot with Linux.

image

image

Then added nuget packages Aspose.Words 21.7.0
And added the above attached testfile.docx to the project.

On the privacy sample razor page, I changed the OnGet Method to look like this.

image

I then ran the project with docker.
Then when I navigate to "/Privacy" I get a pdf download file however the images are missing.

Orginal Docx document.

image

Downloaded Pdf document

image

infact even Aspose watermark image is missing when I do not apply license.

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.