Nutrient

Home

SDK

Software Development Kits

Low-Code

IT Document Solutions

Workflow

Workflow Automation Platform

DWS API

Document Web Services

T
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Company

About

Team

Careers

Contact

Security

Partners

Legal

Resources

Blog

Events

Try for free

Contact Sales
Contact sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

products

Web

Web

Document Authoring

AI Assistant

Salesforce

Mobile

iOS

Android

visionOS

Flutter

React Native

MAUI

Server

Document Engine

Document Converter Services

.NET

Java

Node.js

AIDocument Processing

All products

solutions

USECASES

Viewing

Editing

OCR and Data Extraction

Signing

Forms

Scanning & Barcodes

Markup

Generation

Document Conversion

Redaction

Intelligent Doc. Processing

Collaboration

Authoring

Security

INdustries

Aviation

Construction

Education

Financial Services

Government

Healthcare

Legal

Life Sciences

All Solutions

Docs

Guides overview

Web

AIAssistant

Document Engine

iOS

Android

visionOS

Java

Node.js

.NET

Document Converter Services

Downloads

Demo

Support

Log in

Resources

Blog

Events

Pricing

Try for free

Free Trial

Company

About

Security

Partners

Legal

Contact Sales
Contact Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

products

Products overview

Document Converter

Document Editor

Document Searchability

Document Automation Server

Integrations

SharePoint

Power Automate

Nintex

OneDrive

Teams

Window Servers

solutions

USECASES

Conversion

Editing

OCR Data Extraction

Tagging

Security Compliance

Workflow Automation

Solutions For

Overview

Legal

Public Sector

Finance

All Solutions

resources

Help center

Document Converter

Document Editor

Document Searchability

Document Automation Server

learn

Blog

Customer stories

Events

Support

Log in

Pricing

Try for free

Company

About

Security

Partners

Legal

Contact Sales
Contact Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Product

Product overview

Process Builder

Form Designer

Document Viewer

Office Templating

Customization

Reporting

solutions

Industries

Healthcare

Financial

Manufacturing

Pharma

Education

Construction

Nonprofit

Local Government

Food and Beverage

Departments

ITServices

Finance

Compliance

Human Resources

Sales

Marketing

Services

Overview

Capex-accelerator

Process Consulting

Workflow Prototype

All Solutions

resources

Help center

guides

Admin guides

End user guides

Workflow templates

Form templates

Training

learn

Blog

Customer stories

Events

Support

Pricing

Support

Company

About

Security

Partners

Legal

Try for Free
Contact Sales
Try for Free
Contact Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Services

Generation

Editing

Conversion

Watermarking

OCR

Table Extraction

Pricing

Docs

Log in

Try for Free
Try for Free

Free trial

Blog post

What are appearance streams?

Patrik Weiskircher Patrik Weiskircher

Table of contents

  • Annotations and appearance streams
  • XObjects
  • Nutrient and AP streams
  • Conclusion
  • FAQ
Illustration: What are appearance streams?

If you’ve worked a lot with customizing annotations, you’ve probably heard of appearance streams. They are an optional part of the specification, but if you want to ensure that everyone viewing a PDF sees exactly the same annotation, there’s no way around them.

What are annotations? covered this topic a little bit, but the importance of appearance streams warrants its own article, so this post will provide you with a high-level overview of what they are and what they are used for.

Annotations and appearance streams

An annotation dictionary contains properties that loosely define how an annotation should look. However, it doesn’t describe the appearance of annotations in enough detail to provide us with a pixel-perfect representation. Because one of the goals of the PDF format is to represent a document precisely, independent of software, another solution had to be found.

Appearance streams, or AP streams for short, describe exactly how to render an annotation. They use the same render commands as page rendering and are contained in an annotation.

Here is a short example of how an AP stream for a simple rectangle might look:

