Commit eb965c1d authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander Trofimov

Добавлен новый проект PdfReader для кроссплатформенного чтения Pdf.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62480 954022d7-b5bf-4e40-9824-e11837661b57
parent 132fb2cb
......@@ -7305,6 +7305,25 @@ OfficeCore/Test/TestConsole/bin/Debug/TestConsole.vshost.exe svn_mime_002dtype=a
OfficeCore/Test/TestConsole/bin/Release/Interop.OfficeCore.dll svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Release/TestConsole.exe svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Release/TestConsole.pdb svn_mime_002dtype=application%2Foctet-stream
/PdfReader svnc_tsvn_003alogminsize=5
PdfReader/PdfReaderTest svnc_tsvn_003alogminsize=5
PdfReader/Resources svnc_tsvn_003alogminsize=5
PdfReader/Resources/Fonts svnc_tsvn_003alogminsize=5
PdfReader/Resources/Fonts/d050000l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n019003l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n019004l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n019023l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n019024l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n021003l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n021004l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n021023l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n021024l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n022003l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n022004l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n022023l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/n022024l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Resources/Fonts/s050000l.pfb svn_mime_002dtype=application%2Foctet-stream
PdfReader/Src svnc_tsvn_003alogminsize=5
Redist/ASCEBOOKWriter.dll svn_mime_002dtype=application%2Foctet-stream
Redist/ASCFontConverter.dll svn_mime_002dtype=application%2Foctet-stream
Redist/ASCGraphics.dll svn_mime_002dtype=application%2Foctet-stream
#include "PdfReader.h"
#include "../Common/OfficeDefines.h"
#include "../DesktopEditor/raster/BgraFrame.h"
#include "../DesktopEditor/graphics/GraphicsRenderer.h"
#include "../DesktopEditor/fontengine/ApplicationFonts.h"
#include "../DesktopEditor/fontengine/FontManager.h"
#include "../DesktopEditor/graphics/IRenderer.h"
#include "../DesktopEditor/common/Directory.h"
#include "Src/StringExt.h"
#include "Src/PDFDoc.h"
#include "Src/GlobalParams.h"
#include "Src/ErrorConstants.h"
#include "Src/ExtractImageOutputDev.h"
#include "Src/RendererOutputDev.h"
#include <string>
namespace PdfReader
{
CPdfReader::CPdfReader(CApplicationFonts* pAppFonts)
{
m_wsTempFolder = NULL;
m_wsCMapFolder = NULL;
m_pPDFDocument = NULL;
m_pFontManager = NULL;
m_pGlobalParams = new GlobalParams();
m_pFontList = new CFontList();
m_pAppFonts = pAppFonts;
//
m_pFontManager = pAppFonts->GenerateFontManager();
CFontsCache* pMeasurerCache = new CFontsCache();
pMeasurerCache->SetStreams(pAppFonts->GetStreams());
m_pFontManager->SetOwnerCache(pMeasurerCache);
m_pGlobalParams->SetFontManager(m_pFontManager);
}
CPdfReader::~CPdfReader()
{
if (m_pFontList)
{
m_pFontList->Clear();
delete m_pFontList;
}
if (m_wsCMapFolder)
FreeWString(m_wsCMapFolder);
if (m_wsTempFolder)
{
NSDirectory::DeleteDirectory(m_wsTempFolder);
FreeWString(m_wsTempFolder);
}
RELEASEOBJECT(m_pPDFDocument);
RELEASEOBJECT(m_pGlobalParams);
RELEASEINTERFACE(m_pFontManager);
}
bool CPdfReader::LoadFromFile(const wchar_t* wsSrcPath, const wchar_t* wsOwnerPassword, const wchar_t* wsUserPassword, const wchar_t* wsOptions)
{
// TODO:
// FontManager, .
//------------------------------------------------------
RELEASEINTERFACE(m_pFontManager);
m_pFontManager = m_pAppFonts->GenerateFontManager();
CFontsCache* pMeasurerCache = new CFontsCache();
pMeasurerCache->SetStreams(m_pAppFonts->GetStreams());
m_pFontManager->SetOwnerCache(pMeasurerCache);
m_pGlobalParams->SetFontManager(m_pFontManager);
//------------------------------------------------------
if (m_pPDFDocument)
delete m_pPDFDocument;
StringExt *seOwner = NULL, *seUser = NULL;
if (NULL != wsOwnerPassword)
seOwner = new StringExt(wsOwnerPassword);
if (NULL != wsUserPassword)
seUser = new StringExt(wsUserPassword);
m_pPDFDocument = new PDFDoc(m_pGlobalParams, wsSrcPath, seOwner, seUser);
if (seUser)
delete seUser;
if (seOwner)
delete seOwner;
if (!m_pPDFDocument || !m_pPDFDocument->CheckValidation())
{
if (m_pPDFDocument)
delete m_pPDFDocument;
return false;
}
m_pFontList->Clear();
if (L"CheckPassword" != wsOptions)
{
m_pGlobalParams->SetTempFolder(m_wsTempFolder);
m_pGlobalParams->SetCMapFolder(m_wsCMapFolder);
m_pGlobalParams->SetFontManager(m_pFontManager);
}
return (errorNone == m_pPDFDocument->GetErrorCode());
}
void CPdfReader::Close()
{
RELEASEOBJECT(m_pPDFDocument);
}
EError CPdfReader::GetError()
{
return m_pPDFDocument->GetErrorCode();
}
int CPdfReader::GetPagesCount()
{
if (!m_pPDFDocument)
return 0;
return m_pPDFDocument->GetPagesCount();
}
double CPdfReader::GetVersion()
{
if (!m_pPDFDocument)
return 0;
return m_pPDFDocument->GetPDFVersion();
}
int CPdfReader::GetPermissions()
{
if (!m_pPDFDocument)
return 0;
int nPermissions = 0;
if (m_pPDFDocument->CheckPrint())
nPermissions += PERMISSION_PRINT;
if (m_pPDFDocument->CheckCopy())
nPermissions += PERMISSION_COPY;
if (m_pPDFDocument->CheckChange())
nPermissions += PERMISSION_CHANGE;
return nPermissions;
}
bool CPdfReader::ExtractAllImages(const wchar_t* wsDstPath, const wchar_t* wsPrefix)
{
StringExt seString(wsDstPath);
ExtractImageOutputDev *pOutputDev = new ExtractImageOutputDev(m_pGlobalParams, seString.GetBuffer(), true);
if (!pOutputDev)
return false;
for (int nIndex = 1; nIndex <= m_pPDFDocument->GetPagesCount(); nIndex++)
{
m_pPDFDocument->DisplayPage(pOutputDev, nIndex, 72, 72, 0, false, false, false);
}
delete pOutputDev;
return true;
}
void CPdfReader::GetPageSize(int _nPageIndex, double* pdWidth, double* pdHeight)
{
int nPageIndex = _nPageIndex + 1;
if (!m_pPDFDocument)
return;
const double c_dInch = 25.399; //
const double c_dXResolution = 154.0;
const double c_dYResolution = 154.0;
double dKoefX = c_dInch / c_dXResolution;
double dKoefY = c_dInch / c_dYResolution;
int nRotate = m_pPDFDocument->GetPageRotate(nPageIndex);
while (nRotate >= 360)
nRotate -= 360;
while (nRotate < 0)
nRotate += 360;
if (0 != nRotate && 180 != nRotate)
{
*pdHeight = PDFCoordsToMM(m_pPDFDocument->GetPageCropWidth(nPageIndex));
*pdWidth = PDFCoordsToMM(m_pPDFDocument->GetPageCropHeight(nPageIndex));
}
else
{
*pdWidth = PDFCoordsToMM(m_pPDFDocument->GetPageCropWidth(nPageIndex));
*pdHeight = PDFCoordsToMM(m_pPDFDocument->GetPageCropHeight(nPageIndex));
}
}
void CPdfReader::DrawPageOnRenderer(IRenderer* pRenderer, int _nPageIndex, bool* pbBreak)
{
int nPageIndex = _nPageIndex + 1;
if (m_pPDFDocument && pRenderer)
{
RendererOutputDev oRendererOut(m_pGlobalParams, pRenderer, m_pFontManager, m_pFontList);
oRendererOut.NewPDF(m_pPDFDocument->GetXRef());
oRendererOut.SetBreak(pbBreak);
m_pPDFDocument->DisplayPage(&oRendererOut, nPageIndex, 72.0, 72.0, 0, false, true, false);
}
}
void CPdfReader::ConvertToRaster(int nPageIndex, const wchar_t* wsDstPath, int nImageType)
{
CFontManager *pFontManager = m_pAppFonts->GenerateFontManager();
CFontsCache* pFontCache = new CFontsCache();
pFontCache->SetStreams(m_pAppFonts->GetStreams());
pFontManager->SetOwnerCache(pFontCache);
CGraphicsRenderer oRenderer;
oRenderer.SetFontManager(pFontManager);
double dWidth, dHeight;
GetPageSize(nPageIndex, &dWidth, &dHeight);
int nWidth = (int)dWidth * 72 / 25.4;
int nHeight = (int)dHeight * 72 / 25.4;
BYTE* pBgraData = new BYTE[nWidth * nHeight * 4];
if (!pBgraData)
return;
memset(pBgraData, 0xff, nWidth * nHeight * 4);
CBgraFrame oFrame;
oFrame.put_Data(pBgraData);
oFrame.put_Width(nWidth);
oFrame.put_Height(nHeight);
oFrame.put_Stride(-4 * nWidth);
oRenderer.CreateFromBgraFrame(&oFrame);
oRenderer.SetSwapRGB(false);
oRenderer.put_Width(dWidth);
oRenderer.put_Height(dHeight);
bool bBreak = false;
DrawPageOnRenderer(&oRenderer, nPageIndex, &bBreak);
oFrame.SaveFile(wsDstPath, nImageType);
RELEASEINTERFACE(pFontManager);
}
int CPdfReader::GetImagesCount()
{
ExtractImageOutputDev *pOutputDev = new ExtractImageOutputDev(m_pGlobalParams, NULL, true, true);
if (!pOutputDev)
return 0;
for (int nIndex = 1; nIndex <= m_pPDFDocument->GetPagesCount(); nIndex++)
{
m_pPDFDocument->DisplayPage(pOutputDev, nIndex, 72, 72, 0, false, false, false);
}
return pOutputDev->GetImagesCount();
}
void CPdfReader::SetTempFolder(const wchar_t* wsTempFolder)
{
if (m_wsTempFolder)
{
NSDirectory::DeleteDirectory(m_wsTempFolder);
FreeWString(m_wsTempFolder);
}
if (NULL != wsTempFolder)
{
std::wstring wsFolderName = std::wstring(wsTempFolder) + L"//pdftemp";
std::wstring wsFolder = wsFolderName;
int nCounter = 0;
while (NSDirectory::Exists(wsFolder))
{
nCounter++;
wsFolder = wsFolderName + L"_" + std::to_wstring(nCounter);
}
NSDirectory::CreateDirectoryW(wsFolder);
m_wsTempFolder = AllocWString(wsFolder);
}
else
m_wsTempFolder = NULL;
if (m_pGlobalParams)
m_pGlobalParams->SetTempFolder(m_wsTempFolder);
}
void CPdfReader::SetCMapFolder(const wchar_t* wsCMapFolder)
{
if (m_wsCMapFolder)
FreeWString(m_wsCMapFolder);
if (NULL != wsCMapFolder)
m_wsCMapFolder = AllocWString(wsCMapFolder);
else
m_wsCMapFolder = NULL;
if (m_pGlobalParams)
m_pGlobalParams->SetCMapFolder(m_wsCMapFolder);
}
CFontManager*CPdfReader::GetFontManager()
{
return m_pFontManager;
}
}
\ No newline at end of file
#ifndef _PDF_READER_H
#define _PDF_READER_H
#include "Src/ErrorConstants.h"
class IRenderer;
class CFontManager;
class CApplicationFonts;
namespace PdfReader
{
class PDFDoc;
class GlobalParams;
class CFontList;
class CPdfReader
{
public:
CPdfReader(CApplicationFonts* pAppFonts);
~CPdfReader();
bool LoadFromFile(const wchar_t* wsSrcPath, const wchar_t* wsOwnerPassword = 0, const wchar_t* wsUserPassword = 0, const wchar_t* wsOptions = 0);
void Close();
EError GetError();
double GetVersion();
int GetPermissions();
int GetPagesCount();
void GetPageSize(int nPageIndex, double* pdWidth, double* pdHeight);
void DrawPageOnRenderer(IRenderer* pRenderer, int nPageIndex, bool* pbBreak);
void ConvertToRaster(int nPageIndex, const wchar_t* wsDstPath, int nImageType);
bool ExtractAllImages(const wchar_t* wsDstPath, const wchar_t* wsPrefix = 0);
int GetImagesCount();
void SetTempFolder(const wchar_t* wsTempFolder);
void SetCMapFolder(const wchar_t* wsCMapFolder);
CFontManager*GetFontManager();
private:
PDFDoc* m_pPDFDocument;
GlobalParams* m_pGlobalParams;
wchar_t* m_wsTempFolder;
wchar_t* m_wsCMapFolder;
CApplicationFonts* m_pAppFonts;
CFontManager* m_pFontManager;
CFontList* m_pFontList;
};
}
#endif // _PDF_READER_H

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PdfReader", "PdfReader.vcxproj", "{4EA2BD9F-7F41-482B-9BD8-2102C703D912}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PdfReaderTest", "PdfReaderTest\PdfReaderTest.vcxproj", "{29C4FC88-8442-46E1-A94B-6C3284DE13C0}"
ProjectSection(ProjectDependencies) = postProject
{4EA2BD9F-7F41-482B-9BD8-2102C703D912} = {4EA2BD9F-7F41-482B-9BD8-2102C703D912}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Debug|Mixed Platforms.Build.0 = Debug|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Debug|Win32.ActiveCfg = Debug|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Debug|Win32.Build.0 = Debug|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Debug|x64.ActiveCfg = Debug|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Debug|x64.Build.0 = Debug|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Release|Mixed Platforms.Build.0 = Release|Win32
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Release|Win32.ActiveCfg = Release|Win32
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Release|Win32.Build.0 = Release|Win32
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Release|x64.ActiveCfg = Release|x64
{4EA2BD9F-7F41-482B-9BD8-2102C703D912}.Release|x64.Build.0 = Release|x64
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Debug|Win32.ActiveCfg = Debug|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Debug|Win32.Build.0 = Debug|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Debug|x64.ActiveCfg = Debug|x64
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Debug|x64.Build.0 = Debug|x64
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Release|Mixed Platforms.Build.0 = Release|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Release|Win32.ActiveCfg = Release|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Release|Win32.Build.0 = Release|Win32
{29C4FC88-8442-46E1-A94B-6C3284DE13C0}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
This diff is collapsed.
// PdfReaderTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "../PdfReader.h"
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
#include <vector>
#include <string>
#include "windows.h"
std::vector<std::wstring> GetAllFilesInFolder(std::wstring wsFolder, std::wstring wsExt)
{
std::vector<std::wstring> vwsNames;
std::wstring wsSearchPath = wsFolder;
wsSearchPath.append(L"*.");
wsSearchPath.append(wsExt);
WIN32_FIND_DATA oFindData;
HANDLE hFind = ::FindFirstFile(wsSearchPath.c_str(), &oFindData);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
if (!(oFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
vwsNames.push_back(oFindData.cFileName);
}
} while (::FindNextFile(hFind, &oFindData));
::FindClose(hFind);
}
return vwsNames;
}
void ConvertFolder(PdfReader::CPdfReader& oReader, std::wstring wsFolderPath)
{
oReader.Close();
std::vector<std::wstring> vFiles = GetAllFilesInFolder(wsFolderPath, L"pdf");
for (int nIndex = 0; nIndex < vFiles.size(); nIndex++)
{
std::wstring wsFilePath = wsFolderPath;
wsFilePath.append(vFiles.at(nIndex));
std::wstring wsFilePathName = (wsFilePath.substr(0, wsFilePath.size() - 4));
if (oReader.LoadFromFile(wsFilePath.c_str(), NULL, NULL, NULL))
{
int nPagesCount = oReader.GetPagesCount();
for (int nPageIndex = 0; nPageIndex < nPagesCount; nPageIndex++)
{
std::wstring wsDstFilePath = wsFilePathName + L"_" + std::to_wstring(nPageIndex) + L".png";
oReader.ConvertToRaster(nPageIndex, wsDstFilePath.c_str(), 4);
}
oReader.Close();
}
else
{
printf("%d of %d %S error %d\n", nIndex, vFiles.size(), vFiles.at(nIndex).c_str(), oReader.GetError());
}
}
}
void main()
{
CApplicationFonts oFonts;
oFonts.Initialize();
PdfReader::CPdfReader oPdfReader(&oFonts);
oPdfReader.SetTempFolder(L"D://Test Files//Temp//");
oPdfReader.SetCMapFolder(L"D://Subversion//AVS//Redist//AVSOfficeStudio//CMaps//");
ConvertFolder(oPdfReader, L"D://Test Files//");
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{29C4FC88-8442-46E1-A94B-6C3284DE13C0}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>PdfReaderTest</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<ReferencePath>$(ReferencePath)</ReferencePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\..\DesktopEditor\freetype-2.5.2\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\..\DesktopEditor\freetype-2.5.2\include;..\..\DesktopEditor\agg-2.4\include;..\..\DesktopEditor\cximage\zlib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="PdfReaderTest.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PdfReaderTest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
========================================================================
CONSOLE APPLICATION : PdfReaderTest Project Overview
========================================================================
AppWizard has created this PdfReaderTest application for you.
This file contains a summary of what you will find in each of the files that
make up your PdfReaderTest application.
PdfReaderTest.vcxproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
PdfReaderTest.vcxproj.filters
This is the filters file for VC++ projects generated using an Application Wizard.
It contains information about the association between the files in your project
and the filters. This association is used in the IDE to show grouping of files with
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
"Source Files" filter).
PdfReaderTest.cpp
This is the main application source file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named PdfReaderTest.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
// stdafx.cpp : source file that includes just the standard includes
// PdfReaderTest.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#ifdef _DEBUG
#pragma comment(lib, "../x64/Debug/PdfReader.lib")
#pragma comment(lib, "../../DesktopEditor/Qt_build/graphics/project/debug/graphics.lib")
#else
#pragma comment(lib, "../x64/Release/PdfReader.lib")
#pragma comment(lib, "../../DesktopEditor/Qt_build/graphics/project/release/graphics.lib")
#endif
// TODO: reference additional headers your program requires here
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>
========================================================================
STATIC LIBRARY : PdfReader Project Overview
========================================================================
AppWizard has created this PdfReader library project for you.
No source files were created as part of your project.
PdfReader.vcxproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
PdfReader.vcxproj.filters
This is the filters file for VC++ projects generated using an Application Wizard.
It contains information about the association between the files in your project
and the filters. This association is used in the IDE to show grouping of files with
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
"Source Files" filter).
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
StartFontMetrics 3.0
Comment Copyright URW Software, Copyright 1997 by URW
Comment Creation Date: 10/21/1999
Comment See the file COPYING (GNU General Public License) for license conditions.
FontName StandardSymL
FullName Standard Symbols L
FamilyName Standard Symbols L
Weight Regular
ItalicAngle 0.0
IsFixedPitch false
UnderlinePosition -229
UnderlineThickness 46
Version 001.005
Notice URW Software, Copyright 1997 by URW
EncodingScheme FontSpecific
FontBBox -180 -293 1090 1010
CapHeight 673
XHeight 500
Descender -222
Ascender 673
StartCharMetrics 190
C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
C 33 ; WX 333 ; N exclam ; B 128 -13 240 686 ;
C 34 ; WX 713 ; N universal ; B 31 0 681 673 ;
C 35 ; WX 500 ; N numbersign ; B 20 0 481 631 ;
C 36 ; WX 549 ; N existential ; B 25 0 478 673 ;
C 37 ; WX 833 ; N percent ; B 63 -7 771 673 ;
C 38 ; WX 778 ; N ampersand ; B 41 -13 750 675 ;
C 39 ; WX 439 ; N suchthat ; B 48 -13 414 503 ;
C 40 ; WX 333 ; N parenleft ; B 53 -172 300 680 ;
C 41 ; WX 333 ; N parenright ; B 30 -172 277 680 ;
C 42 ; WX 500 ; N asteriskmath ; B 65 127 427 546 ;
C 43 ; WX 549 ; N plus ; B 10 0 539 533 ;
C 44 ; WX 250 ; N comma ; B 56 -120 194 102 ;
C 45 ; WX 549 ; N minus ; B 11 239 535 294 ;
C 46 ; WX 250 ; N period ; B 69 -13 181 100 ;
C 47 ; WX 278 ; N slash ; B 0 0 254 673 ;
C 48 ; WX 500 ; N zero ; B 23 -13 471 686 ;
C 49 ; WX 500 ; N one ; B 117 0 390 673 ;
C 50 ; WX 500 ; N two ; B 25 0 475 686 ;
C 51 ; WX 500 ; N three ; B 39 -13 435 686 ;
C 52 ; WX 500 ; N four ; B 16 0 469 680 ;
C 53 ; WX 500 ; N five ; B 29 -13 443 699 ;
C 54 ; WX 500 ; N six ; B 36 -13 468 685 ;
C 55 ; WX 500 ; N seven ; B 24 -7 448 673 ;
C 56 ; WX 500 ; N eight ; B 54 -13 440 686 ;
C 57 ; WX 500 ; N nine ; B 31 -13 460 686 ;
C 58 ; WX 278 ; N colon ; B 81 -13 193 463 ;
C 59 ; WX 278 ; N semicolon ; B 83 -120 221 463 ;
C 60 ; WX 549 ; N less ; B 26 0 523 522 ;
C 61 ; WX 549 ; N equal ; B 11 142 537 391 ;
C 62 ; WX 549 ; N greater ; B 26 0 523 522 ;
C 63 ; WX 444 ; N question ; B 70 -13 412 686 ;
C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ;
C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ;
C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ;
C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ;
C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ;
C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ;
C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ;
C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ;
C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ;
C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ;
C 74 ; WX 631 ; N theta1 ; B 18 -13 623 686 ;
C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ;
C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ;
C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ;
C 78 ; WX 722 ; N Nu ; B 29 0 720 673 ;
C 79 ; WX 722 ; N Omicron ; B 41 -13 715 686 ;
C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ;
C 81 ; WX 741 ; N Theta ; B 41 -13 715 686 ;
C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ;
C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ;
C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ;
C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ;
C 86 ; WX 439 ; N sigma1 ; B 40 -222 436 513 ;
C 87 ; WX 768 ; N Omega ; B 34 0 736 686 ;
C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ;
C 89 ; WX 795 ; N Psi ; B 15 0 781 686 ;
C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ;
C 91 ; WX 333 ; N bracketleft ; B 86 -165 299 673 ;
C 92 ; WX 863 ; N therefore ; B 163 -13 701 433 ;
C 93 ; WX 333 ; N bracketright ; B 33 -165 246 673 ;
C 94 ; WX 658 ; N perpendicular ; B 15 0 652 673 ;
C 95 ; WX 500 ; N underscore ; B -2 -252 502 -206 ;
C 96 ; WX 500 ; N radicalex ; B 480 857 1090 913 ;
C 97 ; WX 631 ; N alpha ; B 41 -13 622 513 ;
C 98 ; WX 549 ; N beta ; B 61 -222 515 740 ;
C 99 ; WX 549 ; N chi ; B 12 -210 522 513 ;
C 100 ; WX 494 ; N delta ; B 40 -13 481 740 ;
C 101 ; WX 439 ; N epsilon ; B 22 -13 427 513 ;
C 102 ; WX 521 ; N phi ; B 27 -222 490 686 ;
C 103 ; WX 411 ; N gamma ; B 5 -219 484 513 ;
C 104 ; WX 603 ; N eta ; B 0 -222 527 513 ;
C 105 ; WX 329 ; N iota ; B 0 -13 301 513 ;
C 106 ; WX 603 ; N phi1 ; B 36 -222 587 513 ;
C 107 ; WX 549 ; N kappa ; B 33 0 558 513 ;
C 108 ; WX 549 ; N lambda ; B 24 -13 548 740 ;
C 109 ; WX 576 ; N mu ; B 33 -219 567 500 ;
C 110 ; WX 521 ; N nu ; B -9 -13 475 513 ;
C 111 ; WX 549 ; N omicron ; B 35 -13 501 513 ;
C 112 ; WX 549 ; N pi ; B 10 -13 530 500 ;
C 113 ; WX 521 ; N theta ; B 43 -13 485 686 ;
C 114 ; WX 549 ; N rho ; B 50 -220 490 513 ;
C 115 ; WX 603 ; N sigma ; B 30 -13 588 500 ;
C 116 ; WX 439 ; N tau ; B 10 -13 418 500 ;
C 117 ; WX 576 ; N upsilon ; B 7 -13 535 513 ;
C 118 ; WX 713 ; N omega1 ; B 12 -13 671 583 ;
C 119 ; WX 686 ; N omega ; B 42 -13 684 513 ;
C 120 ; WX 493 ; N xi ; B 27 -222 469 766 ;
C 121 ; WX 686 ; N psi ; B 12 -222 701 513 ;
C 122 ; WX 494 ; N zeta ; B 60 -222 467 756 ;
C 123 ; WX 480 ; N braceleft ; B 58 -165 397 673 ;
C 124 ; WX 200 ; N bar ; B 65 -177 135 673 ;
C 125 ; WX 480 ; N braceright ; B 79 -165 418 673 ;
C 126 ; WX 549 ; N similar ; B 17 196 529 325 ;
C 160 ; WX 762 ; N Euro ; B 53 -4 722 671 ;
C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 687 ;
C 162 ; WX 247 ; N minute ; B 27 476 228 735 ;
C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ;
C 164 ; WX 167 ; N fraction ; B -180 0 340 673 ;
C 165 ; WX 713 ; N infinity ; B 26 115 688 414 ;
C 166 ; WX 500 ; N florin ; B 2 -174 494 687 ;
C 167 ; WX 753 ; N club ; B 86 -26 660 544 ;
C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ;
C 169 ; WX 753 ; N heart ; B 117 -33 631 528 ;
C 170 ; WX 753 ; N spade ; B 113 -36 629 591 ;
C 171 ; WX 1042 ; N arrowboth ; B 24 -16 1024 512 ;
C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ;
C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ;
C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ;
C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ;
C 176 ; WX 400 ; N degree ; B 50 380 350 686 ;
C 177 ; WX 549 ; N plusminus ; B 10 0 539 662 ;
C 178 ; WX 411 ; N second ; B 20 476 413 735 ;
C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ;
C 180 ; WX 549 ; N multiply ; B 17 9 533 525 ;
C 181 ; WX 713 ; N proportional ; B 27 114 639 416 ;
C 182 ; WX 494 ; N partialdiff ; B 26 -10 462 753 ;
C 183 ; WX 460 ; N bullet ; B 50 155 410 518 ;
C 184 ; WX 549 ; N divide ; B 10 2 536 525 ;
C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ;
C 186 ; WX 549 ; N equivalence ; B 14 87 538 446 ;
C 187 ; WX 549 ; N approxequal ; B 14 121 527 408 ;
C 188 ; WX 1000 ; N ellipsis ; B 111 -13 889 100 ;
C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ;
C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ;
C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ;
C 192 ; WX 823 ; N aleph ; B 175 0 662 689 ;
C 193 ; WX 686 ; N Ifraktur ; B 10 -54 578 736 ;
C 194 ; WX 795 ; N Rfraktur ; B 26 -16 759 730 ;
C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 574 ;
C 196 ; WX 768 ; N circlemultiply ; B 43 0 733 691 ;
C 197 ; WX 768 ; N circleplus ; B 43 0 733 689 ;
C 198 ; WX 823 ; N emptyset ; B 39 -24 781 718 ;
C 199 ; WX 768 ; N intersection ; B 40 0 732 507 ;
C 200 ; WX 768 ; N union ; B 40 -18 732 489 ;
C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ;
C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ;
C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ;
C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ;
C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ;
C 206 ; WX 713 ; N element ; B 45 0 505 470 ;
C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ;
C 208 ; WX 768 ; N angle ; B 26 -1 738 672 ;
C 209 ; WX 713 ; N gradient ; B 36 0 681 687 ;
C 210 ; WX 790 ; N registerserif ; B 50 -13 740 690 ;
C 211 ; WX 790 ; N copyrightserif ; B 51 -13 741 690 ;
C 212 ; WX 890 ; N trademarkserif ; B 18 269 855 673 ;
C 213 ; WX 823 ; N product ; B 25 -124 803 751 ;
C 214 ; WX 549 ; N radical ; B 10 -35 515 913 ;
C 215 ; WX 250 ; N dotmath ; B 69 209 169 311 ;
C 216 ; WX 713 ; N logicalnot ; B 15 40 680 367 ;
C 217 ; WX 603 ; N logicaland ; B 23 -1 583 476 ;
C 218 ; WX 603 ; N logicalor ; B 30 -1 578 476 ;
C 219 ; WX 1042 ; N arrowdblboth ; B 27 -19 1023 506 ;
C 220 ; WX 987 ; N arrowdblleft ; B 30 -19 939 506 ;
C 221 ; WX 603 ; N arrowdblup ; B 39 0 567 909 ;
C 222 ; WX 987 ; N arrowdblright ; B 45 -19 954 506 ;
C 223 ; WX 603 ; N arrowdbldown ; B 44 0 572 909 ;
C 224 ; WX 494 ; N lozenge ; B 18 -1 466 740 ;
C 225 ; WX 329 ; N angleleft ; B 25 -152 306 757 ;
C 226 ; WX 790 ; N registersans ; B 50 -12 740 679 ;
C 227 ; WX 790 ; N copyrightsans ; B 49 -12 739 679 ;
C 228 ; WX 786 ; N trademarksans ; B 5 277 725 673 ;
C 229 ; WX 713 ; N summation ; B 14 -123 695 752 ;
C 230 ; WX 384 ; N parenlefttp ; B 40 -293 436 926 ;
C 231 ; WX 384 ; N parenleftex ; B 40 -79 92 925 ;
C 232 ; WX 384 ; N parenleftbt ; B 40 -293 436 926 ;
C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 341 926 ;
C 234 ; WX 384 ; N bracketleftex ; B 0 -85 55 925 ;
C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 340 926 ;
C 236 ; WX 494 ; N bracelefttp ; B 201 -75 439 926 ;
C 237 ; WX 494 ; N braceleftmid ; B 14 -85 255 935 ;
C 238 ; WX 494 ; N braceleftbt ; B 201 -70 439 926 ;
C 239 ; WX 494 ; N braceex ; B 201 -79 255 925 ;
C 241 ; WX 329 ; N angleright ; B 21 -152 302 757 ;
C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ;
C 243 ; WX 686 ; N integraltp ; B 332 -83 715 922 ;
C 244 ; WX 686 ; N integralex ; B 332 -88 415 975 ;
C 245 ; WX 686 ; N integralbt ; B 39 -81 415 921 ;
C 246 ; WX 384 ; N parenrighttp ; B 54 -293 450 926 ;
C 247 ; WX 384 ; N parenrightex ; B 398 -70 450 935 ;
C 248 ; WX 384 ; N parenrightbt ; B 54 -293 450 926 ;
C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 360 926 ;
C 250 ; WX 384 ; N bracketrightex ; B 305 -85 360 925 ;
C 251 ; WX 384 ; N bracketrightbt ; B 20 -80 360 926 ;
C 252 ; WX 494 ; N bracerighttp ; B 17 -75 255 926 ;
C 253 ; WX 494 ; N bracerightmid ; B 201 -85 442 935 ;
C 254 ; WX 494 ; N bracerightbt ; B 17 -70 255 926 ;
C -1 ; WX 250 ; N .notdef ; B 0 0 0 0 ;
EndCharMetrics
EndFontMetrics
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
#ifndef _PDF_READER_ANNOT_H
#define _PDF_READER_ANNOT_H
namespace PdfReader
{
class XRef;
class Catalog;
class Graphics;
class GrFontDict;
//-------------------------------------------------------------------------------------------------------------------------------
// AnnotBorderStyle
//-------------------------------------------------------------------------------------------------------------------------------
enum AnnotBorderType
{
annotBorderSolid,
annotBorderDashed,
annotBorderBeveled,
annotBorderInset,
annotBorderUnderlined
};
class AnnotBorderStyle
{
public:
AnnotBorderStyle(AnnotBorderType eType, double dWidth, double *pDash, int nDashLength, double dR, double dG, double dB);
~AnnotBorderStyle();
AnnotBorderType GetType()
{
return m_eType;
}
double GetWidth()
{
return m_dWidth;
}
void GetDash(double **ppDash, int *pnDashLength)
{
*ppDash = m_pDash;
*pnDashLength = m_nDashLength;
}
void GetColor(double *pdR, double *pdG, double *pdB)
{
*pdR = m_dR;
*pdG = m_dG;
*pdB = m_dB;
}
private:
AnnotBorderType m_eType; //
double m_dWidth; //
double *m_pDash; // ,
int m_nDashLength; // m_pDash
double m_dR; //
double m_dG; //
double m_dB; //
};
//-------------------------------------------------------------------------------------------------------------------------------
// Annot
//-------------------------------------------------------------------------------------------------------------------------------
class Annot
{
public:
Annot(GlobalParams *pGlobalParams, XRef *pXref, Dict *pAcroForm, Dict *pDict, Ref *pRef);
~Annot();
bool CheckValidation()
{
return m_bValid;
}
void Draw(Graphics *pGraphics, bool pBrinting);
Object *GetAppearance(Object *pObject)
{
return m_oAppearance.Fetch(m_pXref, pObject);
}
AnnotBorderStyle *GetBorderStyle()
{
return m_pBorderStyle;
}
bool Match(Ref *pRef)
{
return m_oRef.nNum == pRef->nNum && m_oRef.nGen == pRef->nGen;
}
void GenerateFieldAppearance(Dict *pField, Dict *pAnnot, Dict *pAcroForm);
private:
void SetColor(Array *pArray, bool bFill, int nAdjust);
void DrawText(StringExt *seText, StringExt *seDA, GrFontDict *pFontDict, bool bMultiline, int nComb, int nQuadding, bool bTextField, bool bForceZapfDingbats);
void DrawListBox(StringExt **ppText, bool *pSelection, int nOptionsCount, int nTopIndex, StringExt *seDA, GrFontDict *pFontDict, int nQuadding);
void GetNextLine(StringExt *seText, int nStart, GrFont *pFont, double dFontSize, double dMaxW, int *pEnd, double *pWidth, int *pNext);
void DrawCircle(double dX, double dY, double dRad, bool bFill);
void DrawCircleTopLeft(double dX, double dY, double dRad);
void DrawCircleBottomRight(double dX, double dY, double dRad);
Object *FieldLookup(Dict *pField, char *sKey, Object *pObject);
private:
XRef *m_pXref; // XRef PDF-
Ref m_oRef; // , Annotation
StringExt *m_seType; // Annotation
Object m_oAppearance; // Form XObject-
StringExt *m_seAppBuffer;
double m_dMinX; //
double m_dMinY; // , Annotation
double m_dMaxX; //
double m_dMaxY; //
unsigned int m_nFlags;
AnnotBorderStyle *m_pBorderStyle;
bool m_bValid;
GlobalParams *m_pGlobalParams;
};
//-------------------------------------------------------------------------------------------------------------------------------
// Annots
//-------------------------------------------------------------------------------------------------------------------------------
class Annots
{
public:
Annots(GlobalParams *pGlobalParams, XRef *pXref, Catalog *pCatalog, Object *pAnnotsObject);
~Annots();
int GetAnnotsCount()
{
return m_nAnnotsCount;
}
Annot *GetAnnot(int nIndex)
{
return m_ppAnnots[nIndex];
}
void GenerateAppearances(Dict *pAcroForm);
private:
void ScanFieldAppearances(Dict *pNode, Ref *pRef, Dict *pParent, Dict *pAcroForm);
Annot *FindAnnot(Ref *pRef);
private:
Annot **m_ppAnnots; // Annotations
int m_nAnnotsCount; //
GlobalParams *m_pGlobalParams;
};
}
#endif // _PDF_READER_ANNOT_H
#include <stdlib.h>
#include <stddef.h>
#include "MemoryUtils.h"
#include "Object.h"
#include "Array.h"
namespace PdfReader
{
//------------------------------------------------------------------------
// Array
//------------------------------------------------------------------------
Array::Array(XRef *pXRef)
{
m_pXRef = pXRef;
m_arrItems = NULL;
m_nItemSize = m_nCount = 0;
m_nRef = 1;
}
Array::~Array()
{
for (int nIndex = 0; nIndex < m_nCount; ++nIndex)
m_arrItems[nIndex].Free();
MemUtilsFree(m_arrItems);
}
void Array::Add(Object *pItem)
{
if (m_nCount == m_nItemSize)
{
if (m_nCount == 0)
{
m_nItemSize = 8;
}
else
{
m_nItemSize *= 2;
}
m_arrItems = (Object *)MemUtilsReallocArray(m_arrItems, m_nItemSize, sizeof(Object));
}
m_arrItems[m_nCount] = *pItem;
++m_nCount;
}
Object *Array::Get(int nIndex, Object *pObject)
{
if (nIndex < 0 || nIndex >= m_nCount)
{
return pObject->InitNull();
}
return m_arrItems[nIndex].Fetch(m_pXRef, pObject);
}
Object *Array::GetCopy(int nIndex, Object *pObject)
{
if (nIndex < 0 || nIndex >= m_nCount)
{
return pObject->InitNull();
}
return m_arrItems[nIndex].Copy(pObject);
}
}
\ No newline at end of file
#ifndef _PDF_READER_ARRAY_H
#define _PDF_READER_ARRAY_H
#include "Object.h"
namespace PdfReader
{
class Object;
class XRef;
//------------------------------------------------------------------------
// Array
//------------------------------------------------------------------------
class Array
{
public:
Array(XRef *pXRef);
~Array();
int AddRef()
{
return ++m_nRef;
}
int Release()
{
return --m_nRef;
}
int GetCount()
{
return m_nCount;
}
void Add(Object *pItem);
Object *Get(int nIndex, Object *pObject);
Object *GetCopy(int nIndex, Object *pObject);
private:
XRef *m_pXRef; // Xref PDF
Object *m_arrItems; //
int m_nItemSize; //
int m_nCount; //
int m_nRef; //
};
}
#endif // _PDF_READER_ARRAY_H
#ifndef _PDF_READER_BUILT_INFONT_H
#define _PDF_READER_BUILT_INFONT_H
namespace PdfReader
{
struct BuiltinFont;
class BuiltinFontWidths;
//------------------------------------------------------------------------
struct BuiltinFontWidth
{
char *sName;
unsigned short unWidth;
BuiltinFontWidth *pNext;
};
struct BuiltinFont
{
char *sName;
char **ppDefaultBaseEncoding;
short nAscent;
short nDescent;
short arrBBox[4];
BuiltinFontWidth *pWidths;
int nSize;
};
//------------------------------------------------------------------------
static bool BuiltinFontGetWidth(BuiltinFont *pFont, char *sName, unsigned short *punWidth)
{
for (int nIndex = 0; nIndex < pFont->nSize; nIndex++)
{
BuiltinFontWidth oWitdh = pFont->pWidths[nIndex];
if (!strcmp(oWitdh.sName, sName))
{
*punWidth = oWitdh.unWidth;
return true;
}
}
return false;
}
}
#endif // _PDF_READER_BUILT_INFONT_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _PDF_READER_CMAP_H
#define _PDF_READER_CMAP_H
#include "CharTypes.h"
#include "GlobalParams.h"
#include "XmlUtils.h"
#include "../../DesktopEditor/graphics/TemporaryCS.h"
namespace PdfReader
{
class StringExt;
struct CMapVectorEntry;
class CMapCache;
//-------------------------------------------------------------------------------------------------------------------------------
class CMap
{
public:
// CMap <seCollection> <seCMapName>.
// 1.
static CMap *Parse(CMapCache *pCache, StringExt *seCollection, StringExt *seCMapName, GlobalParams *pGlobalParams, wchar_t *wsFilePath = NULL);
~CMap();
//
void AddRef();
void Release();
// : registry-ordering.
StringExt *GetCollection()
{
return m_seCollection;
}
// true, CMap <seCollection> <seCMapName>.
bool Match(StringExt *seCollection, StringExt *seCMapName);
// CID , <sChar>,
// <nLen> .
CID GetCID(char *sChar, int nLen, int *pnUsed);
// Writing mode (0 = horizontal, 1 = vertical).
int GetWMode()
{
return m_nWMode;
}
void ToXml(std::wstring wsFilePath);
private:
CMap(GlobalParams *pGlobalParams, StringExt *seCollection, StringExt *seCMapName);
CMap(GlobalParams *pGlobalParams, StringExt *seCollection, StringExt *seCMapName, int nWMode);
void UseCMap(CMapCache *pCache, char *sUseName);
void CopyVector(CMapVectorEntry *pDest, CMapVectorEntry *pSrc);
void AddCodeSpace(CMapVectorEntry *pVector, unsigned int unStart, unsigned int unEnd, unsigned int unBytesCount);
void AddCIDs(unsigned int unStart, unsigned int unEnd, unsigned int unBytesCount, CID nFirstCID);
void FreeCMapVector(CMapVectorEntry *pVector);
void WriteVectorToXml(CXmlWriter *pWriter, CMapVectorEntry *pVector);
private:
StringExt *m_seCollection; //
StringExt *m_seCMapName; //
int m_nWMode; // writing mode (0=horizontal, 1=vertical)
CMapVectorEntry *m_pVector; // vector for first byte (NULL for identity CMap)
int m_nRef; //
GlobalParams *m_pGlobalParams;
NSCriticalSection::CRITICAL_SECTION m_oCS;
};
//-------------------------------------------------------------------------------------------------------------------------------
#define CMapCacheSize 4
class CMapCache
{
public:
CMapCache();
~CMapCache();
CMap *GetCMap(StringExt *seCollection, StringExt *seCMapName, GlobalParams *pGlobalParams, wchar_t *wsFilePath = NULL);
private:
CMap *m_ppCache[CMapCacheSize];
};
}
#endif // _PDF_READER_CMAP_H
This diff is collapsed.
#ifndef _PDF_READER_CATALOG_H
#define _PDF_READER_CATALOG_H
#include "GlobalParams.h"
namespace PdfReader
{
class XRef;
class Object;
class Page;
class PageAttrs;
struct Ref;
class LinkDestination;
//------------------------------------------------------------------------
// Catalog
//------------------------------------------------------------------------
class Catalog
{
public:
Catalog(GlobalParams *pGlobalParams, XRef *pXref);
~Catalog();
bool CheckValidation()
{
return m_bValid;
}
int GetPagesCount()
{
return m_nPagesCount;
}
Page *GetPage(int nIndex)
{
return m_ppPages[nIndex - 1];
}
Ref *GetPageRef(int nIndex)
{
return &m_pPageRefs[nIndex - 1];
}
StringExt *GetBaseURI()
{
return m_seBaseURI;
}
StringExt *ReadMetadata();
Object *GetStructTreeRoot()
{
return &m_oStructTreeRoot;
}
// , .
int FindPage(int nNum, int nGen);
// Named destination.
LinkDestination *FindDest(StringExt *seName);
Object *GetDests()
{
return &m_oDests;
}
Object *GetNameTree()
{
return &m_oNameTree;
}
Object *GetOutline()
{
return &m_oOutline;
}
Object *GetAcroForm()
{
return &m_oAcroForm;
}
private:
int ReadPageTree(Dict *pPages, PageAttrs *pAttrs, int nStart, char *sAlreadyRead);
Object *FindDestInTree(Object *pTree, StringExt *seName, Object *pObject);
private:
XRef *m_pXref; // xref PDF
Page **m_ppPages; //
Ref *m_pPageRefs; //
int m_nPagesCount; //
int m_nPagesSize; // ( )
Object m_oDests; // Destination dictionary
Object m_oNameTree; // Name tree
StringExt *m_seBaseURI; // URI
Object m_oMetadata; // Metadata
Object m_oStructTreeRoot; //
Object m_oOutline; // Outline
Object m_oAcroForm; // AcroForm
bool m_bValid; // True, atalog -
GlobalParams *m_pGlobalParams;
};
}
#endif // _PDF_READER_CATALOG_H
This diff is collapsed.
#ifndef _PDF_READER_CHARCODE_TO_UNICODE_H
#define _PDF_READER_CHARCODE_TO_UNICODE_H
#include "CharTypes.h"
#include "GlobalParams.h"
#include "../../DesktopEditor/graphics/TemporaryCS.h"
namespace PdfReader
{
struct CharCodeToUnicodeString;
//-------------------------------------------------------------------------------------------------------------------------------
class CharCodeToUnicode
{
public:
static CharCodeToUnicode *ParseCIDToUnicode(StringExt *sFileName, StringExt *seCollection);
static CharCodeToUnicode *ParseUnicodeToUnicode(StringExt *sFileName);
static CharCodeToUnicode *Make8BitToUnicode(Unicode *pToUnicode);
static CharCodeToUnicode *ParseCMap(StringExt *sBuffer, int nBitCount, GlobalParams *pGlobalParams);
void MergeCMap(StringExt *sBuffer, int nBitCount, GlobalParams *pGlobalParams);
~CharCodeToUnicode();
//
void AddRef();
void Release();
//
bool Match(StringExt *seTag);
void SetMapping(CharCode nCode, Unicode *pUnicode, int nLen);
int MapToUnicode(CharCode nCode, Unicode *pUnicode, int nSize);
CharCode GetLength()
{
return m_nMapLen;
}
private:
void ParseCMap1(int(*GetCharFunc)(void *), void *pData, int nBitCount, GlobalParams *pGlobalParams);
void AddMapping(CharCode nCode, char *sUnicodeString, int nLen, int nOffset);
CharCodeToUnicode(StringExt *sTag);
CharCodeToUnicode(StringExt *sTag, Unicode *pMap, CharCode nMapLen, bool bCopyMap, CharCodeToUnicodeString *pSMap, int nSMapLen, int nSMapSize);
private:
StringExt *m_seTag;
Unicode *m_pMap;
CharCode m_nMapLen;
CharCodeToUnicodeString*m_pSMap;
int m_nSMapLen;
int m_nSMapSize;
int m_nRef;
NSCriticalSection::CRITICAL_SECTION m_oCS;
};
//-------------------------------------------------------------------------------------------------------------------------------
class CharCodeToUnicodeCache
{
public:
CharCodeToUnicodeCache(int nSize);
~CharCodeToUnicodeCache();
CharCodeToUnicode *GetCharCodeToUnicode(StringExt *seTag);
void Add(CharCodeToUnicode *pCharCodeToUnicode);
private:
CharCodeToUnicode **m_ppCache;
int m_nSize;
};
}
#endif // _PDF_READER_CHARCODE_TO_UNICODE_H
#ifndef _PDF_READER_CHARTYPES_H
#define _PDF_READER_CHARTYPES_H
namespace PdfReader
{
// Unicode-.
typedef unsigned int Unicode;
// CID.
typedef unsigned int CID;
// , :
// - 8-
// - 16- CID
// - Unicode
typedef unsigned int CharCode;
}
#endif // _PDF_READER_CHARTYPES_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _PDF_READER_ERROR_CONSTANTS_H
#define _PDF_READER_ERROR_CONSTANTS_H
namespace PdfReader
{
typedef enum
{
errorNone = 0, //
errorOpenFile = 1, // PDF
errorBadCatalog = 2, // couldn't read the page catalog
errorDamaged = 3, // PDF
errorEncrypted = 4, // ,
errorHighlightFile = 5, // nonexistent or invalid highlight file
errorBadPrinter = 6, //
errorPrinting = 7, //
errorPermission = 8, //
errorBadPageNum = 9, //
errorFileIO = 10 // /
} EError;
}
#endif // _PDF_READER_ERROR_CONSTANTS_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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