Skip to content
Guides

Edit Text and Image Properties

ComPDFKit offers various methods to modify text and image attributes.

Edit Text Properties

ComPDFKit supports modifying text properties, such as text font size, name, color, alignment, italics, bold, transparency, etc.

This example shows how to set text to 12pt, red, and bold:

swift
pdfView.setEditingSelectionFontSize(12.0)
pdfView.setEditingSelectionFontColor(.red)
pdfView.setCurrentSelectionIsBold(true)
objective-c
[pdfView setEditingSelectionFontSize:12.0];
[pdfView setEditingSelectionFontColor:[CPDFKitPlatformColor redColor]];
[pdfView setCurrentSelectionIsBold:YES];

Edit Image Properties

ComPDFKit supports modifying image properties, such as rotating, cropping, mirroring, and setting transparency.

This example shows how to rotate an image and set it to semi-transparent:

swift
pdfView.rotateEdit(pdfView.editingArea() as! CPDFEditImageArea, rotateAngle: 90)
/**
 * Set the image transparency.
 */
pdfView.setImageTransparencyEdit(pdfView.editingArea() as! CPDFEditImageArea, transparency: 0.5)
objective-c
[pdfView rotateEditArea:pdfView.editingArea rotateAngle:90];
/**
 * Set the image transparency.
 */
[pdfView setImageTransparencyEditArea:pdfView.editingArea transparency:0.5];