1 0 0 RG     # Sets the stroking color to red.
0 1 0 rg     # Sets the fill color to green.
2 w          # Sets the line width to 2.
137.431 652.265 76.33 67.292 re # Appends a rectangle to the path.
B            # Fills and strokes the path.

Most AP streams are included in the annotation dictionary in the AP dictionary under the N key, which denotes the annotation’s normal appearance. Not often used, but still in the specification, are the R (rollover) and the D (down) appearances. One caveat: radio buttons and checkboxes have another level in the hierarchy for specifying separate streams for checked and unchecked appearances.

That said, there are still a few things that can’t easily or efficiently be represented, like images. For this, we have to look at XObjects.

XObjects

An XObject is a self-contained description of rendering commands, and it can render another XObject using the Do operator. To make this even more confusing, the AP stream is an XObject.

So how does this all help us? An XObject can both contain resources like images and be shared across the document.

Resources

An XObject can contain resources like images or fonts. These can be saved efficiently in a binary format and can also be compressed, which reduces the file size and allows the PDF software to efficiently cache them.

Shareablility

Imagine you want to have a company logo on each page of a PDF document. Instead of having to include the image in every page, you can simply create one XObject with the proper commands to render the image, add a reference to it, and call /Logo Do from your render stream. Then it will appear on every page automatically.

Nutrient and AP streams

Nutrient supports fully customizing the appearance stream of annotations. To learn more about this, refer to our appearance streams for iOS and appearance streams for Android guides.

Conclusion

This article served as an introduction to what appearance streams are and what their purpose is in a PDF file. While Nutrient mostly handles appearance streams transparently, we also offer a powerful API to customize them fully when needed. Go here to download a free trial and see this firsthand.

FAQ

What is an appearance stream in a PDF? An appearance stream (AP stream) is a set of rendering instructions embedded in an annotation that precisely defines how it should appear on the page, ensuring visual consistency across viewers.
Are appearance streams required in a PDF? No. They’re optional according to the specification, but highly recommended if you want annotations to look the same across different PDF viewers and platforms.
Where are appearance streams stored? Appearance streams are stored in the annotation’s `AP` dictionary, usually under the `N` (normal) key. Some annotations also support `R` (rollover) and `D` (down) appearances.
What’s the difference between an appearance stream and an XObject? An appearance stream is a type of XObject. XObjects are reusable renderable content blocks, and AP streams are special XObjects specifically used for annotations.
Can appearance streams include images? Yes, but instead of directly embedding images, AP streams reference them via XObjects. This improves efficiency and allows images to be shared across annotations or pages.
Does Nutrient support custom appearance streams? Yes. Nutrient offers full support for customizing appearance streams on both Android and iOS, allowing developers to tailor how annotations look.
Author
Patrik Weiskircher
Patrik Weiskircher Core Team Lead

Patrik is the team lead of the Core Team, which oversees the shared codebase between our products. He knows far too many things about PDFs — ask him about fonts!

Explore related topics

PDF Insights Development
Free trial Ready to get started?
Free trial

Related articles

Explore more
SDKTUTORIALSWebJavaScriptHow ToPDFRenderingViewing

What is a vector PDF? Understanding the difference between vector, raster, and text elements in PDF documents

SDKTUTORIALSWebJavaScriptHow ToPDFRenderingViewing

The ultimate guide to PDF rendering vs. PDF viewing (and when each is applicable)

SDKDEVELOPMENTZapierAPIPDFAutomationDocument Workflows

Introducing the Nutrient Document Web Services API on Zapier

