diff options
author | Julian Smith <julian.smith@artifex.com> | 2020-11-23 14:09:31 +0000 |
---|---|---|
committer | Julian Smith <julian.smith@artifex.com> | 2021-02-15 13:31:42 +0000 |
commit | b151406bbf22fb9001895f856168166f2ecf7fe2 (patch) | |
tree | e03b7f2e52cbf1ebe68718312e064988450499ad /windows | |
parent | 833dc8c9ffde58f001308b303c8d7956107633a1 (diff) | |
download | ghostpdl-b151406bbf22fb9001895f856168166f2ecf7fe2.tar.gz |
Added docxwrite device; uses extract library to write docx output.
Summary:
This adds a new docxwrite device which generates docx files.
Unlike the txtwrite device, we don't output xml for later use by
extract-exe or store information about spans in arrays. Instead we call
extract functions such as extract_add_char() directly.
Code changes:
Have moved txtwrite and docxwrite common code into new devices/vector/doc_common.{c,h}.
Shared types and functions are currently:
txt_glyph_width_t
txt_glyph_widths_t
txt_glyph_widths()
txt_get_unicode()
txt_char_widths_to_uts()
txt_calculate_text_size()
Building:
By default we do not build with Extract and there will be no docxwrite
device in the final executables.
To build with Extract, specify the location of the extract checkout to
build and link with.
Unix:
./autogen.sh --with-extract-dir=<extract-dir>
Windows:
Set environmental variable EXTRACT_DIR=<extract-dir> when building,
e.g.:
EXTRACT_DIR=<extract-dir> devenv.com windows/GhostPDL.sln /Build Debug /Project ghostscript
On both Unix and Windows we exit with an error message if the specified
location does not exist.
Diffstat (limited to 'windows')
-rw-r--r-- | windows/ghostscript.vcproj | 12 | ||||
-rw-r--r-- | windows/ghostscript.vcxproj | 21 | ||||
-rw-r--r-- | windows/ghostscript.vcxproj.filters | 8 | ||||
-rw-r--r-- | windows/ghostscript_rt.vcxproj | 3 |
4 files changed, 42 insertions, 2 deletions
diff --git a/windows/ghostscript.vcproj b/windows/ghostscript.vcproj index 3c0854025..7ac40b6ef 100644 --- a/windows/ghostscript.vcproj +++ b/windows/ghostscript.vcproj @@ -6185,6 +6185,14 @@ > </File> <File + RelativePath="..\devices\vector\gdevdocxw.c" + > + </File> + <File + RelativePath="..\devices\vector\doc_common.c" + > + </File> + <File RelativePath="..\devices\vector\gdevxps.c" > </File> @@ -6329,6 +6337,10 @@ Name="vector (.h)" > <File + RelativePath="..\devices\vector\doc_common.h" + > + </File> + <File RelativePath="..\devices\vector\gdevagl.h" > </File> diff --git a/windows/ghostscript.vcxproj b/windows/ghostscript.vcxproj index c318117c6..42718bb6a 100644 --- a/windows/ghostscript.vcxproj +++ b/windows/ghostscript.vcxproj @@ -1605,6 +1605,8 @@ <ClCompile Include="..\devices\vector\gdevpx.c" /> <ClCompile Include="..\devices\vector\gdevsvg.c" /> <ClCompile Include="..\devices\vector\gdevtxtw.c" /> + <ClCompile Include="..\devices\vector\gdevdocxw.c" /> + <ClCompile Include="..\devices\vector\doc_common.c" /> <ClCompile Include="..\devices\vector\gdevxps.c" /> <ClCompile Include="..\devices\vector\whitelst.c" /> <ClCompile Include="..\expat\lib\xmlparse.c" /> @@ -1617,6 +1619,22 @@ <ClCompile Include="..\expat\tests\minicheck.c" /> <ClCompile Include="..\expat\tests\runtests.c" /> <ClCompile Include="..\expat\tests\runtestspp.cpp" /> + <ClCompile Include="..\extract\src\alloc.c" /> + <ClCompile Include="..\extract\src\astring.c" /> + <ClCompile Include="..\extract\src\buffer-test.c" /> + <ClCompile Include="..\extract\src\buffer.c" /> + <ClCompile Include="..\extract\src\docx.c" /> + <ClCompile Include="..\extract\src\docx_template.c" /> + <ClCompile Include="..\extract\src\extract-exe.c" /> + <ClCompile Include="..\extract\src\extract.c" /> + <ClCompile Include="..\extract\src\join.c" /> + <ClCompile Include="..\extract\src\mem.c" /> + <ClCompile Include="..\extract\src\memento.c" /> + <ClCompile Include="..\extract\src\misc-test.c" /> + <ClCompile Include="..\extract\src\outf.c" /> + <ClCompile Include="..\extract\src\xml.c" /> + <ClCompile Include="..\extract\src\zip-test.c" /> + <ClCompile Include="..\extract\src\zip.c" /> <ClCompile Include="..\ijs\ijs.c" /> <ClCompile Include="..\ijs\ijs_client.c" /> <ClCompile Include="..\ijs\ijs_client_example.c" /> @@ -2945,6 +2963,7 @@ <ClInclude Include="..\devices\rinkj\rinkj-dither.h" /> <ClInclude Include="..\devices\rinkj\rinkj-epson870.h" /> <ClInclude Include="..\devices\rinkj\rinkj-screen-eb.h" /> + <ClInclude Include="..\devices\vector\doc_common.h" /> <ClInclude Include="..\devices\vector\gdevagl.h" /> <ClInclude Include="..\devices\vector\gdevpdfb.h" /> <ClInclude Include="..\devices\vector\gdevpdfc.h" /> @@ -3474,4 +3493,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/windows/ghostscript.vcxproj.filters b/windows/ghostscript.vcxproj.filters index 75a27e802..0e88e8531 100644 --- a/windows/ghostscript.vcxproj.filters +++ b/windows/ghostscript.vcxproj.filters @@ -3377,6 +3377,12 @@ <ClCompile Include="..\devices\vector\gdevtxtw.c"> <Filter>devices\vector</Filter> </ClCompile> + <ClCompile Include="..\devices\vector\gdevdocxw.c"> + <Filter>devices\vector</Filter> + </ClCompile> + <ClCompile Include="..\devices\vector\doc_common.c"> + <Filter>devices\vector</Filter> + </ClCompile> <ClCompile Include="..\devices\vector\gdevxps.c"> <Filter>devices\vector</Filter> </ClCompile> @@ -9004,4 +9010,4 @@ <Filter>psi %28.rc%29</Filter> </ResourceCompile> </ItemGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/windows/ghostscript_rt.vcxproj b/windows/ghostscript_rt.vcxproj index 8370363ef..6d1a02cf3 100644 --- a/windows/ghostscript_rt.vcxproj +++ b/windows/ghostscript_rt.vcxproj @@ -1503,6 +1503,8 @@ <ClCompile Include="..\devices\vector\gdevpxut.c" /> <ClCompile Include="..\devices\vector\gdevsvg.c" /> <ClCompile Include="..\devices\vector\gdevtxtw.c" /> + <ClCompile Include="..\devices\vector\gdevdocxw.c" /> + <ClCompile Include="..\devices\vector\doc_common.c" /> <ClCompile Include="..\devices\vector\whitelst.c" /> <ClCompile Include="..\devices\rinkj\evenbetter-rll.c" /> <ClCompile Include="..\devices\rinkj\rinkj-byte-stream.c" /> @@ -2175,6 +2177,7 @@ <ClInclude Include="..\devices\gdevxcmp.h" /> <ClInclude Include="..\devices\gxfcopy.h" /> <ClInclude Include="..\devices\minftrsz.h" /> + <ClInclude Include="..\devices\vector\doc_common.h" /> <ClInclude Include="..\devices\vector\gdevagl.h" /> <ClInclude Include="..\devices\vector\gdevpdfb.h" /> <ClInclude Include="..\devices\vector\gdevpdfc.h" /> |