Commit cb4befa0 authored by Alexey.Musinov's avatar Alexey.Musinov

up

parent f624f731
......@@ -52,36 +52,57 @@
{
[super viewDidLoad];
//[self testDOCX];
[self testDOCX];
[self testXLSX];
}
- (void)testDOCX
{
NSLog(@"==================== OPEN DOCX ====================");
NSString *path = [[NSBundle mainBundle] pathForResource:@"demo" ofType:@"docx"];
NSString* fullFileName = path;
NSString* fullFileNameTo = [NSString stringWithFormat:@"%@demo.bin", NSTemporaryDirectory()];
NSString* tempDir = NSTemporaryDirectory();
NSString* fontsPath = @"/System/Library/Fonts";
X2tConverter* conv = [[X2tConverter alloc]init];
[conv sdk_docx2doct_bin:fullFileName nsTo:fullFileNameTo nsTemp:tempDir nsFontPath:fontsPath];
NSLog(@"%@",fullFileNameTo);
NSString* docxOut = [NSString stringWithFormat:@"%@document.docx", NSTemporaryDirectory()];
NSString* outTemp = [NSString stringWithFormat:@"%@OUT_TEMP", NSTemporaryDirectory()];
[self createDirectory:outTemp];
[self clearDirectory:outTemp];
X2tConverter* conv2 = [[X2tConverter alloc]init];
[conv2 sdk_doct_bin2docx:fullFileNameTo nsTo:docxOut nsTemp:outTemp nsFontPath:fontsPath fromChanges:@(NO) nsThemeDir:@""];
{
NSLog(@"==================== OPEN DOCX ====================");
NSString *path = [[NSBundle mainBundle] pathForResource:@"demo" ofType:@"docx"];
NSString* fullFileName = path;
NSString* fullFileNameTo = [NSString stringWithFormat:@"%@demo.bin", NSTemporaryDirectory()];
NSString* tempDir = NSTemporaryDirectory();
NSString* fontsPath = @"/System/Library/Fonts";
X2tConverter* conv = [[X2tConverter alloc]init];
conv.isNoBase64 = YES;
[conv sdk_docx2doct_bin:fullFileName nsTo:fullFileNameTo nsTemp:tempDir nsFontPath:fontsPath];
NSLog(@"doct output : %@", fullFileNameTo);
}
NSLog(@"doct output: %@",fullFileNameTo);
{
NSLog(@"==================== OPEN DOCT ====================");
NSString *path = [[NSBundle mainBundle] pathForResource:@"demo" ofType:@"docx"];
NSString* fullFileName = path;
NSString* fullFileNameTo = [NSString stringWithFormat:@"%@demo.bin", NSTemporaryDirectory()];
NSString* tempDir = NSTemporaryDirectory();
NSString* fontsPath = @"/System/Library/Fonts";
X2tConverter* conv = [[X2tConverter alloc]init];
conv.isNoBase64 = YES;
[conv sdk_docx2doct_bin:fullFileName nsTo:fullFileNameTo nsTemp:tempDir nsFontPath:fontsPath];
NSLog(@"%@",fullFileNameTo);
NSString* docxOut = [NSString stringWithFormat:@"%@document.docx", NSTemporaryDirectory()];
NSString* outTemp = [NSString stringWithFormat:@"%@OUT_TEMP", NSTemporaryDirectory()];
[self createDirectory:outTemp];
[self clearDirectory:outTemp];
X2tConverter* conv2 = [[X2tConverter alloc]init];
conv.isNoBase64 = YES;
[conv2 sdk_doct_bin2docx:fullFileNameTo nsTo:docxOut nsTemp:outTemp nsFontPath:fontsPath fromChanges:@(NO) nsThemeDir:@""];
NSLog(@"doct output: %@",fullFileNameTo);
}
}
- (void)testXLSX
......@@ -97,6 +118,7 @@
NSString* fontsPath = @"/System/Library/Fonts";
X2tConverter* conv = [[X2tConverter alloc]init];
conv.isNoBase64 = YES;
[conv sdk_xlsx2xlst_bin:fullFileName nsTo:fullFileNameTo nsTemp:tempDir nsFontPath:fontsPath];
NSLog(@"xlst output : %@", fullFileNameTo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment