Commit eb29cee9 authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'hotfix/v4.2.3'

parents 13d57361 6e3b7b11
...@@ -529,10 +529,11 @@ namespace NSDoctRenderer ...@@ -529,10 +529,11 @@ namespace NSDoctRenderer
if (js_func_get_file_s->IsFunction()) if (js_func_get_file_s->IsFunction())
{ {
v8::Handle<v8::Function> func_get_file_s = v8::Handle<v8::Function>::Cast(js_func_get_file_s); v8::Handle<v8::Function> func_get_file_s = v8::Handle<v8::Function>::Cast(js_func_get_file_s);
int nArgument = pParams->m_nSaveToPDFParams;
if (pParams->m_bIsOnlyOnePage) if (pParams->m_bIsOnlyOnePage)
args[0] = v8::Int32::New(isolate, pParams->m_nSaveToPDFParams); nArgument |= 0x0100;
else args[0] = v8::Int32::New(isolate, nArgument);
args[0] = v8::Int32::New(isolate, 0x0100);
v8::Local<v8::Value> js_result2 = func_get_file_s->Call(global_js, 1, args); v8::Local<v8::Value> js_result2 = func_get_file_s->Call(global_js, 1, args);
if (try_catch.HasCaught()) if (try_catch.HasCaught())
......
...@@ -218,7 +218,7 @@ namespace NSOnlineOfficeBinToPdf ...@@ -218,7 +218,7 @@ namespace NSOnlineOfficeBinToPdf
double h = oInfo.arSizes[nPageIndex].height; double h = oInfo.arSizes[nPageIndex].height;
double dKoef1 = nRasterW / w; double dKoef1 = nRasterW / w;
double dKoef2 = nRasterW / h; double dKoef2 = nRasterH / h;
if (dKoef1 > dKoef2) if (dKoef1 > dKoef2)
dKoef1 = dKoef2; dKoef1 = dKoef2;
......
...@@ -288,8 +288,12 @@ namespace PdfReader ...@@ -288,8 +288,12 @@ namespace PdfReader
oFrame.put_Height(nHeight); oFrame.put_Height(nHeight);
oFrame.put_Stride(-4 * nWidth); oFrame.put_Stride(-4 * nWidth);
oRenderer.CreateFromBgraFrame(&oFrame); oRenderer.CreateFromBgraFrame(&oFrame);
oRenderer.SetSwapRGB(false); oRenderer.SetSwapRGB(false);
dWidth *= 25.4 / dDpiX;
dHeight *= 25.4 / dDpiY;
oRenderer.put_Width(dWidth); oRenderer.put_Width(dWidth);
oRenderer.put_Height(dHeight); oRenderer.put_Height(dHeight);
......
...@@ -1796,7 +1796,7 @@ namespace NExtractTools ...@@ -1796,7 +1796,7 @@ namespace NExtractTools
pReader->GetPageInfo(i, &dWidth, &dHeight, &dPageDpiX, &dPageDpiY); pReader->GetPageInfo(i, &dWidth, &dHeight, &dPageDpiX, &dPageDpiY);
double dKoef1 = nRasterWCur / dWidth; double dKoef1 = nRasterWCur / dWidth;
double dKoef2 = nRasterWCur / dHeight; double dKoef2 = nRasterHCur / dHeight;
if (dKoef1 > dKoef2) if (dKoef1 > dKoef2)
dKoef1 = dKoef2; dKoef1 = dKoef2;
......
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