Knowledgebase (2311)
Children categories
We have already shown how to use Spire.Presentation to create the bubble chart in C# on the PowerPoint document. This article will demonstrate how to scale the size of bubble chart on the presentation slides in C#. We will use a 3-D bubble chart for example.
Step 1: Create a Presentation instance and load a sample document from the file.
Presentation ppt = new Presentation();
ppt.LoadFromFile("Sample.pptx", FileFormat.Pptx2010);
Step 2: Get the chart from the first presentation slide.
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
Step 3: Scale the bubble size, the range value is from 0 to 300.
chart.BubbleScale = 50;
Step 4: Save the document to file.
ppt.SaveToFile("Scalesize.pptx", FileFormat.Pptx2010);
Effective screenshot of scale the bubble size:

Full codes:
using Spire.Presentation;
using Spire.Presentation.Charts;
namespace ScaleSize
{
class Program
{
static void Main(string[] args)
{
Presentation ppt = new Presentation();
ppt.LoadFromFile("Sample.pptx", FileFormat.Pptx2010);
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
chart.BubbleScale = 50;
ppt.SaveToFile("Scalesize.pptx", FileFormat.Pptx2010);
}
}
}
Spire.PDF provides developers two methods to detect if a PDF file is PDF/A. The one is to use PdfDocument.Conformance property, the other is to use PdfDocument.XmpMetaData property. The following examples demonstrate how we can detect if a PDF file is PDF/A using these two methods.
Below is the screenshot of the sample file we used for demonstration:

Using PdfDocument.Conformance
using Spire.Pdf;
using System;
namespace Detect
{
class Program
{
static void Main(string[] args)
{
//Initialize a PdfDocument object
PdfDocument pdf = new PdfDocument();
//Load the PDF file
pdf.LoadFromFile("Example.pdf");
//Get the conformance level of the PDF file
PdfConformanceLevel conformance = pdf.Conformance;
Console.WriteLine("This PDF file is " + conformance.ToString());
}
}
}
Output:

With linked images, you can direct users to a URL when they click the image. This article will show you how to create image hyperlinks in a Word document by using Spire.Doc.
Step 1: Create a Word document, add a section and a paragraph.
Document doc = new Document(); Section section = doc.AddSection(); Paragraph paragraph = section.AddParagraph();
Step 2: Load an image to a DocPicture object.
DocPicture picture = new DocPicture(doc);
picture.LoadImage(Image.FromFile("logo.png"));
Step 3: Add an image hyperlink to the paragraph.
paragraph.AppendHyperlink("www.e-iceblue.com", picture, HyperlinkType.WebLink);
Step 4: Save the file.
doc.SaveToFile("output.docx", FileFormat.Docx);
Output:

Full Code:
using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;
using System.Drawing;
namespace CreateLink
{
class Program
{
static void Main(string[] args)
{
Document doc = new Document();
Section section = doc.AddSection();
Paragraph paragraph = section.AddParagraph();
Image image = Image.FromFile("logo.png");
DocPicture picture = new DocPicture(doc);
picture.LoadImage(image);
paragraph.AppendHyperlink("www.e-iceblue.com", picture, HyperlinkType.WebLink);
doc.SaveToFile("output.docx", FileFormat.Docx);
}
}
}
Imports Spire.Doc
Imports Spire.Doc.Documents
Imports Spire.Doc.Fields
Imports System.Drawing
Namespace CreateLink
Class Program
Private Shared Sub Main(args As String())
Dim doc As New Document()
Dim section As Section = doc.AddSection()
Dim paragraph As Paragraph = section.AddParagraph()
Dim image__1 As Image = Image.FromFile("logo.png")
Dim picture As New DocPicture(doc)
picture.LoadImage(image__1)
paragraph.AppendHyperlink("www.e-iceblue.com", picture, HyperlinkType.WebLink)
doc.SaveToFile("output.docx", FileFormat.Docx)
End Sub
End Class
End Namespace