Skip to content

Commit b57ecce

Browse files
ars18wrwitext-teamcity
authored andcommitted
Minor refactoring of pdfa log messages.
Autoported commit. Original commit hash: [1ea46c57c]
1 parent f146856 commit b57ecce

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

itext/itext.pdfa/itext/pdfa/PdfAConformanceException.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ public const String THE_F_KEYS_PRINT_FLAG_BIT_SHALL_BE_SET_TO_1_AND_ITS_HIDDEN_I
250250

251251
public const String THE_VALUE_OF_THE_METH_ENTRY_IN_COLR_BOX_SHALL_BE_1_2_OR_3 = "The value of the meth entry in colr box shall be 1, 2 or 3";
252252

253-
public const String TINT_TRANSFORM_AND_ALTERNATE_SPACE_OF_SEPARATION_ARRAYS_IN_THE_COLORANTS_OF_DEVICE_N_SHALL_BE_CONSISTENT_WITH_SAME_ATTRIBUTES_OF_DEVICE_N
254-
= "TintTransform and alternateSpace of separation arrays in the colorants of deviceN shall be consistent with same attributes of deviceN";
255-
256253
public const String TINT_TRANSFORM_AND_ALTERNATE_SPACE_SHALL_BE_THE_SAME_FOR_THE_ALL_SEPARATION_CS_WITH_THE_SAME_NAME
257254
= "TintTransform and alternateSpace shall be the same for the all separation cs with the same name";
258255

itext/itext.pdfa/itext/pdfa/PdfAConformanceLogMessageConstant.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,8 @@ public sealed class PdfAConformanceLogMessageConstant {
5555
public const String FILE_SPECIFICATION_DICTIONARY_SHOULD_CONTAIN_DESC_KEY = "File specification dictionary should contain desc key";
5656

5757
public const String TEXT_ANNOTATIONS_SHOULD_SET_THE_NOZOOM_AND_NOROTATE_FLAG_BITS_OF_THE_F_KEY_TO_1 = "Text annotations should set the nozoom and norotate flag bits of the f key to 1";
58+
59+
public const String TINT_TRANSFORM_AND_ALTERNATE_SPACE_OF_SEPARATION_ARRAYS_IN_THE_COLORANTS_OF_DEVICE_N_SHOULD_BE_CONSISTENT_WITH_SAME_ATTRIBUTES_OF_DEVICE_N
60+
= "TintTransform and alternateSpace of separation arrays in the colorants of deviceN should be consistent with same attributes of deviceN";
5861
}
5962
}

itext/itext.pdfa/itext/pdfa/checker/PdfA1Checker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ protected internal override void CheckFormXObject(PdfStream form) {
308308
throw new PdfAConformanceException(PdfAConformanceException.A_FORM_XOBJECT_DICTIONARY_SHALL_NOT_CONTAIN_SUBTYPE2_KEY_WITH_A_VALUE_OF_PS
309309
);
310310
}
311-
if (form.ContainsKey(PdfName.SMask)) {
311+
if (form.ContainsKey(PdfName.SMask) && !PdfName.None.Equals(form.GetAsName(PdfName.SMask))) {
312312
throw new PdfAConformanceException(PdfAConformanceException.THE_SMASK_KEY_IS_NOT_ALLOWED_IN_XOBJECTS);
313313
}
314314
if (form.ContainsKey(PdfName.Group) && PdfName.Transparency.Equals(form.GetAsDictionary(PdfName.Group).GetAsName

itext/itext.pdfa/itext/pdfa/checker/PdfA2Checker.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,8 @@ private void CheckSeparationInsideDeviceN(PdfArray separation, PdfObject deviceN
849849
) {
850850
if (!IsAltCSIsTheSame(separation.Get(2), deviceNColorSpace) || !deviceNTintTransform.Equals(separation.Get
851851
(3))) {
852-
throw new PdfAConformanceException(PdfAConformanceException.TINT_TRANSFORM_AND_ALTERNATE_SPACE_OF_SEPARATION_ARRAYS_IN_THE_COLORANTS_OF_DEVICE_N_SHALL_BE_CONSISTENT_WITH_SAME_ATTRIBUTES_OF_DEVICE_N
852+
ILog logger = LogManager.GetLogger(typeof(PdfAChecker));
853+
logger.Warn(PdfAConformanceLogMessageConstant.TINT_TRANSFORM_AND_ALTERNATE_SPACE_OF_SEPARATION_ARRAYS_IN_THE_COLORANTS_OF_DEVICE_N_SHOULD_BE_CONSISTENT_WITH_SAME_ATTRIBUTES_OF_DEVICE_N
853854
);
854855
}
855856
CheckSeparationCS(separation);

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
44d7a03afc6a80eb4ac12ef4f1418e2480b5f54f
1+
1ea46c57c983383315bae947552dcd9a943f0d5c

0 commit comments

Comments
 (0)