Hi,
- Input Pdf file
- Word document
- Please create a standalone console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.
Hi,
Hi,
Hi Appaso,
Hi Awais,
Hi Appaso,
Hi,
Hi Appaso,
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(@“C:\Lic2016\New Licenses\Aspose.Total.lic”);
// Save the file into a Microsoft document format
Aspose.Pdf.DocSaveOptions options = new Aspose.Pdf.DocSaveOptions();
options.CloseResponse = true;
options.Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Textbox;
options.RelativeHorizontalProximity = 10;
// load a source PDF file
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(@“C:\AD\test732\ClientData.pdf”);
// save in the Word format
pdfDocument.Save(@“C:\AD\test732\Output_Word.doc”, Aspose.Pdf.SaveFormat.Doc);
Hi Imran,
Hi Appaso,
Hi Imran,
Hi Appaso,
Hi Imran,
Hi Appaso,
Hi Imran,
Hi Appaso,
Hi Imran,
Is it possible in word to create document like attached screen.
When we add the charts it is always goes to top of the page and overlapping with other content like Images and other stuffs even I have tried multiple combination of RelativeHorizontalPosition
and RelativeVerticalPosition
.
We are able to set the top of image using .Top, but this method is not getting applied for the charts.
We want to create the document like PDF file (attached earlier) by using data from database.
As like multiple options in Aspose.Slide ther is lots of options available. But in Aspose.Words, only limited options are there. It is possible to create the Words exactly as PDF file.
It is great if you can add sample code to add multiple charts and images added in the word files.
I have taken chart example from aspose website only.
Also please suggest how to write the value of respective column or some text on top of the bar in bar chart/Pie chart
Below is the some sample code snippet, in which the chart is created behind the image:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
var path = AppDomain.CurrentDomain.BaseDirectory + @"Content\Images\CoverCIT.jpg";
builder.InsertImage(path, RelativeHorizontalPosition.Margin, 50, RelativeVerticalPosition.Margin, 100, 400, 200, WrapType.Square);
Shape image = builder.InsertImage(path);
image.WrapType = WrapType.None;
image.BehindText = false;
image.Top = top;
image.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
image.HorizontalAlignment = HorizontalAlignment.Center;
image.RelativeVerticalPosition = RelativeVerticalPosition.Page;
image.VerticalAlignment = VerticalAlignment.Center;
builder.InsertBreak(BreakType.ParagraphBreak);
builder.InsertBreak(BreakType.LineBreak);
top += 100;
// Add chart with default data. You can specify different chart types and sizes.
Shape shape = builder.InsertChart(ChartType.Bar, 300, 200);
//shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Default;
//shape.HorizontalAlignment = HorizontalAlignment.Default;
shape.RelativeVerticalPosition = RelativeVerticalPosition.Line;
shape.VerticalAlignment = VerticalAlignment.None;
shape.Top = top;
shape.Left = 50;
// Chart property of Shape contains all chart related options.
Chart chart = shape.Chart;
// Get chart series collection.
ChartSeriesCollection seriesColl = chart.Series;
// Check series count.
Console.WriteLine(seriesColl.Count);
// Delete default generated series.
seriesColl.Clear();
// Create category names array, in this example we have two categories.
string[] categories = new string[] { "AW Category 1", "AW Category 2" };
// Adding new series. Please note, data arrays must not be empty and arrays must be the same size.
seriesColl.Add("AW Series 1", categories, new double[] { 1, 2 });
seriesColl.Add("AW Series 2", categories, new double[] { 3, 4 });
seriesColl.Add("AW Series 3", categories, new double[] { 5, 6 });
seriesColl.Add("AW Series 4", categories, new double[] { 7, 8 });
seriesColl.Add("AW Series 5", categories, new double[] { 9, 10 });
doc.Save(File);
Response.Write(File);
Thank you.
Appaso
Hi Appaso,