Skip to content

Commit

Permalink
Merge pull request #305 from veraPDF/cos_alt
Browse files Browse the repository at this point in the history
PDF/UA-2. Add new type CosAlt and new properties
  • Loading branch information
MaximPlusov authored Oct 23, 2023
2 parents e0fb44e + 4d887d3 commit c2f971d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/CosLayer.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ type CosBM extends CosName {
type CosActualText extends CosString {
}

% alt
type CosAlt extends CosString {
}


% PDF Name representing a Utf8 string
type CosUnicodeName extends CosName {
% indicates if the Name represents a Unicode string correctly encoded by Utf8
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/Operator.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.verapdf.model.coslayer.CosDict;
import org.verapdf.model.coslayer.CosRenderingIntent;
import org.verapdf.model.coslayer.CosLang;
import org.verapdf.model.coslayer.CosActualText;
import org.verapdf.model.coslayer.CosAlt;

import org.verapdf.model.pdlayer.PDColorSpace;
import org.verapdf.model.pdlayer.PDExtGState;
Expand Down Expand Up @@ -487,6 +488,8 @@ type Op_Do extends OpXObject {
type OpMarkedContent extends Operator {
% actual text
link actualText: CosActualText?;
% alt
link alt: CosAlt?;
}

% define marked content point
Expand Down Expand Up @@ -563,6 +566,8 @@ type Glyph extends Object {
property unicodePUA: Boolean;
% true if an ActualText entry is present for this glyph
property actualTextPresent: Boolean;
% true if an Alt entry is present for this glyph
property altPresent: Boolean;
}

% glyph in the composite font
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/PDLayer.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.verapdf.model.coslayer.CosBM;
import org.verapdf.model.coslayer.CosLang;
import org.verapdf.model.coslayer.CosTextString;
import org.verapdf.model.coslayer.CosActualText;
import org.verapdf.model.coslayer.CosAlt;

import org.verapdf.model.operator.Operator;

Expand Down Expand Up @@ -869,6 +870,8 @@ type PDStructElem extends PDStructTreeNode {
property circularMappingExist: Boolean;
% value of the ActualText entry
link actualText: CosActualText?;
% value of the Alt entry
link alt: CosAlt?;
% the namespace and the tag within a given namespace that is remapped to another tag within the same namespace
property roleMapToSameNamespaceTag: String;
}
Expand Down

0 comments on commit c2f971d

Please sign in to comment.