diff --git a/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.h b/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.h index 64073afad..651141089 100644 --- a/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.h +++ b/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.h @@ -131,6 +131,11 @@ ORK1_CLASS_AVAILABLE */ - (void)addSignature:(ORK1ConsentSignature *)signature; +/** + Produces an HTML version of the consent document with signature images embedded. + */ +@property (nonatomic, readonly) NSString *htmlWithSignatures; + /// @name Alternative content provision /** diff --git a/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.m b/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.m index 39fce37c4..bd8eae409 100644 --- a/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.m +++ b/ORK1Kit/ORK1Kit/Consent/ORK1ConsentDocument.m @@ -88,6 +88,10 @@ - (void)addSignature:(ORK1ConsentSignature *)signature { [_signatures addObject:signature]; } +- (NSString *)htmlWithSignatures { + return [self htmlForMobile:NO withTitle:nil detail:nil]; +} + - (void)makePDFWithCompletionHandler:(void (^)(NSData *data, NSError *error))completionBlock { [_writer writePDFFromHTML:[self htmlForMobile:NO withTitle:nil detail:nil] withCompletionBlock:^(NSData *data, NSError *error) { diff --git a/ResearchKit/Consent/ORKConsentDocument.h b/ResearchKit/Consent/ORKConsentDocument.h index fc645f385..196f61165 100644 --- a/ResearchKit/Consent/ORKConsentDocument.h +++ b/ResearchKit/Consent/ORKConsentDocument.h @@ -132,6 +132,11 @@ ORK_CLASS_AVAILABLE */ - (void)addSignature:(ORKConsentSignature *)signature; +/** + Produces an HTML version of the consent document with signature images embedded. + */ +@property (nonatomic, readonly) NSString *htmlWithSignatures; + /// @name Alternative content provision /** diff --git a/ResearchKit/Consent/ORKConsentDocument.m b/ResearchKit/Consent/ORKConsentDocument.m index 4e240d58c..d14df3621 100644 --- a/ResearchKit/Consent/ORKConsentDocument.m +++ b/ResearchKit/Consent/ORKConsentDocument.m @@ -89,6 +89,10 @@ - (void)addSignature:(ORKConsentSignature *)signature { [_signatures addObject:signature]; } +- (NSString *)htmlWithSignatures { + return [self htmlForMobile:NO title:nil detail:nil]; +} + - (void)makePDFWithCompletionHandler:(void (^)(NSData *data, NSError *error))completionBlock { [_writer writePDFFromHTML:[self htmlForMobile:NO title:nil detail:nil] completionBlock:^(NSData *data, NSError *error) {