mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
copy changes from develop
This commit is contained in:
@@ -35,7 +35,8 @@ endif (POCO_UNBUNDLED)
|
|||||||
# TODO: Currently only bundled is supported, in future this should also be possible
|
# TODO: Currently only bundled is supported, in future this should also be possible
|
||||||
# with an unbundled version of hpdf
|
# with an unbundled version of hpdf
|
||||||
# hpdf
|
# hpdf
|
||||||
POCO_SOURCES( SRCS hpdf
|
POCO_SOURCES(SRCS hpdf
|
||||||
|
src/hpdf_3dmeasure.c
|
||||||
src/hpdf_annotation.c
|
src/hpdf_annotation.c
|
||||||
src/hpdf_array.c
|
src/hpdf_array.c
|
||||||
src/hpdf_binary.c
|
src/hpdf_binary.c
|
||||||
@@ -50,14 +51,18 @@ POCO_SOURCES( SRCS hpdf
|
|||||||
src/hpdf_encoder_cnt.c
|
src/hpdf_encoder_cnt.c
|
||||||
src/hpdf_encoder_jp.c
|
src/hpdf_encoder_jp.c
|
||||||
src/hpdf_encoder_kr.c
|
src/hpdf_encoder_kr.c
|
||||||
|
src/hpdf_encoder_utf.c
|
||||||
src/hpdf_encrypt.c
|
src/hpdf_encrypt.c
|
||||||
src/hpdf_encryptdict.c
|
src/hpdf_encryptdict.c
|
||||||
src/hpdf_error.c
|
src/hpdf_error.c
|
||||||
|
src/hpdf_exdata.c
|
||||||
src/hpdf_ext_gstate.c
|
src/hpdf_ext_gstate.c
|
||||||
src/hpdf_font.c
|
src/hpdf_font.c
|
||||||
src/hpdf_font_cid.c
|
src/hpdf_font_cid.c
|
||||||
src/hpdf_fontdef_base14.c
|
src/hpdf_font_tt.c
|
||||||
|
src/hpdf_font_type1.c
|
||||||
src/hpdf_fontdef.c
|
src/hpdf_fontdef.c
|
||||||
|
src/hpdf_fontdef_base14.c
|
||||||
src/hpdf_fontdef_cid.c
|
src/hpdf_fontdef_cid.c
|
||||||
src/hpdf_fontdef_cns.c
|
src/hpdf_fontdef_cns.c
|
||||||
src/hpdf_fontdef_cnt.c
|
src/hpdf_fontdef_cnt.c
|
||||||
@@ -65,15 +70,15 @@ POCO_SOURCES( SRCS hpdf
|
|||||||
src/hpdf_fontdef_kr.c
|
src/hpdf_fontdef_kr.c
|
||||||
src/hpdf_fontdef_tt.c
|
src/hpdf_fontdef_tt.c
|
||||||
src/hpdf_fontdef_type1.c
|
src/hpdf_fontdef_type1.c
|
||||||
src/hpdf_font_tt.c
|
|
||||||
src/hpdf_font_type1.c
|
|
||||||
src/hpdf_gstate.c
|
src/hpdf_gstate.c
|
||||||
src/hpdf_image.c
|
src/hpdf_image.c
|
||||||
|
src/hpdf_image_ccitt.c
|
||||||
src/hpdf_image_png.c
|
src/hpdf_image_png.c
|
||||||
src/hpdf_info.c
|
src/hpdf_info.c
|
||||||
src/hpdf_list.c
|
src/hpdf_list.c
|
||||||
src/hpdf_mmgr.c
|
src/hpdf_mmgr.c
|
||||||
src/hpdf_name.c
|
src/hpdf_name.c
|
||||||
|
src/hpdf_namedict.c
|
||||||
src/hpdf_null.c
|
src/hpdf_null.c
|
||||||
src/hpdf_number.c
|
src/hpdf_number.c
|
||||||
src/hpdf_objects.c
|
src/hpdf_objects.c
|
||||||
@@ -81,9 +86,11 @@ POCO_SOURCES( SRCS hpdf
|
|||||||
src/hpdf_page_label.c
|
src/hpdf_page_label.c
|
||||||
src/hpdf_page_operator.c
|
src/hpdf_page_operator.c
|
||||||
src/hpdf_pages.c
|
src/hpdf_pages.c
|
||||||
|
src/hpdf_pdfa.c
|
||||||
src/hpdf_real.c
|
src/hpdf_real.c
|
||||||
src/hpdf_streams.c
|
src/hpdf_streams.c
|
||||||
src/hpdf_string.c
|
src/hpdf_string.c
|
||||||
|
src/hpdf_u3d.c
|
||||||
src/hpdf_utils.c
|
src/hpdf_utils.c
|
||||||
src/hpdf_xref.c
|
src/hpdf_xref.c
|
||||||
)
|
)
|
||||||
@@ -123,7 +130,7 @@ set_target_properties( "${LIBNAME}"
|
|||||||
DEFINE_SYMBOL PDF_EXPORTS
|
DEFINE_SYMBOL PDF_EXPORTS
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( "${LIBNAME}" ${SYSLIBS} Foundation )
|
target_link_libraries( "${LIBNAME}" ${SYSLIBS} XML Util Foundation )
|
||||||
target_include_directories( "${LIBNAME}"
|
target_include_directories( "${LIBNAME}"
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
|
@@ -122,7 +122,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
|
@@ -122,7 +122,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|x64">
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<RootNamespace>PDF</RootNamespace>
|
<RootNamespace>PDF</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@@ -63,27 +63,27 @@
|
|||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros"/>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>14.0.25123.0</_ProjectFileVersion>
|
<_ProjectFileVersion>14.0.25123.0</_ProjectFileVersion>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoPDF64d</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoPDF64d</TargetName>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@@ -163,9 +163,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib64\PocoPDFmtd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib64\PocoPDFmtd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
@@ -218,9 +218,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -240,7 +240,7 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<ProgramDataBaseFileName>..\lib64\PocoPDFmdd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib64\PocoPDFmdd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@@ -265,9 +265,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Lib>
|
<Lib>
|
||||||
@@ -275,161 +275,169 @@
|
|||||||
</Lib>
|
</Lib>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\adler32.c"/>
|
<ClCompile Include="src\adler32.c" />
|
||||||
<ClCompile Include="src\compress.c"/>
|
<ClCompile Include="src\AttributedString.cpp" />
|
||||||
<ClCompile Include="src\crc32.c"/>
|
<ClCompile Include="src\Cell.cpp" />
|
||||||
<ClCompile Include="src\deflate.c"/>
|
<ClCompile Include="src\compress.c" />
|
||||||
<ClCompile Include="src\Destination.cpp"/>
|
<ClCompile Include="src\crc32.c" />
|
||||||
<ClCompile Include="src\Document.cpp"/>
|
<ClCompile Include="src\deflate.c" />
|
||||||
<ClCompile Include="src\Encoder.cpp"/>
|
<ClCompile Include="src\Destination.cpp" />
|
||||||
<ClCompile Include="src\Font.cpp"/>
|
<ClCompile Include="src\Document.cpp" />
|
||||||
<ClCompile Include="src\gzio.c"/>
|
<ClCompile Include="src\Encoder.cpp" />
|
||||||
<ClCompile Include="src\hpdf_3dmeasure.c"/>
|
<ClCompile Include="src\Font.cpp" />
|
||||||
<ClCompile Include="src\hpdf_annotation.c"/>
|
<ClCompile Include="src\gzio.c" />
|
||||||
<ClCompile Include="src\hpdf_array.c"/>
|
<ClCompile Include="src\hpdf_3dmeasure.c" />
|
||||||
<ClCompile Include="src\hpdf_binary.c"/>
|
<ClCompile Include="src\hpdf_annotation.c" />
|
||||||
<ClCompile Include="src\hpdf_boolean.c"/>
|
<ClCompile Include="src\hpdf_array.c" />
|
||||||
<ClCompile Include="src\hpdf_catalog.c"/>
|
<ClCompile Include="src\hpdf_binary.c" />
|
||||||
<ClCompile Include="src\hpdf_destination.c"/>
|
<ClCompile Include="src\hpdf_boolean.c" />
|
||||||
<ClCompile Include="src\hpdf_dict.c"/>
|
<ClCompile Include="src\hpdf_catalog.c" />
|
||||||
<ClCompile Include="src\hpdf_doc.c"/>
|
<ClCompile Include="src\hpdf_destination.c" />
|
||||||
<ClCompile Include="src\hpdf_doc_png.c"/>
|
<ClCompile Include="src\hpdf_dict.c" />
|
||||||
<ClCompile Include="src\hpdf_encoder.c"/>
|
<ClCompile Include="src\hpdf_doc.c" />
|
||||||
<ClCompile Include="src\hpdf_encoder_cns.c"/>
|
<ClCompile Include="src\hpdf_doc_png.c" />
|
||||||
<ClCompile Include="src\hpdf_encoder_cnt.c"/>
|
<ClCompile Include="src\hpdf_encoder.c" />
|
||||||
<ClCompile Include="src\hpdf_encoder_jp.c"/>
|
<ClCompile Include="src\hpdf_encoder_cns.c" />
|
||||||
<ClCompile Include="src\hpdf_encoder_kr.c"/>
|
<ClCompile Include="src\hpdf_encoder_cnt.c" />
|
||||||
<ClCompile Include="src\hpdf_encoder_utf.c"/>
|
<ClCompile Include="src\hpdf_encoder_jp.c" />
|
||||||
<ClCompile Include="src\hpdf_encrypt.c"/>
|
<ClCompile Include="src\hpdf_encoder_kr.c" />
|
||||||
<ClCompile Include="src\hpdf_encryptdict.c"/>
|
<ClCompile Include="src\hpdf_encoder_utf.c" />
|
||||||
<ClCompile Include="src\hpdf_error.c"/>
|
<ClCompile Include="src\hpdf_encrypt.c" />
|
||||||
<ClCompile Include="src\hpdf_exdata.c"/>
|
<ClCompile Include="src\hpdf_encryptdict.c" />
|
||||||
<ClCompile Include="src\hpdf_ext_gstate.c"/>
|
<ClCompile Include="src\hpdf_error.c" />
|
||||||
<ClCompile Include="src\hpdf_font.c"/>
|
<ClCompile Include="src\hpdf_exdata.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef.c"/>
|
<ClCompile Include="src\hpdf_ext_gstate.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_base14.c"/>
|
<ClCompile Include="src\hpdf_font.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_cid.c"/>
|
<ClCompile Include="src\hpdf_fontdef.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_cns.c"/>
|
<ClCompile Include="src\hpdf_fontdef_base14.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_cnt.c"/>
|
<ClCompile Include="src\hpdf_fontdef_cid.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_jp.c"/>
|
<ClCompile Include="src\hpdf_fontdef_cns.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_kr.c"/>
|
<ClCompile Include="src\hpdf_fontdef_cnt.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_tt.c"/>
|
<ClCompile Include="src\hpdf_fontdef_jp.c" />
|
||||||
<ClCompile Include="src\hpdf_fontdef_type1.c"/>
|
<ClCompile Include="src\hpdf_fontdef_kr.c" />
|
||||||
<ClCompile Include="src\hpdf_font_cid.c"/>
|
<ClCompile Include="src\hpdf_fontdef_tt.c" />
|
||||||
<ClCompile Include="src\hpdf_font_tt.c"/>
|
<ClCompile Include="src\hpdf_fontdef_type1.c" />
|
||||||
<ClCompile Include="src\hpdf_font_type1.c"/>
|
<ClCompile Include="src\hpdf_font_cid.c" />
|
||||||
<ClCompile Include="src\hpdf_gstate.c"/>
|
<ClCompile Include="src\hpdf_font_tt.c" />
|
||||||
<ClCompile Include="src\hpdf_image.c"/>
|
<ClCompile Include="src\hpdf_font_type1.c" />
|
||||||
<ClCompile Include="src\hpdf_image_ccitt.c"/>
|
<ClCompile Include="src\hpdf_gstate.c" />
|
||||||
<ClCompile Include="src\hpdf_image_png.c"/>
|
<ClCompile Include="src\hpdf_image.c" />
|
||||||
<ClCompile Include="src\hpdf_info.c"/>
|
<ClCompile Include="src\hpdf_image_ccitt.c" />
|
||||||
<ClCompile Include="src\hpdf_list.c"/>
|
<ClCompile Include="src\hpdf_image_png.c" />
|
||||||
<ClCompile Include="src\hpdf_mmgr.c"/>
|
<ClCompile Include="src\hpdf_info.c" />
|
||||||
<ClCompile Include="src\hpdf_name.c"/>
|
<ClCompile Include="src\hpdf_list.c" />
|
||||||
<ClCompile Include="src\hpdf_namedict.c"/>
|
<ClCompile Include="src\hpdf_mmgr.c" />
|
||||||
<ClCompile Include="src\hpdf_null.c"/>
|
<ClCompile Include="src\hpdf_name.c" />
|
||||||
<ClCompile Include="src\hpdf_number.c"/>
|
<ClCompile Include="src\hpdf_namedict.c" />
|
||||||
<ClCompile Include="src\hpdf_objects.c"/>
|
<ClCompile Include="src\hpdf_null.c" />
|
||||||
<ClCompile Include="src\hpdf_outline.c"/>
|
<ClCompile Include="src\hpdf_number.c" />
|
||||||
<ClCompile Include="src\hpdf_pages.c"/>
|
<ClCompile Include="src\hpdf_objects.c" />
|
||||||
<ClCompile Include="src\hpdf_page_label.c"/>
|
<ClCompile Include="src\hpdf_outline.c" />
|
||||||
<ClCompile Include="src\hpdf_page_operator.c"/>
|
<ClCompile Include="src\hpdf_pages.c" />
|
||||||
<ClCompile Include="src\hpdf_pdfa.c"/>
|
<ClCompile Include="src\hpdf_page_label.c" />
|
||||||
<ClCompile Include="src\hpdf_real.c"/>
|
<ClCompile Include="src\hpdf_page_operator.c" />
|
||||||
<ClCompile Include="src\hpdf_streams.c"/>
|
<ClCompile Include="src\hpdf_pdfa.c" />
|
||||||
<ClCompile Include="src\hpdf_string.c"/>
|
<ClCompile Include="src\hpdf_real.c" />
|
||||||
<ClCompile Include="src\hpdf_u3d.c"/>
|
<ClCompile Include="src\hpdf_streams.c" />
|
||||||
<ClCompile Include="src\hpdf_utils.c"/>
|
<ClCompile Include="src\hpdf_string.c" />
|
||||||
<ClCompile Include="src\hpdf_xref.c"/>
|
<ClCompile Include="src\hpdf_u3d.c" />
|
||||||
<ClCompile Include="src\Image.cpp"/>
|
<ClCompile Include="src\hpdf_utils.c" />
|
||||||
<ClCompile Include="src\infback.c"/>
|
<ClCompile Include="src\hpdf_xref.c" />
|
||||||
<ClCompile Include="src\inffast.c"/>
|
<ClCompile Include="src\Image.cpp" />
|
||||||
<ClCompile Include="src\inflate.c"/>
|
<ClCompile Include="src\infback.c" />
|
||||||
<ClCompile Include="src\inftrees.c"/>
|
<ClCompile Include="src\inffast.c" />
|
||||||
<ClCompile Include="src\LinkAnnotation.cpp"/>
|
<ClCompile Include="src\inflate.c" />
|
||||||
<ClCompile Include="src\Outline.cpp"/>
|
<ClCompile Include="src\inftrees.c" />
|
||||||
<ClCompile Include="src\Page.cpp"/>
|
<ClCompile Include="src\LinkAnnotation.cpp" />
|
||||||
<ClCompile Include="src\PDFException.cpp"/>
|
<ClCompile Include="src\Outline.cpp" />
|
||||||
<ClCompile Include="src\png.c"/>
|
<ClCompile Include="src\Page.cpp" />
|
||||||
<ClCompile Include="src\pngerror.c"/>
|
<ClCompile Include="src\PDFException.cpp" />
|
||||||
<ClCompile Include="src\pnggccrd.c"/>
|
<ClCompile Include="src\png.c" />
|
||||||
<ClCompile Include="src\pngget.c"/>
|
<ClCompile Include="src\pngerror.c" />
|
||||||
<ClCompile Include="src\pngmem.c"/>
|
<ClCompile Include="src\pnggccrd.c" />
|
||||||
<ClCompile Include="src\pngpread.c"/>
|
<ClCompile Include="src\pngget.c" />
|
||||||
<ClCompile Include="src\pngread.c"/>
|
<ClCompile Include="src\pngmem.c" />
|
||||||
<ClCompile Include="src\pngrio.c"/>
|
<ClCompile Include="src\pngpread.c" />
|
||||||
<ClCompile Include="src\pngrtran.c"/>
|
<ClCompile Include="src\pngread.c" />
|
||||||
<ClCompile Include="src\pngrutil.c"/>
|
<ClCompile Include="src\pngrio.c" />
|
||||||
<ClCompile Include="src\pngset.c"/>
|
<ClCompile Include="src\pngrtran.c" />
|
||||||
<ClCompile Include="src\pngtest.c"/>
|
<ClCompile Include="src\pngrutil.c" />
|
||||||
<ClCompile Include="src\pngtrans.c"/>
|
<ClCompile Include="src\pngset.c" />
|
||||||
<ClCompile Include="src\pngvcrd.c"/>
|
<ClCompile Include="src\pngtest.c" />
|
||||||
<ClCompile Include="src\pngwio.c"/>
|
<ClCompile Include="src\pngtrans.c" />
|
||||||
<ClCompile Include="src\pngwrite.c"/>
|
<ClCompile Include="src\pngvcrd.c" />
|
||||||
<ClCompile Include="src\pngwtran.c"/>
|
<ClCompile Include="src\pngwio.c" />
|
||||||
<ClCompile Include="src\pngwutil.c"/>
|
<ClCompile Include="src\pngwrite.c" />
|
||||||
<ClCompile Include="src\TextAnnotation.cpp"/>
|
<ClCompile Include="src\pngwtran.c" />
|
||||||
<ClCompile Include="src\trees.c"/>
|
<ClCompile Include="src\pngwutil.c" />
|
||||||
<ClCompile Include="src\zutil.c"/>
|
<ClCompile Include="src\Table.cpp" />
|
||||||
|
<ClCompile Include="src\TextAnnotation.cpp" />
|
||||||
|
<ClCompile Include="src\trees.c" />
|
||||||
|
<ClCompile Include="src\XMLTemplate.cpp" />
|
||||||
|
<ClCompile Include="src\zutil.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="include\Poco\PDF\crc32.h"/>
|
<ClInclude Include="include\Poco\PDF\AttributedString.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\deflate.h"/>
|
<ClInclude Include="include\Poco\PDF\Cell.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Destination.h"/>
|
<ClInclude Include="include\Poco\PDF\crc32.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Document.h"/>
|
<ClInclude Include="include\Poco\PDF\deflate.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Encoder.h"/>
|
<ClInclude Include="include\Poco\PDF\Destination.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Font.h"/>
|
<ClInclude Include="include\Poco\PDF\Document.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf.h"/>
|
<ClInclude Include="include\Poco\PDF\Encoder.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_3dmeasure.h"/>
|
<ClInclude Include="include\Poco\PDF\Font.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_annotation.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_catalog.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_3dmeasure.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_conf.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_annotation.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_consts.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_catalog.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_destination.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_conf.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_doc.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_consts.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_encoder.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_destination.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_encrypt.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_doc.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_encryptdict.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_encoder.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_error.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_encrypt.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_exdata.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_encryptdict.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_ext_gstate.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_error.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_font.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_exdata.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_fontdef.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_ext_gstate.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_gstate.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_font.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_image.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_fontdef.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_info.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_gstate.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_list.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_image.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_mmgr.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_info.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_namedict.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_list.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_objects.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_mmgr.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_outline.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_namedict.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_pages.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_objects.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_page_label.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_outline.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_pdfa.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_pages.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_streams.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_page_label.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_types.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_pdfa.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_u3d.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_streams.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_utils.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_types.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\hpdf_version.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_u3d.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Image.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_utils.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\inffast.h"/>
|
<ClInclude Include="include\Poco\PDF\hpdf_version.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\inffixed.h"/>
|
<ClInclude Include="include\Poco\PDF\Image.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\inflate.h"/>
|
<ClInclude Include="include\Poco\PDF\inffast.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\inftrees.h"/>
|
<ClInclude Include="include\Poco\PDF\inffixed.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\LinkAnnotation.h"/>
|
<ClInclude Include="include\Poco\PDF\inflate.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Outline.h"/>
|
<ClInclude Include="include\Poco\PDF\inftrees.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Page.h"/>
|
<ClInclude Include="include\Poco\PDF\LinkAnnotation.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\PDF.h"/>
|
<ClInclude Include="include\Poco\PDF\Outline.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\PDFException.h"/>
|
<ClInclude Include="include\Poco\PDF\Page.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\png.h"/>
|
<ClInclude Include="include\Poco\PDF\PDF.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\pngconf.h"/>
|
<ClInclude Include="include\Poco\PDF\PDFException.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\Resource.h"/>
|
<ClInclude Include="include\Poco\PDF\png.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\TextAnnotation.h"/>
|
<ClInclude Include="include\Poco\PDF\pngconf.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\trees.h"/>
|
<ClInclude Include="include\Poco\PDF\Resource.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\zconf.h"/>
|
<ClInclude Include="include\Poco\PDF\Table.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\zlib.h"/>
|
<ClInclude Include="include\Poco\PDF\TextAnnotation.h" />
|
||||||
<ClInclude Include="include\Poco\PDF\zutil.h"/>
|
<ClInclude Include="include\Poco\PDF\trees.h" />
|
||||||
|
<ClInclude Include="include\Poco\PDF\XMLTemplate.h" />
|
||||||
|
<ClInclude Include="include\Poco\PDF\zconf.h" />
|
||||||
|
<ClInclude Include="include\Poco\PDF\zlib.h" />
|
||||||
|
<ClInclude Include="include\Poco\PDF\zutil.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</Project>
|
</Project>
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
@@ -327,6 +327,18 @@
|
|||||||
<ClCompile Include="src\hpdf_xref.c">
|
<ClCompile Include="src\hpdf_xref.c">
|
||||||
<Filter>3rd Party\HARU\Source Files</Filter>
|
<Filter>3rd Party\HARU\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\AttributedString.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Cell.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Table.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\XMLTemplate.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="include\Poco\PDF\Destination.h">
|
<ClInclude Include="include\Poco\PDF\Destination.h">
|
||||||
@@ -497,5 +509,17 @@
|
|||||||
<ClInclude Include="include\Poco\PDF\hpdf_version.h">
|
<ClInclude Include="include\Poco\PDF\hpdf_version.h">
|
||||||
<Filter>3rd Party\HARU\Header Files</Filter>
|
<Filter>3rd Party\HARU\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\PDF\AttributedString.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\PDF\Cell.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\PDF\Table.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\PDF\XMLTemplate.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@@ -122,7 +122,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;PDF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;.\include\Poco\PDF;..\XML\include;..\Util\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
|
92
PDF/include/Poco/PDF/AttributedString.h
Normal file
92
PDF/include/Poco/PDF/AttributedString.h
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
//
|
||||||
|
// DocumentTemplate.h
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef PDF_AttributedString_INCLUDED
|
||||||
|
#define PDF_AttributedString_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/PDF/PDF.h"
|
||||||
|
#include "Poco/PDF/Font.h"
|
||||||
|
#include "Poco/Dynamic/Var.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
class PDF_API AttributedString
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum Alignment
|
||||||
|
{
|
||||||
|
ALIGN_LEFT = -1,
|
||||||
|
ALIGN_CENTER = 0,
|
||||||
|
ALIGN_RIGHT = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Style
|
||||||
|
{
|
||||||
|
STYLE_PLAIN = 0,
|
||||||
|
STYLE_BOLD = 1,
|
||||||
|
STYLE_ITALIC = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Attributes
|
||||||
|
{
|
||||||
|
ATTR_FONT = 1, // font name (std::string)
|
||||||
|
ATTR_SIZE = 2, // font size (int)
|
||||||
|
ATTR_STYLE = 3, // style bitmask (int)
|
||||||
|
ATTR_ALIGN = 4, // alignment (-1 = left, 0 = center, 1 = right)
|
||||||
|
};
|
||||||
|
|
||||||
|
AttributedString();
|
||||||
|
~AttributedString();
|
||||||
|
AttributedString(const char* str);
|
||||||
|
AttributedString(const std::string& str, Alignment align = ALIGN_LEFT, int style = (int)STYLE_PLAIN);
|
||||||
|
AttributedString& operator=(const std::string&);
|
||||||
|
AttributedString& operator=(const char*);
|
||||||
|
operator const std::string&();
|
||||||
|
|
||||||
|
void setAttribute(int attr, const Poco::Dynamic::Var& value);
|
||||||
|
Poco::Dynamic::Var getAttribute(int attr);
|
||||||
|
void clearAttribute(int attr);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string _content;
|
||||||
|
Alignment _align = ALIGN_LEFT;
|
||||||
|
int _style = STYLE_PLAIN;
|
||||||
|
std::string _fontName = "Helvetica";
|
||||||
|
int _fontSize = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
inline AttributedString& AttributedString::operator=(const std::string& content)
|
||||||
|
{
|
||||||
|
_content = content;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline AttributedString& AttributedString::operator=(const char* content)
|
||||||
|
{
|
||||||
|
_content = content;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline AttributedString::operator const std::string&()
|
||||||
|
{
|
||||||
|
return _content;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PDF_AttributedString_INCLUDED
|
154
PDF/include/Poco/PDF/Cell.h
Normal file
154
PDF/include/Poco/PDF/Cell.h
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
//
|
||||||
|
// Cell.h
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef PDF_Cell_INCLUDED
|
||||||
|
#define PDF_Cell_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/PDF/PDF.h"
|
||||||
|
#include "Poco/PDF/Page.h"
|
||||||
|
#include "Poco/PDF/AttributedString.h"
|
||||||
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
class PDF_API Cell
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef SharedPtr<Cell> Ptr;
|
||||||
|
typedef std::map<int, std::string> FontMap;
|
||||||
|
typedef SharedPtr<FontMap> FontMapPtr;
|
||||||
|
|
||||||
|
enum Outline
|
||||||
|
{
|
||||||
|
OUTLINE_NONE = 0,
|
||||||
|
OUTLINE_LEFT = 1,
|
||||||
|
OUTLINE_TOP = 2,
|
||||||
|
OUTLINE_RIGHT = 4,
|
||||||
|
OUTLINE_BOTTOM = 8
|
||||||
|
};
|
||||||
|
|
||||||
|
Cell(const AttributedString& content = "", const std::string& name = "", FontMapPtr pFontMap = 0);
|
||||||
|
Cell(const AttributedString& content, FontMapPtr pFontMap, const std::string& encoding = "UTF-8" , bool trueType = true);
|
||||||
|
~Cell();
|
||||||
|
|
||||||
|
const std::string& getName() const;
|
||||||
|
void setName(const std::string& name);
|
||||||
|
const AttributedString& getContent() const;
|
||||||
|
void setContent(const AttributedString& content);
|
||||||
|
unsigned getOutline() const;
|
||||||
|
void setOutline(Outline outline, bool show = true);
|
||||||
|
void borderLeft(bool show = true);
|
||||||
|
void borderTop(bool show = true);
|
||||||
|
void borderRight(bool show = true);
|
||||||
|
void borderBottom(bool show = true);
|
||||||
|
void borderTopBottom(bool show = true);
|
||||||
|
void borderLeftRight(bool show = true);
|
||||||
|
void borderAll(bool show = true);
|
||||||
|
float getLineWidth() const;
|
||||||
|
void setLineWidth(float width);
|
||||||
|
void setFonts(FontMapPtr pFontMap);
|
||||||
|
FontMapPtr getFonts() const { return _pFontMap; }
|
||||||
|
void draw(Page& page, float x, float y, float width, float height);
|
||||||
|
|
||||||
|
private:
|
||||||
|
AttributedString _content = "";
|
||||||
|
std::string _name = "";
|
||||||
|
unsigned _outline = OUTLINE_NONE;
|
||||||
|
float _lineWidth = 1.0f;
|
||||||
|
FontMapPtr _pFontMap;
|
||||||
|
std::string _encoding = "UTF-8";
|
||||||
|
bool _trueType = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef std::vector<Cell> TableRow;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
inline const std::string& Cell::getName() const
|
||||||
|
{
|
||||||
|
return _name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::setName(const std::string& name)
|
||||||
|
{
|
||||||
|
_name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const AttributedString& Cell::getContent() const
|
||||||
|
{
|
||||||
|
return _content;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::setContent(const AttributedString& content)
|
||||||
|
{
|
||||||
|
_content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline unsigned Cell::getOutline() const
|
||||||
|
{
|
||||||
|
return _outline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::setOutline(Cell::Outline outline, bool show)
|
||||||
|
{
|
||||||
|
if (show) _outline |= outline;
|
||||||
|
else _outline &= ~outline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::borderLeft(bool show)
|
||||||
|
{
|
||||||
|
setOutline(OUTLINE_LEFT, show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::borderTop(bool show)
|
||||||
|
{
|
||||||
|
setOutline(OUTLINE_TOP, show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::borderRight(bool show)
|
||||||
|
{
|
||||||
|
setOutline(OUTLINE_RIGHT, show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::borderBottom(bool show)
|
||||||
|
{
|
||||||
|
setOutline(OUTLINE_BOTTOM, show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline float Cell::getLineWidth() const
|
||||||
|
{
|
||||||
|
return _lineWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Cell::setLineWidth(float width)
|
||||||
|
{
|
||||||
|
_lineWidth = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PDF_Cell_INCLUDED
|
85
PDF/include/Poco/PDF/Table.h
Normal file
85
PDF/include/Poco/PDF/Table.h
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
//
|
||||||
|
// Table.h
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef PDF_Table_INCLUDED
|
||||||
|
#define PDF_Table_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/PDF/PDF.h"
|
||||||
|
#include "Poco/PDF/Page.h"
|
||||||
|
#include "Poco/PDF/Cell.h"
|
||||||
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
class PDF_API Table
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef SharedPtr<Table> Ptr;
|
||||||
|
typedef std::vector<TableRow> Cells;
|
||||||
|
|
||||||
|
Table(int columnCount, int rowCount, const std::string& name, Cell::FontMapPtr pFontMap = 0);
|
||||||
|
~Table();
|
||||||
|
|
||||||
|
void setCell(int col, int row, const Cell& cell);
|
||||||
|
void setColumnWidth(int col, double width);
|
||||||
|
void setFonts(Cell::FontMapPtr pFontMap);
|
||||||
|
|
||||||
|
const std::string name() const;
|
||||||
|
const Cells& cells() const;
|
||||||
|
|
||||||
|
void addRow();
|
||||||
|
void addRow(const TableRow& row);
|
||||||
|
|
||||||
|
std::size_t rows() const;
|
||||||
|
std::size_t columns() const;
|
||||||
|
|
||||||
|
void draw(Page& page, float x, float y, float width, float height);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Table();
|
||||||
|
|
||||||
|
std::string _name;
|
||||||
|
Cells _cells;
|
||||||
|
Cell::FontMapPtr _pFontMap;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// inlines
|
||||||
|
//
|
||||||
|
|
||||||
|
inline const std::string Table::name() const
|
||||||
|
{
|
||||||
|
return _name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const Table::Cells& Table::cells() const
|
||||||
|
{
|
||||||
|
return _cells;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline std::size_t Table::rows() const
|
||||||
|
{
|
||||||
|
return _cells.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline std::size_t Table::columns() const
|
||||||
|
{
|
||||||
|
return _cells[0].size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PDF_Table_INCLUDED
|
42
PDF/include/Poco/PDF/XMLTemplate.h
Normal file
42
PDF/include/Poco/PDF/XMLTemplate.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
//
|
||||||
|
// XMLTemplate.h
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef PDF_XMLTemplate_INCLUDED
|
||||||
|
#define PDF_XMLTemplate_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/PDF/PDF.h"
|
||||||
|
#include "Poco/PDF/Document.h"
|
||||||
|
#include "Poco/Path.h"
|
||||||
|
#include <istream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
class PDF_API XMLTemplate
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
XMLTemplate(std::istream& xmlStream, const std::string& base = Poco::Path::current());
|
||||||
|
XMLTemplate(const std::string& path);
|
||||||
|
|
||||||
|
~XMLTemplate();
|
||||||
|
|
||||||
|
void create(const std::string& fileName);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void load(std::istream& xmlStream);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Poco::Path _base;
|
||||||
|
Document* _pDocument;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PDF_DocumentTemplate_INCLUDED
|
@@ -1,2 +1,3 @@
|
|||||||
add_subdirectory( Image )
|
add_subdirectory(Image)
|
||||||
add_subdirectory( Text )
|
add_subdirectory(Text)
|
||||||
|
add_subdirectory(Template)
|
||||||
|
@@ -4,4 +4,4 @@ set(LOCAL_SRCS "")
|
|||||||
aux_source_directory(src LOCAL_SRCS)
|
aux_source_directory(src LOCAL_SRCS)
|
||||||
|
|
||||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||||
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoFoundation )
|
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoUtil PocoXML PocoFoundation )
|
||||||
|
@@ -10,6 +10,6 @@ objects = Image
|
|||||||
|
|
||||||
target = Image
|
target = Image
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoPDF PocoFoundation
|
target_libs = PocoPDF PocoUtil PocoXML PocoFoundation
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#if defined(POCO_OS_FAMILY_UNIX)
|
#if defined(POCO_OS_FAMILY_UNIX)
|
||||||
const std::string pdfFileName = "${POCO_BASE}/PDF/samples/Image/Image.pdf";
|
const std::string pdfFileName = "${POCO_BASE}/PDF/samples/Image/Image.pdf";
|
||||||
const std::string pngFileName = "${POCO_BASE}/PDF/samples/Image/logo.PNG";
|
const std::string pngFileName = "${POCO_BASE}/PDF/samples/Image/logo.png";
|
||||||
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
const std::string pdfFileName = "%POCO_BASE%/PDF/samples/Image/Image.pdf";
|
const std::string pdfFileName = "%POCO_BASE%/PDF/samples/Image/Image.pdf";
|
||||||
const std::string pngFileName = "%POCO_BASE%/PDF/samples/Image/logo.PNG";
|
const std::string pngFileName = "%POCO_BASE%/PDF/samples/Image/logo.PNG";
|
||||||
|
@@ -9,3 +9,4 @@ clean all: projects
|
|||||||
projects:
|
projects:
|
||||||
$(MAKE) -C Text $(MAKECMDGOALS)
|
$(MAKE) -C Text $(MAKECMDGOALS)
|
||||||
$(MAKE) -C Image $(MAKECMDGOALS)
|
$(MAKE) -C Image $(MAKECMDGOALS)
|
||||||
|
$(MAKE) -C Template $(MAKECMDGOALS)
|
||||||
|
7
PDF/samples/Template/CMakeLists.txt
Normal file
7
PDF/samples/Template/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
set(SAMPLE_NAME "Template")
|
||||||
|
|
||||||
|
set(LOCAL_SRCS "")
|
||||||
|
aux_source_directory(src LOCAL_SRCS)
|
||||||
|
|
||||||
|
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||||
|
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoUtil PocoXML PocoFoundation )
|
15
PDF/samples/Template/Makefile
Normal file
15
PDF/samples/Template/Makefile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
#
|
||||||
|
# Makefile for Poco PDF Template sample
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
objects = Text
|
||||||
|
|
||||||
|
target = Template
|
||||||
|
target_version = 1
|
||||||
|
target_libs = PocoPDF PocoUtil PocoXML PocoFoundation
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/exec
|
BIN
PDF/samples/Template/Simpsons_FamilyPicture.png
Normal file
BIN
PDF/samples/Template/Simpsons_FamilyPicture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
120
PDF/samples/Template/Template.xml
Normal file
120
PDF/samples/Template/Template.xml
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<document style="font-family: helvetica; font-size: 12; line-height: 1.4" size="A4" orientation="portrait" encoding="ISO8859-2">
|
||||||
|
<page style="margin: 35; padding: 20">
|
||||||
|
<span style="left: 0; bottom: -120; font-size: 24">Simpsons Report</span>
|
||||||
|
<img src="Simpsons_FamilyPicture.png" style="right: ${box.width}; top: ${box.height}; scale=0.3"/>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Springfield</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Somewhere, USA</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr></tr><tr></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Father</td>
|
||||||
|
<td>Homer Simpson</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Mother</td>
|
||||||
|
<td>Marge Simpson</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr/>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Son</td>
|
||||||
|
<td>Bart</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Daughter</td>
|
||||||
|
<td>Lisa</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Daughter</td>
|
||||||
|
<td>Maggie</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Dog</td>
|
||||||
|
<td>Santa's Little Helper</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cat</td>
|
||||||
|
<td>Snowball V</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr/>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Dan Castellaneta</td>
|
||||||
|
<td>Homer Simpson</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Julie Kavner</td>
|
||||||
|
<td>Marge Simpson</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Nancy Cartwright</td>
|
||||||
|
<td>Bart Simpson</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Yeardley Smith</td>
|
||||||
|
<td>Lisa Simpson</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold; text-align: right">Special Guests</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr/>
|
||||||
|
<table style="font-weight: bold; text-align: right">
|
||||||
|
<tr>
|
||||||
|
<td>Albert</td> ,
|
||||||
|
<td>Brooks</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Phil</td>
|
||||||
|
<td>Hartman</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Jon</td>
|
||||||
|
<td>Lovitz</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Joe</td>
|
||||||
|
<td>Mantegna</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Maurice</td>
|
||||||
|
<td>LaMarche</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Kelsey</td>
|
||||||
|
<td>Grammer</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
DBV75
|
||||||
|
<hr style="top: 70"/>
|
||||||
|
<table style="bottom: 0" name="footer">
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold">Executive Producer</td>
|
||||||
|
<td>Matt Groening</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold">Executive Producer</td>
|
||||||
|
<td>James L. Brooks</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold">Director</td>
|
||||||
|
<td>Brad Bird</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold">Creative Supervisor</td>
|
||||||
|
<td>Sam Simon</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</page>
|
||||||
|
</document>
|
33
PDF/samples/Template/Template_vs140.sln
Normal file
33
PDF/samples/Template/Template_vs140.sln
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.25123.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Template", "Template_vs140.vcxproj", "{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x86 = debug_shared|x86
|
||||||
|
debug_static_md|x86 = debug_static_md|x86
|
||||||
|
debug_static_mt|x86 = debug_static_mt|x86
|
||||||
|
release_shared|x86 = release_shared|x86
|
||||||
|
release_static_md|x86 = release_static_md|x86
|
||||||
|
release_static_mt|x86 = release_static_mt|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_shared|x86.ActiveCfg = debug_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_shared|x86.Build.0 = debug_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_md|x86.ActiveCfg = debug_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_md|x86.Build.0 = debug_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_mt|x86.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_mt|x86.Build.0 = debug_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_shared|x86.ActiveCfg = release_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_shared|x86.Build.0 = release_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_md|x86.ActiveCfg = release_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_md|x86.Build.0 = release_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_mt|x86.ActiveCfg = release_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_mt|x86.Build.0 = release_static_mt|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
309
PDF/samples/Template/Template_vs140.vcxproj
Normal file
309
PDF/samples/Template/Template_vs140.vcxproj
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
|
<Configuration>debug_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||||
|
<Configuration>debug_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||||
|
<Configuration>debug_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_shared|Win32">
|
||||||
|
<Configuration>release_shared</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_md|Win32">
|
||||||
|
<Configuration>release_static_md</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||||
|
<Configuration>release_static_mt</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>Template</ProjectName>
|
||||||
|
<ProjectGuid>{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}</ProjectGuid>
|
||||||
|
<RootNamespace>Template</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">Templated</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">Templated</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">Templated</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">Template</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">Template</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">Template</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<OutDir>bin\</OutDir>
|
||||||
|
<IntDir>obj\Template\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<OutDir>bin\</OutDir>
|
||||||
|
<IntDir>obj\Template\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<OutDir>bin\static_mt\</OutDir>
|
||||||
|
<IntDir>obj\Template\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<OutDir>bin\static_mt\</OutDir>
|
||||||
|
<IntDir>obj\Template\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<OutDir>bin\static_md\</OutDir>
|
||||||
|
<IntDir>obj\Template\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<OutDir>bin\static_md\</OutDir>
|
||||||
|
<IntDir>obj\Template\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<OutputFile>bin\Templated.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\Templated.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<OutputFile>bin\Template.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_mt\Templated.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\static_mt\Templated.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_mt\Template.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_md\Templated.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>bin\static_md\Templated.pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>iphlpapi.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>bin\static_md\Template.exe</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Template.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
16
PDF/samples/Template/Template_vs140.vcxproj.filters
Normal file
16
PDF/samples/Template/Template_vs140.vcxproj.filters
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{c3ea6789-01d4-4bcf-9fe7-c011c458e565}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{6f12f7ad-3ab0-4ce8-b573-8c77781dff88}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Template.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
38
PDF/samples/Template/src/Template.cpp
Normal file
38
PDF/samples/Template/src/Template.cpp
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// main.cpp
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/PDF/XMLTemplate.h"
|
||||||
|
#include "Poco/Path.h"
|
||||||
|
#include "Poco/File.h"
|
||||||
|
#include "Poco/Exception.h"
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(POCO_OS_FAMILY_UNIX)
|
||||||
|
const std::string pdfFileName = "${POCO_BASE}/PDF/samples/Template/Report.pdf";
|
||||||
|
const std::string xmlFileName = "${POCO_BASE}/PDF/samples/Template/Template.xml";
|
||||||
|
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
const std::string pdfFileName = "%POCO_BASE%/PDF/samples/Template/Report.pdf";
|
||||||
|
const std::string xmlFileName = "%POCO_BASE%/PDF/samples/Template/Template.xml";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
using Poco::Path;
|
||||||
|
using Poco::File;
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Poco::PDF::XMLTemplate xmlTemplate(Path::expand(xmlFileName));
|
||||||
|
xmlTemplate.create(Path::expand(pdfFileName));
|
||||||
|
}
|
||||||
|
catch (Poco::Exception& exc)
|
||||||
|
{
|
||||||
|
std::cerr << "ERROR: " << exc.displayText() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -4,4 +4,4 @@ set(LOCAL_SRCS "")
|
|||||||
aux_source_directory(src LOCAL_SRCS)
|
aux_source_directory(src LOCAL_SRCS)
|
||||||
|
|
||||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||||
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoFoundation )
|
target_link_libraries( ${SAMPLE_NAME} PocoPDF PocoUtil PocoXML PocoFoundation )
|
||||||
|
@@ -10,6 +10,6 @@ objects = Text
|
|||||||
|
|
||||||
target = Text
|
target = Text
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoPDF PocoFoundation
|
target_libs = PocoPDF PocoUtil PocoXML PocoFoundation
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
BIN
PDF/samples/Text/Text.pdf
Normal file
BIN
PDF/samples/Text/Text.pdf
Normal file
Binary file not shown.
@@ -1,55 +1,71 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2015
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.25420.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Image", "Image\Image_vs140.vcxproj", "{DA74060D-73AF-3E8F-A804-FBC960DAC393}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Image", "Image\Image_vs140.vcxproj", "{DA74060D-73AF-3E8F-A804-FBC960DAC393}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Text", "Text\Text_vs140.vcxproj", "{0DE18C25-1694-3598-831D-4FA48D113606}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Text", "Text\Text_vs140.vcxproj", "{0DE18C25-1694-3598-831D-4FA48D113606}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Template", "Template\Template_vs140.vcxproj", "{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
debug_shared|Win32 = debug_shared|Win32
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
release_shared|Win32 = release_shared|Win32
|
|
||||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
|
||||||
release_static_mt|Win32 = release_static_mt|Win32
|
|
||||||
debug_static_md|Win32 = debug_static_md|Win32
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
release_static_md|Win32 = release_static_md|Win32
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_shared|Win32.Build.0 = release_shared|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{DA74060D-73AF-3E8F-A804-FBC960DAC393}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_shared|Win32.Build.0 = release_shared|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{0DE18C25-1694-3598-831D-4FA48D113606}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{C551DFAC-C81B-4C23-8FD4-7F320110D3B1}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
86
PDF/src/AttributedString.cpp
Normal file
86
PDF/src/AttributedString.cpp
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
//
|
||||||
|
// AttributedString.cpp
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "Poco/PDF/AttributedString.h"
|
||||||
|
#include "Poco/Format.h"
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
AttributedString::AttributedString()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AttributedString::AttributedString(const char* content): _content(content)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AttributedString::AttributedString(const std::string& content, Alignment align, int style):
|
||||||
|
_content(content), _align(align), _style(static_cast<Style>(style))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AttributedString::~AttributedString()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AttributedString::setAttribute(int attr, const Poco::Dynamic::Var& value)
|
||||||
|
{
|
||||||
|
switch (attr)
|
||||||
|
{
|
||||||
|
case ATTR_FONT:
|
||||||
|
_fontName = value.toString();
|
||||||
|
return;
|
||||||
|
case ATTR_SIZE:
|
||||||
|
_fontSize = value;
|
||||||
|
return;
|
||||||
|
case ATTR_STYLE:
|
||||||
|
_style = value.convert<int>();
|
||||||
|
return;
|
||||||
|
case ATTR_ALIGN:
|
||||||
|
_align = static_cast<Alignment>(value.convert<int>());
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
throw InvalidArgumentException(
|
||||||
|
format("AttributeString::setAttribute: %d", attr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Poco::Dynamic::Var AttributedString::getAttribute(int attr)
|
||||||
|
{
|
||||||
|
switch (attr)
|
||||||
|
{
|
||||||
|
case ATTR_FONT: return _fontName;
|
||||||
|
case ATTR_SIZE: return _fontSize;
|
||||||
|
case ATTR_STYLE: return static_cast<int>(_style);
|
||||||
|
case ATTR_ALIGN: return static_cast<int>(_align);
|
||||||
|
default:
|
||||||
|
throw InvalidArgumentException(
|
||||||
|
format("AttributeString::setAttribute: %d", attr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AttributedString::clearAttribute(int attr)
|
||||||
|
{
|
||||||
|
switch (attr)
|
||||||
|
{
|
||||||
|
case ATTR_FONT: _fontName = "Helvetica"; return;
|
||||||
|
case ATTR_SIZE: _fontSize = 10; return;
|
||||||
|
case ATTR_STYLE: _style = STYLE_PLAIN; return;
|
||||||
|
case ATTR_ALIGN: _align = ALIGN_LEFT; return;
|
||||||
|
default:
|
||||||
|
throw InvalidArgumentException(
|
||||||
|
format("AttributeString::setAttribute: %d", attr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
150
PDF/src/Cell.cpp
Normal file
150
PDF/src/Cell.cpp
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
//
|
||||||
|
// Cell.cpp
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "Poco/PDF/Cell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
Cell::Cell(const AttributedString& content, const std::string& name, FontMapPtr pFontMap):
|
||||||
|
_content(content), _name(name)
|
||||||
|
{
|
||||||
|
setFonts(pFontMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Cell::Cell(const AttributedString& content, FontMapPtr pFontMap, const std::string& encoding, bool trueType):
|
||||||
|
_content(content), _encoding(encoding), _trueType(trueType)
|
||||||
|
{
|
||||||
|
setFonts(pFontMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Cell::~Cell()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Cell::setFonts(FontMapPtr pFontMap)
|
||||||
|
{
|
||||||
|
_pFontMap = pFontMap;
|
||||||
|
if (_pFontMap) poco_assert(_pFontMap->size() == 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Cell::borderTopBottom(bool show)
|
||||||
|
{
|
||||||
|
borderTop(show);
|
||||||
|
borderBottom(show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Cell::borderLeftRight(bool show)
|
||||||
|
{
|
||||||
|
borderLeft(show);
|
||||||
|
borderRight(show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Cell::borderAll(bool show)
|
||||||
|
{
|
||||||
|
borderTop(show);
|
||||||
|
borderBottom(show);
|
||||||
|
borderLeft(show);
|
||||||
|
borderRight(show);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Cell::draw(Page& page, float x, float y, float width, float height)
|
||||||
|
{
|
||||||
|
// uncomment to force showing of the cell outline regardless of settings
|
||||||
|
// _outline = 15;
|
||||||
|
|
||||||
|
if (_outline != OUTLINE_NONE)
|
||||||
|
{
|
||||||
|
page.setLineWidth(_lineWidth);
|
||||||
|
page.moveTo(x, y);
|
||||||
|
if (_outline & OUTLINE_LEFT ) page.lineTo(x, y+height);
|
||||||
|
if (_outline & OUTLINE_TOP ) page.lineTo(x+width, y+height);
|
||||||
|
if (_outline & OUTLINE_RIGHT ) page.lineTo(x+width, y );
|
||||||
|
if (_outline & OUTLINE_BOTTOM) page.lineTo(x, y );
|
||||||
|
page.stroke();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string text = _content;
|
||||||
|
if (!text.empty())
|
||||||
|
{
|
||||||
|
Font originalFont = page.getFont();
|
||||||
|
float originalSize = page.getFontSize();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// font names hard coded here, needs more work on the library level
|
||||||
|
int fontStyle = _content.getAttribute(AttributedString::ATTR_STYLE);
|
||||||
|
float fontSize = _content.getAttribute(AttributedString::ATTR_SIZE);
|
||||||
|
if (fontStyle == AttributedString::STYLE_PLAIN)
|
||||||
|
{
|
||||||
|
if (!_pFontMap) page.setFont("Helvetica", fontSize);
|
||||||
|
else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_PLAIN], fontSize, _encoding);
|
||||||
|
else page.setFont((*_pFontMap)[AttributedString::STYLE_PLAIN], fontSize, _encoding);
|
||||||
|
}
|
||||||
|
else if (fontStyle | AttributedString::STYLE_BOLD)
|
||||||
|
{
|
||||||
|
if (!_pFontMap) page.setFont("Helvetica-Bold", fontSize);
|
||||||
|
else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_BOLD], fontSize, _encoding);
|
||||||
|
else page.setFont((*_pFontMap)[AttributedString::STYLE_BOLD], fontSize, _encoding);
|
||||||
|
}
|
||||||
|
else if (fontStyle | AttributedString::STYLE_ITALIC)
|
||||||
|
{
|
||||||
|
if (!_pFontMap) page.setFont("Helvetica-Oblique", fontSize);
|
||||||
|
else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_ITALIC], fontSize, _encoding);
|
||||||
|
else page.setFont((*_pFontMap)[AttributedString::STYLE_ITALIC], fontSize, _encoding);
|
||||||
|
}
|
||||||
|
else if ((fontStyle & AttributedString::STYLE_BOLD) && (fontStyle & AttributedString::STYLE_ITALIC))
|
||||||
|
{
|
||||||
|
if (!_pFontMap) page.setFont("Helvetica-BoldOblique", fontSize);
|
||||||
|
else if (_trueType) page.setTTFont((*_pFontMap)[AttributedString::STYLE_BOLD | AttributedString::STYLE_ITALIC], fontSize, _encoding);
|
||||||
|
else page.setFont((*_pFontMap)[AttributedString::STYLE_BOLD | AttributedString::STYLE_ITALIC], fontSize, _encoding);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw NotFoundException(format("Unknown font style: %d", fontStyle));
|
||||||
|
}
|
||||||
|
|
||||||
|
float tw = page.textWidth(text);
|
||||||
|
// trim text that does not fit
|
||||||
|
while (tw > width && text.size())
|
||||||
|
{
|
||||||
|
text = text.substr(0, text.size() - 1);
|
||||||
|
tw = page.textWidth(text);
|
||||||
|
}
|
||||||
|
float th = page.getFontSize();
|
||||||
|
float yPos = (height <= th) ? y : y + (height - th) / 2;
|
||||||
|
int align = _content.getAttribute(AttributedString::ATTR_ALIGN);
|
||||||
|
switch (align)
|
||||||
|
{
|
||||||
|
case AttributedString::ALIGN_LEFT:
|
||||||
|
page.writeOnce(x + 5, yPos, text); break;
|
||||||
|
case AttributedString::ALIGN_CENTER:
|
||||||
|
page.writeOnce(x + (width - tw) / 2, yPos, text); break;
|
||||||
|
break;
|
||||||
|
case AttributedString::ALIGN_RIGHT:
|
||||||
|
page.writeOnce(x + (width - tw), yPos, text); break;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw NotFoundException(format("Unknown alignment mode: %d", align));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Poco::Exception&)
|
||||||
|
{
|
||||||
|
page.setFont(originalFont, originalSize);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
page.setFont(originalFont, originalSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
86
PDF/src/Table.cpp
Normal file
86
PDF/src/Table.cpp
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
//
|
||||||
|
// Table.cpp
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "Poco/PDF/Table.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
Table::Table(int columnCount, int rowCount, const std::string& name, Cell::FontMapPtr pFontMap):
|
||||||
|
_name(name), _cells(rowCount, TableRow(columnCount))
|
||||||
|
{
|
||||||
|
setFonts(pFontMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Table::~Table()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Table::addRow()
|
||||||
|
{
|
||||||
|
_cells.push_back(TableRow(columns()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Table::addRow(const TableRow& row)
|
||||||
|
{
|
||||||
|
if (_cells.empty())
|
||||||
|
{
|
||||||
|
_cells.push_back(row);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cells.push_back(row);
|
||||||
|
_cells.back().resize(_cells.front().size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Table::setCell(int col, int row, const Cell& cell)
|
||||||
|
{
|
||||||
|
_cells[row][col] = cell;
|
||||||
|
if (_pFontMap && !cell.getFonts()) _cells[row][col].setFonts(_pFontMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Table::setColumnWidth(int col, double width)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Table::setFonts(Cell::FontMapPtr pFontMap)
|
||||||
|
{
|
||||||
|
_pFontMap = pFontMap;
|
||||||
|
if (_pFontMap) { poco_assert(_pFontMap->size() == 4); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Table::draw(Page& page, float x, float y, float width, float height)
|
||||||
|
{
|
||||||
|
if (_cells.size())
|
||||||
|
{
|
||||||
|
int rows = _cells.size();
|
||||||
|
int cols = _cells[0].size();
|
||||||
|
int r = 0;
|
||||||
|
for (auto& row : _cells)
|
||||||
|
{
|
||||||
|
float h = height / rows;
|
||||||
|
int c = 0;
|
||||||
|
for (auto& cell : row)
|
||||||
|
{
|
||||||
|
float w = width / cols;
|
||||||
|
cell.draw(page, x + (w * c), y - (h * r), w, h);
|
||||||
|
++c;
|
||||||
|
}
|
||||||
|
++r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
848
PDF/src/XMLTemplate.cpp
Normal file
848
PDF/src/XMLTemplate.cpp
Normal file
@@ -0,0 +1,848 @@
|
|||||||
|
//
|
||||||
|
// XMLTemplate.cpp
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/PDF/XMLTemplate.h"
|
||||||
|
#include "Poco/PDF/Table.h"
|
||||||
|
#include "Poco/SAX/SAXParser.h"
|
||||||
|
#include "Poco/SAX/DefaultHandler.h"
|
||||||
|
#include "Poco/SAX/Attributes.h"
|
||||||
|
#include "Poco/SAX/InputSource.h"
|
||||||
|
#include "Poco/Util/PropertyFileConfiguration.h"
|
||||||
|
#include "Poco/FileStream.h"
|
||||||
|
#include "Poco/AutoPtr.h"
|
||||||
|
#include "Poco/String.h"
|
||||||
|
#include "Poco/Exception.h"
|
||||||
|
#include "Poco/Path.h"
|
||||||
|
#include "Poco/TextConverter.h"
|
||||||
|
#include "Poco/UTF8Encoding.h"
|
||||||
|
#include "Poco/UTF8String.h"
|
||||||
|
#include <vector>
|
||||||
|
#include <set>
|
||||||
|
#include <sstream>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace PDF {
|
||||||
|
|
||||||
|
|
||||||
|
class StackedConfiguration : public Poco::Util::AbstractConfiguration
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Poco::AutoPtr<Poco::Util::AbstractConfiguration> ConfigPtr;
|
||||||
|
typedef std::vector<ConfigPtr> ConfigStack;
|
||||||
|
|
||||||
|
void push(ConfigPtr pConfig)
|
||||||
|
{
|
||||||
|
_stack.push_back(pConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
void pop()
|
||||||
|
{
|
||||||
|
_stack.pop_back();
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigPtr current() const
|
||||||
|
{
|
||||||
|
poco_assert(_stack.size() > 0);
|
||||||
|
return _stack.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
float getFloat(const std::string& value)
|
||||||
|
{
|
||||||
|
return static_cast<float>(getDouble(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
float getFloat(const std::string& value, float deflt)
|
||||||
|
{
|
||||||
|
return static_cast<float>(getDouble(value, deflt));
|
||||||
|
}
|
||||||
|
|
||||||
|
// AbstractConfiguration
|
||||||
|
bool getRaw(const std::string& key, std::string& value) const
|
||||||
|
{
|
||||||
|
for (ConfigStack::const_reverse_iterator it = _stack.rbegin(); it != _stack.rend(); ++it)
|
||||||
|
{
|
||||||
|
if ((*it)->has(key))
|
||||||
|
{
|
||||||
|
value = (*it)->getRawString(key);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setRaw(const std::string& key, const std::string& value)
|
||||||
|
{
|
||||||
|
throw Poco::InvalidAccessException("not writable");
|
||||||
|
}
|
||||||
|
|
||||||
|
void enumerate(const std::string& key, Poco::Util::AbstractConfiguration::Keys& range) const
|
||||||
|
{
|
||||||
|
std::set<std::string> keys;
|
||||||
|
for (ConfigStack::const_iterator itc = _stack.begin(); itc != _stack.end(); ++itc)
|
||||||
|
{
|
||||||
|
Poco::Util::AbstractConfiguration::Keys partRange;
|
||||||
|
(*itc)->keys(key, partRange);
|
||||||
|
for (Poco::Util::AbstractConfiguration::Keys::const_iterator itr = partRange.begin(); itr != partRange.end(); ++itr)
|
||||||
|
{
|
||||||
|
if (keys.find(*itr) == keys.end())
|
||||||
|
{
|
||||||
|
range.push_back(*itr);
|
||||||
|
keys.insert(*itr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeRaw(const std::string& key)
|
||||||
|
{
|
||||||
|
throw Poco::InvalidAccessException("not writable");
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<ConfigPtr> _stack;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Box
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Box() :
|
||||||
|
_x(0),
|
||||||
|
_y(0),
|
||||||
|
_width(0),
|
||||||
|
_height(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Box(float x, float y, float width, float height) :
|
||||||
|
_x(x),
|
||||||
|
_y(y),
|
||||||
|
_width(width),
|
||||||
|
_height(height)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Box(const Box& box) :
|
||||||
|
_x(box._x),
|
||||||
|
_y(box._y),
|
||||||
|
_width(box._width),
|
||||||
|
_height(box._height)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
~Box()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Box& operator = (const Box& box)
|
||||||
|
{
|
||||||
|
Box tmp(box);
|
||||||
|
tmp.swap(*this);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void swap(Box& box)
|
||||||
|
{
|
||||||
|
std::swap(_x, box._x);
|
||||||
|
std::swap(_y, box._y);
|
||||||
|
std::swap(_width, box._width);
|
||||||
|
std::swap(_height, box._height);
|
||||||
|
}
|
||||||
|
|
||||||
|
float left() const
|
||||||
|
{
|
||||||
|
return _x;
|
||||||
|
}
|
||||||
|
|
||||||
|
float right() const
|
||||||
|
{
|
||||||
|
return _x + _width;
|
||||||
|
}
|
||||||
|
|
||||||
|
float bottom() const
|
||||||
|
{
|
||||||
|
return _y;
|
||||||
|
}
|
||||||
|
|
||||||
|
float top() const
|
||||||
|
{
|
||||||
|
return _y + _height;
|
||||||
|
}
|
||||||
|
|
||||||
|
float width() const
|
||||||
|
{
|
||||||
|
return _width;
|
||||||
|
}
|
||||||
|
|
||||||
|
float height() const
|
||||||
|
{
|
||||||
|
return _height;
|
||||||
|
}
|
||||||
|
|
||||||
|
void inset(float delta)
|
||||||
|
{
|
||||||
|
_x += delta;
|
||||||
|
_y -= delta;
|
||||||
|
_width -= 2 * delta;
|
||||||
|
_height -= 2 * delta;
|
||||||
|
}
|
||||||
|
|
||||||
|
void extend(float delta)
|
||||||
|
{
|
||||||
|
inset(-delta);
|
||||||
|
}
|
||||||
|
|
||||||
|
void inset(float left, float right, float top, float bottom)
|
||||||
|
{
|
||||||
|
_x += left;
|
||||||
|
_y += bottom;
|
||||||
|
_width -= (left + right);
|
||||||
|
_height -= (top + bottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
float _x;
|
||||||
|
float _y;
|
||||||
|
float _width;
|
||||||
|
float _height;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TemplateHandler : public Poco::XML::DefaultHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Poco::AutoPtr<Poco::Util::AbstractConfiguration> StylePtr;
|
||||||
|
|
||||||
|
TemplateHandler(const Poco::Path& base) :
|
||||||
|
_base(base),
|
||||||
|
_pDocument(0),
|
||||||
|
_pPage(0),
|
||||||
|
_y(0)
|
||||||
|
{
|
||||||
|
_styles.push(parseStyle("font-family: Helvetica; font-size: 12; line-height: 1.2"));
|
||||||
|
}
|
||||||
|
|
||||||
|
~TemplateHandler()
|
||||||
|
{
|
||||||
|
_styles.pop();
|
||||||
|
delete _pPage;
|
||||||
|
delete _pDocument;
|
||||||
|
}
|
||||||
|
|
||||||
|
Document* document()
|
||||||
|
{
|
||||||
|
Document* pDocument = _pDocument;
|
||||||
|
_pDocument = 0;
|
||||||
|
return pDocument;
|
||||||
|
}
|
||||||
|
|
||||||
|
void startDoc(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (_pDocument) throw Poco::IllegalStateException("only one <document> element is allowed");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
_size = attributes.getValue("size");
|
||||||
|
if (_size.empty()) _size = "A4";
|
||||||
|
_orientation = attributes.getValue("orientation");
|
||||||
|
if (_orientation.empty()) _orientation = "portrait";
|
||||||
|
|
||||||
|
_encoding = attributes.getValue("encoding");
|
||||||
|
if (_encoding.empty()) _encoding = "WinAnsiEncoding";
|
||||||
|
|
||||||
|
_pDocument = new Document(0, parsePageSize(_size), parseOrientation(_orientation));
|
||||||
|
}
|
||||||
|
|
||||||
|
void endDoc()
|
||||||
|
{
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startPage(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (!_pDocument) throw Poco::IllegalStateException("missing <document> element");
|
||||||
|
if (_pPage) throw Poco::IllegalStateException("nested <page> elements are not allowed");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
std::string size = attributes.getValue("size");
|
||||||
|
if (size.empty()) size = _size;
|
||||||
|
std::string orientation = attributes.getValue("orientation");
|
||||||
|
if (orientation.empty()) orientation = _orientation;
|
||||||
|
|
||||||
|
_pPage = new Page(_pDocument->addPage(parsePageSize(_size), parseOrientation(orientation)));
|
||||||
|
_pPage->setLineWidth(0.2f);
|
||||||
|
_pPage->setRGBStroke({ 0, 0, 0 });
|
||||||
|
_boxes.push_back(Box(0, 0, _pPage->getWidth(), _pPage->getHeight()));
|
||||||
|
|
||||||
|
float margin = _styles.getFloat("margin", 0);
|
||||||
|
float marginLeft = _styles.getFloat("margin-left", margin);
|
||||||
|
float marginRight = _styles.getFloat("margin-right", margin);
|
||||||
|
float marginTop = _styles.getFloat("margin-top", margin);
|
||||||
|
float marginBottom = _styles.getFloat("margin-bottom", margin);
|
||||||
|
|
||||||
|
_boxes.back().inset(marginLeft, marginRight, marginTop, marginBottom);
|
||||||
|
|
||||||
|
_y = _boxes.back().top();
|
||||||
|
}
|
||||||
|
|
||||||
|
void endPage()
|
||||||
|
{
|
||||||
|
_boxes.pop_back();
|
||||||
|
delete _pPage;
|
||||||
|
_pPage = 0;
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startSpan(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (!_pPage) throw Poco::IllegalStateException("missing <page> element");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
_text.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void endSpan()
|
||||||
|
{
|
||||||
|
std::string fontFamily = _styles.getString("font-family");
|
||||||
|
float fontSize = _styles.getFloat("font-size");
|
||||||
|
float lineHeight = _styles.getFloat("line-height");
|
||||||
|
std::string textAlign = _styles.getString("text-align", "left");
|
||||||
|
std::string fontStyle = _styles.getString("font-style", "normal");
|
||||||
|
std::string fontWeight = _styles.getString("font-weight", "normal");
|
||||||
|
std::string textTransform = _styles.getString("text-transform", "none");
|
||||||
|
|
||||||
|
_text = transform(_text, textTransform);
|
||||||
|
_text = transcode(_text);
|
||||||
|
|
||||||
|
Font font = loadFont(fontFamily, fontStyle, fontWeight);
|
||||||
|
|
||||||
|
_pPage->setFont(font, fontSize);
|
||||||
|
|
||||||
|
float width = static_cast<float>(font.textWidth(_text).width*fontSize / 1000);
|
||||||
|
float height = static_cast<float>(font.upperHeight()*fontSize / 1000)*lineHeight;
|
||||||
|
|
||||||
|
float x = static_cast<float>(_styles.current()->getDouble("left", _styles.current()->getDouble("right", width) - width));
|
||||||
|
float y = static_cast<float>(_styles.current()->getDouble("bottom", _styles.current()->getDouble("top", _y) - height));
|
||||||
|
|
||||||
|
if (textAlign == "center")
|
||||||
|
x = (box().width() - width) / 2;
|
||||||
|
else if (textAlign == "right")
|
||||||
|
x = box().width() - width;
|
||||||
|
|
||||||
|
translateInBox(x, y);
|
||||||
|
|
||||||
|
_pPage->writeOnce(x, y, _text);
|
||||||
|
|
||||||
|
moveY(y);
|
||||||
|
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startImg(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (!_pPage) throw Poco::IllegalStateException("missing <page> element");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
std::string path = attributes.getValue("src");
|
||||||
|
Image image = loadImage(path);
|
||||||
|
|
||||||
|
float width = static_cast<float>(pStyle->getDouble("width", image.width()));
|
||||||
|
float height = static_cast<float>(pStyle->getDouble("height", image.height()));
|
||||||
|
|
||||||
|
float scale = static_cast<float>(pStyle->getDouble("scale", 1.0));
|
||||||
|
float scaleX = static_cast<float>(pStyle->getDouble("scale-x", scale));
|
||||||
|
float scaleY = static_cast<float>(pStyle->getDouble("scale-y", scale));
|
||||||
|
|
||||||
|
width *= scaleX;
|
||||||
|
height *= scaleY;
|
||||||
|
|
||||||
|
float x = static_cast<float>(_styles.current()->getDouble("left", _styles.current()->getDouble("right", width) - width));
|
||||||
|
float y = static_cast<float>(_styles.current()->getDouble("bottom", _styles.current()->getDouble("top", _y) - height));
|
||||||
|
|
||||||
|
translateInBox(x, y);
|
||||||
|
|
||||||
|
_pPage->drawImage(image, x, y, width, height);
|
||||||
|
|
||||||
|
moveY(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void endImg()
|
||||||
|
{
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startTable(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (!_pPage) throw Poco::IllegalStateException("missing <page> element");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
_pTable = new Table(0, 0, attributes.getValue("name"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void endTable()
|
||||||
|
{
|
||||||
|
if (_pTable->rows() > 0)
|
||||||
|
{
|
||||||
|
std::string fontFamily = _styles.getString("font-family");
|
||||||
|
float fontSize = _styles.getFloat("font-size");
|
||||||
|
std::string fontStyle = _styles.getString("font-style", "normal");
|
||||||
|
std::string fontWeight = _styles.getString("font-weight", "normal");
|
||||||
|
|
||||||
|
Font font = loadFont(fontFamily, fontStyle, fontWeight);
|
||||||
|
|
||||||
|
float lineHeight = static_cast<float>((font.ascent() - font.descent())*fontSize / 1000)*_styles.getFloat("line-height");
|
||||||
|
|
||||||
|
float width = static_cast<float>(_styles.current()->getDouble("width", box().width()));
|
||||||
|
float height = static_cast<float>(_styles.current()->getDouble("height", _pTable->rows()*lineHeight));
|
||||||
|
|
||||||
|
float x = static_cast<float>(_styles.current()->getDouble("left", _styles.current()->getDouble("right", width) - width));
|
||||||
|
float y = static_cast<float>(_styles.current()->getDouble("bottom", _styles.current()->getDouble("top", _y) - height) + height);
|
||||||
|
y -= lineHeight;
|
||||||
|
|
||||||
|
translateInBox(x, y);
|
||||||
|
|
||||||
|
_pTable->draw(*_pPage, x, y, width, height);
|
||||||
|
|
||||||
|
y -= height - lineHeight;
|
||||||
|
|
||||||
|
moveY(y);
|
||||||
|
}
|
||||||
|
_pTable = 0;
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startTr(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (!_pTable) throw Poco::IllegalStateException("missing <table> element");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
_row.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void endTr()
|
||||||
|
{
|
||||||
|
_pTable->addRow(_row);
|
||||||
|
_row.clear();
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startTd(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
_text.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void endTd()
|
||||||
|
{
|
||||||
|
AttributedString::Alignment align = AttributedString::ALIGN_LEFT;
|
||||||
|
int style = AttributedString::STYLE_PLAIN;
|
||||||
|
|
||||||
|
std::string fontFamily = _styles.getString("font-family");
|
||||||
|
float fontSize = _styles.getFloat("font-size");
|
||||||
|
std::string textAlign = _styles.getString("text-align", "left");
|
||||||
|
std::string fontStyle = _styles.getString("font-style", "normal");
|
||||||
|
std::string fontWeight = _styles.getString("font-weight", "normal");
|
||||||
|
std::string textTransform = _styles.getString("text-transform", "none");
|
||||||
|
|
||||||
|
_text = transform(_text, textTransform);
|
||||||
|
_text = transcode(_text);
|
||||||
|
|
||||||
|
if (textAlign == "right")
|
||||||
|
align = AttributedString::ALIGN_RIGHT;
|
||||||
|
else if (textAlign == "left")
|
||||||
|
align = AttributedString::ALIGN_LEFT;
|
||||||
|
|
||||||
|
if (fontStyle == "italic" || fontStyle == "oblique")
|
||||||
|
style |= AttributedString::STYLE_ITALIC;
|
||||||
|
|
||||||
|
if (fontWeight == "bold")
|
||||||
|
style |= AttributedString::STYLE_BOLD;
|
||||||
|
|
||||||
|
AttributedString content(_text, align, style);
|
||||||
|
content.setAttribute(AttributedString::ATTR_SIZE, fontSize);
|
||||||
|
|
||||||
|
Cell::FontMapPtr pFontMap = new Cell::FontMap;
|
||||||
|
std::string normalizedFontFamily(normalizeFontName(fontFamily));
|
||||||
|
(*pFontMap)[AttributedString::STYLE_PLAIN] = normalizedFontFamily;
|
||||||
|
(*pFontMap)[AttributedString::STYLE_BOLD] = boldFontName(normalizedFontFamily);
|
||||||
|
(*pFontMap)[AttributedString::STYLE_ITALIC] = italicFontName(normalizedFontFamily);
|
||||||
|
(*pFontMap)[AttributedString::STYLE_BOLD | AttributedString::STYLE_ITALIC] = boldItalicFontName(normalizedFontFamily);
|
||||||
|
|
||||||
|
_row.push_back(Cell(content, pFontMap, _encoding, false));
|
||||||
|
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startHr(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (!_pPage) throw Poco::IllegalStateException("missing <page> element");
|
||||||
|
|
||||||
|
StylePtr pStyle = pushStyle(attributes);
|
||||||
|
|
||||||
|
float width = static_cast<float>(_styles.current()->getDouble("width", box().width()));
|
||||||
|
float height = static_cast<float>(_styles.current()->getDouble("height", 0.2));
|
||||||
|
|
||||||
|
float x = static_cast<float>(_styles.current()->getDouble("left", _styles.current()->getDouble("right", width) - width));
|
||||||
|
float y = static_cast<float>(_styles.current()->getDouble("bottom", _styles.current()->getDouble("top", _y) - height));
|
||||||
|
|
||||||
|
translateInBox(x, y);
|
||||||
|
|
||||||
|
_pPage->moveTo(x, y);
|
||||||
|
_pPage->lineTo(x + width, y);
|
||||||
|
_pPage->stroke();
|
||||||
|
|
||||||
|
moveY(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void endHr()
|
||||||
|
{
|
||||||
|
popStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// DocumentHandler
|
||||||
|
void startDocument()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void endDocument()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void startElement(const Poco::XML::XMLString& uri, const Poco::XML::XMLString& localName, const Poco::XML::XMLString& qname, const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
if (localName == "document")
|
||||||
|
startDoc(attributes);
|
||||||
|
else if (localName == "page")
|
||||||
|
startPage(attributes);
|
||||||
|
else if (localName == "span")
|
||||||
|
startSpan(attributes);
|
||||||
|
else if (localName == "img")
|
||||||
|
startImg(attributes);
|
||||||
|
else if (localName == "table")
|
||||||
|
startTable(attributes);
|
||||||
|
else if (localName == "tr")
|
||||||
|
startTr(attributes);
|
||||||
|
else if (localName == "td")
|
||||||
|
startTd(attributes);
|
||||||
|
else if (localName == "hr")
|
||||||
|
startHr(attributes);
|
||||||
|
}
|
||||||
|
|
||||||
|
void endElement(const Poco::XML::XMLString& uri, const Poco::XML::XMLString& localName, const Poco::XML::XMLString& qname)
|
||||||
|
{
|
||||||
|
if (localName == "document")
|
||||||
|
endDoc();
|
||||||
|
else if (localName == "page")
|
||||||
|
endPage();
|
||||||
|
else if (localName == "span")
|
||||||
|
endSpan();
|
||||||
|
else if (localName == "img")
|
||||||
|
endImg();
|
||||||
|
else if (localName == "table")
|
||||||
|
endTable();
|
||||||
|
else if (localName == "tr")
|
||||||
|
endTr();
|
||||||
|
else if (localName == "td")
|
||||||
|
endTd();
|
||||||
|
else if (localName == "hr")
|
||||||
|
endHr();
|
||||||
|
}
|
||||||
|
|
||||||
|
void characters(const Poco::XML::XMLChar ch[], int start, int length)
|
||||||
|
{
|
||||||
|
_text.append(ch + start, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
StylePtr pushStyle(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
StylePtr pStyle = parseStyle(attributes);
|
||||||
|
if (_boxes.size() > 0)
|
||||||
|
{
|
||||||
|
pStyle->setDouble("box.width", box().width());
|
||||||
|
pStyle->setDouble("box.height", box().height());
|
||||||
|
}
|
||||||
|
_styles.push(pStyle);
|
||||||
|
return pStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void popStyle()
|
||||||
|
{
|
||||||
|
_styles.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
StylePtr parseStyle(const Poco::XML::Attributes& attributes)
|
||||||
|
{
|
||||||
|
return parseStyle(attributes.getValue("style"));
|
||||||
|
}
|
||||||
|
|
||||||
|
StylePtr parseStyle(const std::string& style) const
|
||||||
|
{
|
||||||
|
std::string props = Poco::translate(style, ";", "\n");
|
||||||
|
std::istringstream istr(props);
|
||||||
|
return new Poco::Util::PropertyFileConfiguration(istr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Page::Size parsePageSize(const std::string& size)
|
||||||
|
{
|
||||||
|
using Poco::icompare;
|
||||||
|
if (icompare(size, "letter") == 0)
|
||||||
|
return Page::PAGE_SIZE_LETTER;
|
||||||
|
else if (icompare(size, "legal") == 0)
|
||||||
|
return Page::PAGE_SIZE_LEGAL;
|
||||||
|
else if (icompare(size, "a3") == 0)
|
||||||
|
return Page::PAGE_SIZE_A3;
|
||||||
|
else if (icompare(size, "a4") == 0)
|
||||||
|
return Page::PAGE_SIZE_A4;
|
||||||
|
else if (icompare(size, "a5") == 0)
|
||||||
|
return Page::PAGE_SIZE_A5;
|
||||||
|
else if (icompare(size, "b4") == 0)
|
||||||
|
return Page::PAGE_SIZE_B4;
|
||||||
|
else if (icompare(size, "b5") == 0)
|
||||||
|
return Page::PAGE_SIZE_B5;
|
||||||
|
else if (icompare(size, "executive") == 0)
|
||||||
|
return Page::PAGE_SIZE_EXECUTIVE;
|
||||||
|
else if (icompare(size, "us4x6") == 0)
|
||||||
|
return Page::PAGE_SIZE_US4x6;
|
||||||
|
else if (icompare(size, "us4x8") == 0)
|
||||||
|
return Page::PAGE_SIZE_US4x8;
|
||||||
|
else if (icompare(size, "us5x7") == 0)
|
||||||
|
return Page::PAGE_SIZE_US5x7;
|
||||||
|
else if (icompare(size, "comm10") == 0)
|
||||||
|
return Page::PAGE_SIZE_COMM10;
|
||||||
|
else throw Poco::InvalidArgumentException("size", size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Page::Orientation parseOrientation(const std::string& orientation)
|
||||||
|
{
|
||||||
|
if (icompare(orientation, "portrait") == 0)
|
||||||
|
return Page::ORIENTATION_PORTRAIT;
|
||||||
|
else if (icompare(orientation, "landscape") == 0)
|
||||||
|
return Page::ORIENTATION_LANDSCAPE;
|
||||||
|
else throw Poco::InvalidArgumentException("orientation", orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string normalizeFontName(const std::string& fontFamily)
|
||||||
|
{
|
||||||
|
poco_assert(fontFamily.size());
|
||||||
|
|
||||||
|
std::string fontName = toLower(fontFamily);
|
||||||
|
fontName[0] = Poco::Ascii::toUpper(fontName[0]);
|
||||||
|
return fontName;
|
||||||
|
}
|
||||||
|
|
||||||
|
Font loadFont(const std::string& fontFamily, const std::string& fontStyle, const std::string& fontWeight)
|
||||||
|
{
|
||||||
|
poco_assert(_pDocument);
|
||||||
|
|
||||||
|
std::string normalizedFontFamily = normalizeFontName(fontFamily);
|
||||||
|
std::string fontName;
|
||||||
|
if (fontStyle == "italic" || fontStyle == "oblique")
|
||||||
|
{
|
||||||
|
if (fontWeight == "bold")
|
||||||
|
fontName = boldItalicFontName(normalizedFontFamily);
|
||||||
|
else
|
||||||
|
fontName = italicFontName(normalizedFontFamily);
|
||||||
|
} else if (fontWeight == "bold")
|
||||||
|
{
|
||||||
|
fontName = boldFontName(normalizedFontFamily);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
fontName = normalizedFontFamily;
|
||||||
|
}
|
||||||
|
return _pDocument->font(fontName, _encoding);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string boldFontName(const std::string& fontFamily)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return _pDocument->font(fontFamily + "-Bold", _encoding).name();
|
||||||
|
} catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
return fontFamily;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string italicFontName(const std::string& fontFamily)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return _pDocument->font(fontFamily + "-Oblique", _encoding).name();
|
||||||
|
} catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return _pDocument->font(fontFamily + "-Italic", _encoding).name();
|
||||||
|
} catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
return fontFamily;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string boldItalicFontName(const std::string& fontFamily)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return _pDocument->font(fontFamily + "-BoldOblique", _encoding).name();
|
||||||
|
} catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Font font = _pDocument->font(fontFamily + "-BoldItalic", _encoding);
|
||||||
|
} catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
return fontFamily;
|
||||||
|
}
|
||||||
|
|
||||||
|
Image loadImage(const std::string& path)
|
||||||
|
{
|
||||||
|
Poco::Path p(_base);
|
||||||
|
p.resolve(path);
|
||||||
|
if (Poco::icompare(p.getExtension(), "jpg") == 0 || icompare(p.getExtension(), "jpeg") == 0)
|
||||||
|
return _pDocument->loadJPEGImage(p.toString());
|
||||||
|
else if (Poco::icompare(p.getExtension(), "png") == 0)
|
||||||
|
return _pDocument->loadPNGImage(p.toString());
|
||||||
|
else
|
||||||
|
throw Poco::InvalidArgumentException("cannot determine image type", path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void translateInBox(float& x, float& y)
|
||||||
|
{
|
||||||
|
if (x < 0)
|
||||||
|
x = box().right() + x;
|
||||||
|
else
|
||||||
|
x += box().left();
|
||||||
|
|
||||||
|
if (y < 0)
|
||||||
|
y = box().top() + y;
|
||||||
|
else
|
||||||
|
y += box().bottom();
|
||||||
|
}
|
||||||
|
|
||||||
|
void moveY(float y)
|
||||||
|
{
|
||||||
|
float padding = _styles.getFloat("padding", 0);
|
||||||
|
float newY = y - padding;
|
||||||
|
newY -= box().bottom();
|
||||||
|
|
||||||
|
_y = std::min(_y, newY);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Box& box() const
|
||||||
|
{
|
||||||
|
poco_assert(_boxes.size() > 0);
|
||||||
|
return _boxes.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string transcode(const std::string& text)
|
||||||
|
{
|
||||||
|
std::string result;
|
||||||
|
Poco::UTF8Encoding inEncoding;
|
||||||
|
Poco::TextEncoding& outEncoding = Poco::TextEncoding::byName(mapEncoding(_encoding));
|
||||||
|
Poco::TextConverter converter(inEncoding, outEncoding);
|
||||||
|
converter.convert(text, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string mapEncoding(const std::string& encoding)
|
||||||
|
{
|
||||||
|
if (encoding == "WinAnsiEncoding")
|
||||||
|
return "Latin-1";
|
||||||
|
else if (encoding == "ISO8859-2")
|
||||||
|
return "Latin-2";
|
||||||
|
else if (encoding == "ISO8859-15")
|
||||||
|
return "Latin-9";
|
||||||
|
else if (encoding == "CP1250")
|
||||||
|
return "CP1250";
|
||||||
|
else if (encoding == "CP1251")
|
||||||
|
return "CP1251";
|
||||||
|
else if (encoding == "CP1252")
|
||||||
|
return "CP1252";
|
||||||
|
else
|
||||||
|
throw Poco::InvalidArgumentException("PDF Document encoding not supported", encoding);
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string transform(const std::string& text, const std::string& trans)
|
||||||
|
{
|
||||||
|
if (trans == "uppercase")
|
||||||
|
return UTF8::toUpper(text);
|
||||||
|
else if (trans == "lowercase")
|
||||||
|
return UTF8::toLower(text);
|
||||||
|
else
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
Poco::Path _base;
|
||||||
|
std::string _encoding;
|
||||||
|
Document* _pDocument;
|
||||||
|
Page* _pPage;
|
||||||
|
Table::Ptr _pTable;
|
||||||
|
TableRow _row;
|
||||||
|
StackedConfiguration _styles;
|
||||||
|
std::vector<Box> _boxes;
|
||||||
|
std::string _size;
|
||||||
|
std::string _orientation;
|
||||||
|
std::string _text;
|
||||||
|
float _y;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
XMLTemplate::XMLTemplate(std::istream& xmlStream, const std::string& base) :
|
||||||
|
_base(base),
|
||||||
|
_pDocument(0)
|
||||||
|
{
|
||||||
|
load(xmlStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
XMLTemplate::XMLTemplate(const std::string& path) :
|
||||||
|
_base(path),
|
||||||
|
_pDocument(0)
|
||||||
|
{
|
||||||
|
Poco::FileInputStream xmlStream(path);
|
||||||
|
load(xmlStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
XMLTemplate::~XMLTemplate()
|
||||||
|
{
|
||||||
|
delete _pDocument;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void XMLTemplate::load(std::istream& xmlStream)
|
||||||
|
{
|
||||||
|
Poco::XML::InputSource xmlSource(xmlStream);
|
||||||
|
Poco::XML::SAXParser parser;
|
||||||
|
TemplateHandler handler(_base);
|
||||||
|
parser.setContentHandler(&handler);
|
||||||
|
parser.setFeature(Poco::XML::XMLReader::FEATURE_NAMESPACES, true);
|
||||||
|
parser.setFeature(Poco::XML::XMLReader::FEATURE_NAMESPACE_PREFIXES, true);
|
||||||
|
parser.parse(&xmlSource);
|
||||||
|
|
||||||
|
_pDocument = handler.document();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void XMLTemplate::create(const std::string& path)
|
||||||
|
{
|
||||||
|
_pDocument->save(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } // namespace Poco::PDF
|
2
openssl
2
openssl
Submodule openssl updated: 26b1673caa...b42dcf2175
Reference in New Issue
Block a user