Commit 3ce46d81 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

терялись картинки при печати через DoctRenderer (из-за того, что DocumentUtl пустой в js)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64058 954022d7-b5bf-4e40-9824-e11837661b57
parent 4a724ffb
......@@ -50,4 +50,23 @@ CONFIG(debug, debug|release) {
LIBS += -L$$DESTINATION_SDK_PATH_DOCTRENDERER -ldoctrenderer
#################### PDF ######################
#DEFINES += USE_PDF_RENDERER
#
#DEFINES += PDFWRITER_USE_DYNAMIC_LIBRARY
#LIBS += -L$$DESTINATION_SDK_PATH_DOCTRENDERER -lPdfWriter
#
#INCLUDEPATH += \
# ../../agg-2.4/include \
# ../../freetype-2.5.2/include \
# ../../cximage/jasper/include \
# ../../cximage/jpeg \
# ../../cximage/png \
# ../../cximage/zlib
#LIBS += -L$$DESTINATION_SDK_PATH_DOCTRENDERER -lgraphics
#win32 {
# LIBS += -lShell32 -lAdvapi32
#}
###############################################
SOURCES += main.cpp
#include "../doctrenderer.h"
#ifdef USE_PDF_RENDERER
#include "../../../PdfWriter/PdfRenderer.h"
#include "../../fontengine/ApplicationFonts.h"
#endif
int main(int argc, char *argv[])
{
#if 1
......@@ -47,10 +52,25 @@ int main(int argc, char *argv[])
</Settings>";
#endif
#if 1
NSDoctRenderer::CDoctrenderer oRenderer;
std::wstring sError;
oRenderer.Execute(strXml, sError);
#endif
#ifdef USE_PDF_RENDERER
CApplicationFonts oFonts;
oFonts.Initialize();
CPdfRenderer oPDF(&oFonts);
oPDF.SetTempFolder(L"D:\\test_pdf");
oPDF.OnlineWordToPdfFromBinary(L"D:\\test_pdf\\pdf.bin", L"D:\\test_pdf\\123.pdf");
#endif
return 0;
}
......@@ -252,7 +252,12 @@ namespace NSOnlineOfficeBinToPdf
else
{
if (wsHtmlPlace.length() > 0)
wsTempString = wsHtmlPlace + L"/" + wsTempString;
{
if (0 == wsTempString.find(L"media") || NSFile::CFileBinary::Exists(wsTempString = wsHtmlPlace + L"/" + wsTempString))
wsTempString = wsHtmlPlace + L"/" + wsTempString;
else
wsTempString = wsHtmlPlace + L"/media/" + wsTempString;
}
std::wstring wsSvgExt(L".svg");
if (0 == wsTempString.compare(wsTempString.length() - wsSvgExt.length(), std::wstring::npos, wsSvgExt))
......@@ -270,6 +275,7 @@ namespace NSOnlineOfficeBinToPdf
if (0 == wsTempString.find(L"file:///"))
{
// TODO: под linux код неправильный
NSStringExt::Replace(wsTempString, L"file:///", L"");
NSStringExt::Replace(wsTempString, L"\\", L"/");
}
......
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