|
@@ -45,7 +45,7 @@
|
|
|
- (void)viewDidLoad {
|
|
|
[super viewDidLoad];
|
|
|
// Do any additional setup after loading the view.
|
|
|
- self.explainLabel.text = NSLocalizedString(@"The sample code illustrates how to add and remove watermarks, including text and image watermarks. date using API.", nil);
|
|
|
+ self.explainLabel.text = NSLocalizedString(@"This sample shows how to add watermarks, including text, image and tile watermarks, and delete watermarks.", nil);
|
|
|
|
|
|
self.commandLineTextView.text = @"";
|
|
|
self.isRun = NO;
|
|
@@ -99,16 +99,16 @@
|
|
|
self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Text :%@", watermark.text];
|
|
|
CGFloat red, green, blue, alpha;
|
|
|
[watermark.textColor getRed:&red green:&green blue:&blue alpha:&alpha];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Color : red:%f, green:%f, blue:%f, alpha:%f", red, green, blue, alpha];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"FontSize :%f", watermark.textFont.pointSize];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Opacity :%f", watermark.opacity];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Vertalign :%@", [self getStringFromEnumVertalign:watermark.verticalPosition]];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Horizalign :%@", [self getStringFromEnumHorizalign:watermark.horizontalPosition]];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VertOffset :%f", watermark.tx];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizOffset :%f", watermark.ty];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Pages :%@", watermark.pageString];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VerticalSpacing :%f", watermark.verticalSpacing];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizontalSpacing :%f", watermark.horizontalSpacing];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Color : red:%.1f, green:%.1f, blue:%.1f, alpha:%.1f\n", red, green, blue, alpha];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"FontSize :%.1f\n", watermark.textFont.pointSize];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Opacity :%.1f\n", watermark.opacity];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Vertalign :%@\n", [self getStringFromEnumVertalign:watermark.verticalPosition]];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Horizalign :%@\n", [self getStringFromEnumHorizalign:watermark.horizontalPosition]];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VertOffset :%.1f\n", watermark.tx];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizOffset :%.1f\n", watermark.ty];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Pages :%@\n", watermark.pageString];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VerticalSpacing :%.1f\n", watermark.verticalSpacing];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizontalSpacing :%.1f\n", watermark.horizontalSpacing];
|
|
|
self.commandLineStr = [self.commandLineStr stringByAppendingString:@"Done. Results saved in AddTextWatermarkTest.pdf\n"];
|
|
|
}
|
|
|
|
|
@@ -150,14 +150,14 @@
|
|
|
[document writeToURL:self.addImageWatermarkURL];
|
|
|
|
|
|
// Print text watermark object message
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Opacity :%f", watermark.opacity];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Vertalign :%@", [self getStringFromEnumVertalign:watermark.verticalPosition]];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Horizalign :%@", [self getStringFromEnumHorizalign:watermark.horizontalPosition]];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VertOffset :%f", watermark.tx];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizOffset :%f", watermark.ty];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Pages :%@", watermark.pageString];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VerticalSpacing :%f", watermark.verticalSpacing];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizontalSpacing :%f", watermark.horizontalSpacing];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Opacity :%.1f\n", watermark.opacity];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Vertalign :%@\n", [self getStringFromEnumVertalign:watermark.verticalPosition]];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Horizalign :%@\n", [self getStringFromEnumHorizalign:watermark.horizontalPosition]];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VertOffset :%.1f\n", watermark.tx];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizOffset :%.1f\n", watermark.ty];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Pages :%@\n", watermark.pageString];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VerticalSpacing :%.1f\n", watermark.verticalSpacing];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizontalSpacing :%.1f\n", watermark.horizontalSpacing];
|
|
|
self.commandLineStr = [self.commandLineStr stringByAppendingString:@"Done. Results saved in AddImageWatermarkTest.pdf\n"];
|
|
|
}
|
|
|
|
|
@@ -204,19 +204,19 @@
|
|
|
[document writeToURL:self.addTilesWatermarkURL];
|
|
|
|
|
|
// Print text tiles watermark message
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Text :%@", watermark.text];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Text :%@\n", watermark.text];
|
|
|
CGFloat red, green, blue, alpha;
|
|
|
[watermark.textColor getRed:&red green:&green blue:&blue alpha:&alpha];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Color : red:%f, green:%f, blue:%f, alpha:%f", red, green, blue, alpha];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"FontSize :%f", watermark.textFont.pointSize];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Opacity :%f", watermark.opacity];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Vertalign :%@", [self getStringFromEnumVertalign:watermark.verticalPosition]];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Horizalign :%@", [self getStringFromEnumHorizalign:watermark.horizontalPosition]];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VertOffset :%f", watermark.tx];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizOffset :%f", watermark.ty];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Pages :%@", watermark.pageString];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VerticalSpacing :%f", watermark.verticalSpacing];
|
|
|
- self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizontalSpacing :%f", watermark.horizontalSpacing];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Color : red:%.1f, green:%.1f, blue:%f, alpha:%.1f\n", red, green, blue, alpha];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"FontSize :%.1f\n", watermark.textFont.pointSize];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Opacity :%.1f\n", watermark.opacity];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Vertalign :%@\n", [self getStringFromEnumVertalign:watermark.verticalPosition]];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Horizalign :%@\n", [self getStringFromEnumHorizalign:watermark.horizontalPosition]];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VertOffset :%.1f\n", watermark.tx];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizOffset :%.1f\n", watermark.ty];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"Pages :%@\n", watermark.pageString];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"VerticalSpacing :%.1f\n", watermark.verticalSpacing];
|
|
|
+ self.commandLineStr = [self.commandLineStr stringByAppendingFormat:@"HorizontalSpacing :%.1f\n", watermark.horizontalSpacing];
|
|
|
self.commandLineStr = [self.commandLineStr stringByAppendingString:@"Done. Results saved in AddTilesWatermarkTest.pdf\n"];
|
|
|
}
|
|
|
|