Click or drag to resize

PdfFontEmbeddingPolicyProvider Delegate

This delegate represents a method of function that will be called when a request has come to embed a particular font within a PDF. Client code will be passed a font resource and the embedding permissions that are contained within the font's data. The permissions describe the circumstances under which the font may be embedded. It is up to client code to respect these permissions.

Namespace:  Atalasoft.PdfDoc.Generating.ResourceHandling.Fonts
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: (.NET 4.5.2, x86)
public delegate PdfFontEmbeddingPolicy PdfFontEmbeddingPolicyProvider(
	PdfFontResource resource,
	PdfFontEmbeddingPermission permissions


Type: Atalasoft.PdfDoc.Generating.ResourceHandling.FontsPdfFontResource
The font resource that is needs an embedding policy.
Type: Atalasoft.PdfDoc.Generating.ResourceHandling.FontsPdfFontEmbeddingPermission
The permissions for the font resource.

Return Value

Type: PdfFontEmbeddingPolicy
A new PdfFontEmbeddingPolicy describing the embedding action to take for this font.
There a number of different actions that client code could take for a request to embed a font. In general, if there is doubt as to what action to take, not embedding is the safest.
private PdfFontEmbeddingPolicy MyEmbeddingPolicyProvider(PdfFontResource resource, PdfFontEmbeddingPermission permissions)
    PdfFontEmbeddingAction action = PdfFontEmbeddingAction.DontEmbed;
    switch (permissions) {
    case PdfFontEmbeddingPermission.Unrestricted:
    case PdfFontEmbeddingPermission.PreviewAndPrint:
    case PdfFontEmbeddingPermission.NoSubsetting:
        action = PdfFontEmbeddingAction.Embed;
    return new PdfFontEmbeddingPolicy(action);
See Also