public double Height { get; set; }
public double getHeight();
public void setHeight(
double doubleValue
);
Height # get and set (PDFFilePage)
The height of the PDF page in PDF units (1/72 of an inch). The default value is 0.
The PDFFilePage structure contains the width and height of the page in PDF units which is read from the PDF file directly. PDF page units are in 1/72 of an inch, so a page size of 612 by 792 corresponds to 8.5 by 11 inches (612/72 by 792/72).
This property returns the height of the PDF crop box. For more information, refer to PDF Coordinate System.
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 PDFFilePagesExample()
{
string pdfFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");
// Load the file
PDFFile file = new PDFFile(pdfFileName);
file.Load();
// Show the pages
Console.WriteLine("File has {0} pages", file.Pages.Count);
foreach (PDFFilePage page in file.Pages)
{
Console.WriteLine("Page {0} size is {1} by {2} units", page.PageNumber, page.Width, page.Height);
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Scanner;
import org.junit.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
import leadtools.codecs.*;
import leadtools.pdf.*;
public void pdfFilePagesExample() {
final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images";
String pdfFileName = combine(LEAD_VARS_IMAGES_DIR, "Leadtools.pdf");
// Load the file
PDFFile file = new PDFFile(pdfFileName);
file.load();
// Show the pages
System.out.printf("File has %d pages%n", file.getPageCount());
for (PDFFilePage page : file.getPages()) {
System.out.printf("Page %d size is %f by %f units%n", page.getPageNumber(), page.getWidth(), page.getHeight());
}
assertTrue(file.getPages().size() == 5);
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document