Skip to content

Improve Image alignment documentation for inline image placement#1474

Merged
andreasrosdal merged 2 commits intomasterfrom
copilot/fix-issue-1255
Feb 16, 2026
Merged

Improve Image alignment documentation for inline image placement#1474
andreasrosdal merged 2 commits intomasterfrom
copilot/fix-issue-1255

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Description of the new Feature/Bugfix

Issue #1255 reports users cannot place seal images inline with text—the functionality exists via TEXTWRAP and UNDERLYING flags but documentation was minimal ("this is a kind of image alignment").

Changes:

  • Enhanced JavaDoc in Image.java:

    • Documented TEXTWRAP flag enables text wrapping around images for inline placement
    • Documented UNDERLYING flag places images behind text (watermarks/seals)
    • Added usage examples with bitwise OR combinations to setAlignment() method
    • Added flag inspection examples to getAlignment() method
  • Added InlineImageWithText.java example:

Usage:

Image sealImage = Image.getInstance("seal.png");
sealImage.scaleToFit(80f, 80f);
sealImage.setAlignment(Image.RIGHT | Image.TEXTWRAP);
document.add(sealImage);
document.add(new Paragraph("Signature: John Smith\nDate: 2025-01-01"));
// Seal appears inline with signature text

Unit-Tests for the new Feature/Bugfix

  • Unit-Tests added to reproduce the bug
  • Unit-Tests added to the added feature

No unit tests added—changes are documentation-only. Example code compiles and demonstrates correct usage.

Compatibilities Issues

None. Documentation-only changes with no API modifications.

Your real name

GitHub Copilot Agent (andreasrosdal)

Testing details

Verified by compiling Image.java and InlineImageWithText.java with Java 21. Code review and CodeQL security scan passed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github-production-user-asset-6210df.s3.amazonaws.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@andreasrosdal andreasrosdal changed the title [WIP] Fix issue with PDF font encoding Fix Issue #1255: Improve Image Alignment Documentation Feb 16, 2026
Co-authored-by: andreasrosdal <259156774+andreasrosdal@users.noreply.github.com>
@sonarqubecloud
Copy link

Copilot AI changed the title Fix Issue #1255: Improve Image Alignment Documentation Improve Image alignment documentation for inline image placement Feb 16, 2026
Copilot AI requested a review from andreasrosdal February 16, 2026 10:52
@andreasrosdal andreasrosdal marked this pull request as ready for review February 16, 2026 10:52
@andreasrosdal andreasrosdal merged commit ebd03fd into master Feb 16, 2026
13 checks passed
@andreasrosdal andreasrosdal deleted the copilot/fix-issue-1255 branch February 16, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants