Commit 0aab84ea authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

проект для создания фреймворка pdfwriter под ios

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61246 954022d7-b5bf-4e40-9824-e11837661b57
parent 13b25dfb
......@@ -2261,6 +2261,9 @@ DesktopEditor/freetype_names/FontsDictionaryFiles/wst_span.fon svn_mime_002dtype
DesktopEditor/freetype_names/FontsDictionaryFiles/wst_swed.fon svn_mime_002dtype=application%2Foctet-stream
DesktopEditor/freetype_names/FontsDictionaryFiles/wt002.ttf svn_mime_002dtype=application%2Foctet-stream
DesktopEditor/ios_projects svnc_tsvn_003alogminsize=5
DesktopEditor/ios_projects/PdfWriter svnc_tsvn_003alogminsize=5
DesktopEditor/ios_projects/PdfWriter/PdfWriter.xcodeproj svnc_tsvn_003alogminsize=5
DesktopEditor/ios_projects/PdfWriter/PdfWriter.xcodeproj/project.xcworkspace svnc_tsvn_003alogminsize=5
DesktopEditor/ios_projects/libxml2 svnc_tsvn_003alogminsize=5
DesktopEditor/ios_projects/libxml2/libxml2.xcodeproj svnc_tsvn_003alogminsize=5
DesktopEditor/ios_projects/libxml2/libxml2.xcodeproj/project.xcworkspace svnc_tsvn_003alogminsize=5
......
//
// AscEditorPDFPrinter.h
// PdfWriter
//
// Created by Oleg Korshul on 04.03.15.
// Copyright (c) 2015 Ascensio System. All rights reserved.
//
#ifndef PdfWriter_AscEditorPDFPrinter_h
#define PdfWriter_AscEditorPDFPrinter_h
#include <string>
class CAscEditorPDFPrinter
{
public:
std::wstring m_strImagesPath;
std::wstring m_strPresentationThemesPath;
public:
CAscEditorPDFPrinter()
{
m_strImagesPath = L"";
m_strPresentationThemesPath = L"";
}
public:
bool Print(unsigned char* pSrcData, unsigned int nSrcLen, std::wstring strDstFile);
};
#endif
//
// AscEditorPDFPrinter.cpp
// PdfWriter
//
// Created by Oleg Korshul on 04.03.15.
// Copyright (c) 2015 Ascensio System. All rights reserved.
//
#include <stdio.h>
#include "./AscEditorPDFPrinter.h"
#include "../../../ASCOfficePDFWriter/PdfWriterLib/PdfWriterLib.h"
bool CAscEditorPDFPrinter::Print(unsigned char *pSrcData, unsigned int nSrcLen, std::wstring strDstFile)
{
return false;
}
// file downloader realize
#ifdef BOOL
#undef BOOL
#endif
#include "../../../Common/FileDownloader.h"
#import <Foundation/Foundation.h>
HRESULT CFileDownloader::DownloadFileAll(std::wstring sFileURL, std::wstring strFileOutput)
{
NSString* pStringUrl = [ [ NSString alloc ]
initWithBytes : (char*)sFileURL.data()
length : sFileURL.length() * sizeof(wchar_t)
encoding : CFStringConvertEncodingToNSStringEncoding ( kCFStringEncodingUTF32LE ) ];
NSString* pStringOutput = [ [ NSString alloc ]
initWithBytes : (char*)strFileOutput.data()
length : strFileOutput.length() * sizeof(wchar_t)
encoding : CFStringConvertEncodingToNSStringEncoding ( kCFStringEncodingUTF32LE ) ];
NSURL *url = [NSURL URLWithString:pStringUrl];
NSData *urlData = [NSData dataWithContentsOfURL:url];
if ( urlData )
{
[urlData writeToFile:pStringOutput atomically:YES];
return S_OK;
}
return S_FALSE;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:PdfWriter.xcodeproj">
</FileRef>
</Workspace>
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