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