←Select platform

PDFImagePosition Structure

Summary

Information about image position properties.

Syntax

C#
C++/CLI
Python
[SerializableAttribute()] 
public struct PDFImagePosition 
public: 
   [SerializableAttribute] 
   value class PDFImagePosition sealed 
class PDFImagePosition: 

Remarks

The PDFImagePosition structure contains information about the image's bounding box and page number.

Example

C#
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Drawing; 
using Leadtools.ImageProcessing; 
using Leadtools.Pdf; 
using Leadtools.Svg; 
 
 
public void PDFAddImagesExample() 
{ 
   string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "leadtools.pdf"); ; 
   string dstFileName = Path.Combine(LEAD_VARS.ImagesDir, @"out.pdf"); 
   string imageFileName = Path.Combine(LEAD_VARS.ImagesDir, "Cannon.jpg"); 
 
   var imagesData = new List<PDFImageData>(); 
   var codecs = new RasterCodecs(); 
   RasterImage image = codecs.Load(imageFileName); 
 
   var file = new PDFFile(srcFileName); 
   var imageData = new PDFImageData(); 
          
   var imagePositions = new List<PDFImagePosition>(); 
   var imagePosition = new PDFImagePosition(); 
   imagePosition.PageNumber = 5; 
   imagePosition.Bounds = new PDFRect(250, 500, 350, 200); 
   imagePositions.Add(imagePosition); 
 
   imageData.Image = image; 
   imageData.ImagePosition = imagePositions; 
 
   imagesData.Add(imageData); 
 
   file.AddImages(imagesData, dstFileName); 
   image.Dispose(); 
   codecs.Dispose(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 

Requirements

Target Platforms

See Also

Leadtools.Pdf Namespace

Help Version 22.0.2023.7.10
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.