Fix bugs in document info

This commit is contained in:
Oleg Korshul
2022-03-22 15:51:10 +03:00
parent e3faa6db48
commit 49eff29fac
3 changed files with 23 additions and 23 deletions

View File

@ -266,13 +266,11 @@ std::wstring CDjVuFileImplementation::GetInfo()
double nH = 0;
double nDpi = 0;
GetPageInfo(0, &nW, &nH, &nDpi, &nDpi);
sRes += L"\"PageSize\":\"";
std::wstring size = std::to_wstring(nW);
sRes += size.substr(0, size.length() - 4);
sRes += L"x";
size = std::to_wstring(nH);
sRes += size.substr(0, size.length() - 4);
sRes += L"\",\"NumberOfPages\":";
sRes += L"\"PageWidth\":";
sRes += std::to_wstring((int)(nW * 100));
sRes += L",\"PageHeight\":";
sRes += std::to_wstring((int)(nH * 100));
sRes += L",\"NumberOfPages\":";
sRes += std::to_wstring(GetPagesCount());
sRes += L"}";