Skip to content

Commit

Permalink
PDFBOX-5890: add simpler method to pass MCID
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1921569 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Oct 26, 2024
1 parent 87c2ec4 commit 5638fa1
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,24 @@ public void beginMarkedContent(COSName tag) throws IOException
writeOperator(OperatorName.BEGIN_MARKED_CONTENT);
}

/**
* Begin a marked content sequence with a reference to the marked content identifier (MCID).
*
* @param tag the tag to be added to the content stream
* @param mcid the marked content identifier (MCID)
* @throws IOException If the content stream could not be written
*/
public void beginMarkedContent(COSName tag, int mcid) throws IOException
{
if (mcid < 0)
{
throw new IllegalArgumentException("mcid should not be negative");
}
writeOperand(tag);
write("<</MCID " + mcid + ">> ");
writeOperator(OperatorName.BEGIN_MARKED_CONTENT_SEQ);
}

/**
* Begin a marked content sequence with a reference to an entry in the page resources' Properties dictionary.
*
Expand Down

0 comments on commit 5638fa1

Please sign in to comment.