Company
About
Security
Team
Careers
We're hiring
Partners
Legal
Products
SDK
Low-Code
Workflow
DWS API
resources
Blog
Events
Customer Stories
Tutorials
News
connect
Contact
LinkedIn
YouTube
Discord
X
Facebook
Popular
Java PDF Library
Tag Text
PDF SDK Viewer
Tag Text
React Native PDF SDK
Tag Text
PDF SDK
Tag Text
iOS PDF Viewer
Tag Text
PDF Viewer SDK/Library
Tag Text
PDF Generation
Tag Text
SDK
Web
Tag Text
Mobile/VR
Tag Text
Server
Tag Text
Use Cases
Tag Text
Industries
Tag Text
Resources
Blog
Tag Text
Events
Customer Stories
Tag Text
Tutorials
Tag Text
Features List
Tag Text
Compare
Tag Text
community
Free Trial
Tag Text
Documentation
Tag Text
Nutrient Portal
Tag Text
Contact Support
Tag Text
Company
About
Tag Text
Security
Tag Text
Careers
Tag Text
Legal
Tag Text
Pricing
Tag Text
Partners
Tag Text
connect
Contact
Tag Text
LinkedIn
Tag Text
YouTube
Tag Text
Discord
Tag Text
X
Tag Text
Facebook
Tag Text
low-code
Document Converter
Tag Text
Document Editor
Tag Text
Document Automation Server
Tag Text
Document Searchability
Tag Text
Use Cases
Tag Text
Industries
Tag Text
Resources
Blog
Tag Text
Events
Customer Stories
Tag Text
Support
Help Center
Tag Text
Contact Support
Tag Text
Log In
Tag Text
Company
About
Tag Text
Careers
Tag Text
Security
Tag Text
Legal
Tag Text
Pricing
Tag Text
Partners
Tag Text
connect
Contact
Tag Text
LinkedIn
Tag Text
YouTube
Tag Text
Discord
Tag Text
X
Tag Text
Facebook
Tag Text
Popular
Approvals matrix
Tag Text
BPMS
Tag Text
Budgeting process
Tag Text
CapEx approval
Tag Text
CapEx automation
Tag Text
Document approval
Tag Text
Task automation
Tag Text
workflow
Overview
Tag Text
Services
Tag Text
Industries
Tag Text
Departments
Tag Text
Resources
Blog
Tag Text
Events
Customer Stories
Tag Text
Support
Help Center
Tag Text
FAQ
Tag Text
Troubleshooting
Tag Text
Contact Support
Tag Text
Company
About
Tag Text
Careers
Tag Text
Security
Tag Text
Legal
Tag Text
Pricing
Tag Text
Partners
Tag Text
connect
Contact
Tag Text
LinkedIn
Tag Text
YouTube
Tag Text
Discord
Tag Text
X
Tag Text
Facebook
Tag Text
DWS api
PDF Generator
Tag Text
Editor
Tag Text
Converter API
Tag Text
Watermark
Tag Text
OCR
Tag Text
Table Extraction
Tag Text
Resources
Log in
Tag Text
Help Center
Tag Text
Support
Tag Text
Blog
Tag Text
Company
About
Tag Text
Careers
Tag Text
Security
Tag Text
Pricing
Tag Text
Legal
Privacy
Tag Text
Terms
Tag Text
connect
Contact
Tag Text
X
Tag Text
YouTube
Tag Text
Discord
Tag Text
LinkedIn
Tag Text
Facebook
Tag Text

Copyright 2025 Nutrient. All rights reserved.

Thank you for subscribing to our newsletter!

We’re thrilled to have you join our community. You’re now one step closer to receiving the latest updates, exclusive content, and special offers directly in your inbox.

This builtin is not currently supported: DOM

PSPDFKit is now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

This builtin is not currently supported: DOM

PSPDFKit is now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

This builtin is not currently supported: DOM

New Feature Release. Tap into revolutionary AI technology to instantly complete tasks, analyze text, and redact key information across your documents. Learn More or View Showcase

This builtin is not currently supported: DOM

Aquaforest and Muhimbi are now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

This builtin is not currently supported: DOM

Integrify is now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

This builtin is not currently supported: DOM

Join us on April 15th. Join industry leaders, product experts, and fellow professionals at our exclusive user conference. Register for conference