spajak / cef-pdf Goto Github PK
View Code? Open in Web Editor NEWcef-pdf HTML to PDF utility
License: MIT License
cef-pdf HTML to PDF utility
License: MIT License
Can I help with this? What would be involved?
I am running cef-pdf from within a Linux container and would like executions to pipe file input into the container. This would enable a common pattern of running containers and destroying them afterwards so I could run omething like:
$ cat some-file.html | docker run --rm -it --env DISPLAY=172.17.0.2:99 \
my-cef-image cef-pdf \
--backgrounds
I see this as an alternative to --file
and --server
options. That way I can run cef-pdf without having to save the input to disk or retrieve it from a URL.
Hi,
I wrap your application into my app and I get this error:
[1113/143014.498002:ERROR:icu_util.cc(137)] icudtl.dat not found in bundle
[1113/143014.498081:ERROR:icu_util.cc(173)] Invalid file descriptor to ICU data received.
Trace/BPT trap: 5
Every file should be present, I copy whole folder into my app. Not sure, I can do it as I do - so that in my .app
I use your .app
. Do you have idea, where could a problem?
Did you see it before?
Could you add a render to png feature ?
So I can render HTML/SVG to png ?
I've been doing this in a C# application, but all that CefGlue doesn't work right on all platforms...
One way to get the image is in the OnPaint sub of CefRenderHandler.
internal class DemoCefRenderHandler: CefRenderHandler
protected override void OnPaint
Example
https://github.com/ststeiger/CefGlue_NetStandard/blob/master/PdfGlue/Demo/DemoCefRenderHandler.cs
curl -X POST http://localhost:9288/timeout.pdf --header "Content-Location: http://www.google.com" > output.pdf
works on 0.3.1 but hangs forever on 0.3.2 and master
Same error with both ninja and unix makefiles.
Trying to compile on Ubuntu 16.04.01
Build outputs attached
build.ninja.log.txt
build.Makefiles.log.txt
Load end may never occur its important to clean up when connection is closed.
When uploading an HTML string that contains an image with a large base64 encoded source, cef-pdf --server
crashes with exit code 139.
This branch https://github.com/efx/cef-pdf/blob/topic-memory-bug/Dockerfile has the debian stable release Dockerfile that shows the Linux environment I am testing with. I am compiling with http://opensource.spotify.com/cefbuilds/cef_binary_3.3112.1652.g8c8deea_linux64.tar.bz2.
I wrote a script in node.js to upload. I tried getting curl to work but was unable to:
cef-pdf --server --port=8000
cd bug-test && npm install && npm start
I tested this against a build I compiled from master on MacOS and saw the CPU max out and 100% for the cef-pdf process until I closed it.
Thanks for building this tool. It looks much more promising and reliable than other html to pdf binaries/libraries I have worked with.
I have been using it successfully so far but accidentally typed:
$ src/Release/cef-pdf.app/Contents/MacOS/cef-pdf --file ./test.html ./test.pdf
Instead of erroring, the binary unexpectedly overwrite test.html. It would be nice if the cli threw an error that I mistyped the --file
switch, or was a tad more flexible.
I would be deeply grateful for a release including the remote-trigger feature. The current release does not include this feature which is absolutely necessary for our use case.
is it possible to increase the runtime verbosity when the PDF generation occurs? I think this would be helpful for troubleshooting complex pages being generated. If it is relatively simple, I can help contribute documentation for it.
I am trying to compile cef-pdf
within a container based on debian jessie. It fails at the configure step:
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCEF_ROOT=/wrk/cef-pdf/cef/cef_binary_3.3359.1774.gd49d25f_linux64_minimal
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX
-- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX - Success
-- Performing Test COMPILER_SUPPORTS_NO_NARROWING
-- Performing Test COMPILER_SUPPORTS_NO_NARROWING - Success
CMake Error at src/CMakeLists.txt:14 (list):
list does not recognize sub-command FILTER
Does CMakeLists.txt need updated for this version of cmake? Or is this another issue?
One approach would be to add a command line option which takes a javascript expression which returns a boolean. This expression would be repeatedly evaluated until it returns true at which point the PDF would be generated.
I'd love to help make this a thing and will be investigating how to do it now. Any help or guidance through the source would be very appreciated.
I can recall having managed it in the past.
Following the current building instructions, I downloaded the correct CEF distribution files for my system, cd
'd into a temp directory, then ran this command I constructed based on the instructions:
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
-DCEF_ROOT=~/dl/cef_binary_3.3282.1726.gc8368c8_linux64/Release \
~/src/cef-pdf
It failed for me with this:
CMake Error at CMakeLists.txt:192 (find_package):
By not providing "FindCEF.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CEF", but
CMake did not find one.
Could not find a package configuration file provided by "CEF" with any of
the following names:
CEFConfig.cmake
cef-config.cmake
Add the installation prefix of "CEF" to CMAKE_PREFIX_PATH or set "CEF_DIR"
to a directory containing one of the above files. If "CEF" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/anko/src/cef-pdf/build/CMakeFiles/CMakeOutput.log".
This is the first time I touch cmake
, so I'm probably just dumb. What did I do wrong?
Relatedly, could the build be adapted to only 1 step? It would help automate testing and packaging.
It seems reasonable that pages which intend to trigger pdf generation are able to register their intent to do so within a given timeframe potentially even syncronously on PageLoad. I will investigage this.
workaround is to install libxss1
libgconf-2-4
and libstdc++6
but i'm hoping there is some way to link these statically.
I am compiling v0.3.4 (4247a7b) from within a debian stretch based Linux container.
here is the trimmed output where the errors occur:
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCEF_ROOT=/wrk/cef-pdf/cef/cef_binary_3.3359.1774.gd49d25f_linux64_minimal
[166/180] Linking CXX static library libcef_dll_wrapper/libcef_dll_wrapper.a
[167/180] Building CXX object src/CMakeFiles/cef-pdf.dir/Job/Job.cpp.o
[168/180] Building CXX object src/CMakeFiles/cef-pdf.dir/SchemeHandlerFactory.cpp.o
[169/180] Building CXX object src/CMakeFiles/cef-pdf.dir/Server/SessionManager.cpp.o
FAILED: src/CMakeFiles/cef-pdf.dir/Server/SessionManager.cpp.o
/usr/bin/c++ -DASIO_NO_TYPEID -DASIO_STANDALONE -DNDEBUG -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -Iasio -Icef/cef_binary_3.3359.1774.gd49d25f_linux64_minimal -O3 -DNDEBUG -fno-strict-aliasing -fPIC -fstack-protector -funwind-tables -fvisibility=hidden --param=ssp-buffer-size=4 -pipe -pthread -Wall -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-error=comment -m64 -march=x86-64 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wsign-compare -Wno-literal-suffix -Wno-narrowing -O2 -fdata-sections -ffunction-sections -fno-ident -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fexceptions -MD -MT src/CMakeFiles/cef-pdf.dir/Server/SessionManager.cpp.o -MF src/CMakeFiles/cef-pdf.dir/Server/SessionManager.cpp.o.d -o src/CMakeFiles/cef-pdf.dir/Server/SessionManager.cpp.o -c /wrk/cef-pdf/src/Server/SessionManager.cpp
In file included from /wrk/cef-pdf/src/Server/Session.h:4:0,
from /wrk/cef-pdf/src/Server/SessionManager.h:4,
from /wrk/cef-pdf/src/Server/SessionManager.cpp:1:
/wrk/cef-pdf/src/Server/../Client.h:128:18: error: 'virtual bool cefpdf::Client::OnBeforeBrowse(CefRefPtr<CefBrowser>, CefRefPtr<CefFrame>, CefRefPtr<CefRequest>, bool)' marked 'override', but does not override
virtual bool OnBeforeBrowse(
^~~~~~~~~~~~~~
[170/180] Building CXX object src/CMakeFiles/cef-pdf.dir/Job/Manager.cpp.o
[171/180] Building CXX object src/CMakeFiles/cef-pdf.dir/main.cpp.o
FAILED: src/CMakeFiles/cef-pdf.dir/main.cpp.o
any ideas?
I had to struggle, as I do not know cmake and not to much about C++ to compile.
You can do it different, but his is just a hint how I got it working.
Treet structure I use:
C:\source\repros\cef-pdf
├───asio
├───cef
│ ├───cmake
│ ├───Debug
│ ├───include
│ ├───libcef_dll
│ ├───Release
│ ├───Resources
│ ├───tests
│ └───VS2019
├───cmake
├───resource
├───src
└───VS2019
Build I do will be x64 & release
Steps:
cd /d c:\source\repros
git clone --recursive https://github.com/spajak/cef-pdf
cd /d c:\source\repros\cef-pdf
mkdir VS2019
cd cef
mkdir VS2019
cd VS2019
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release ../
cd ....\VS2019
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DCEF_ROOT=C:/Source/cef-pdf/cef ../
3>------ Build started: Project: cef-pdf, Configuration: Release x64 ------ 3>Build started 29.01.2020 22:29:02. 3>Target ResolveProjectReferences: 3>Target PrepareForBuild: 3> Creating directory "C:\source\repos\cef-pdf\VS2019\src\Release\". 3> Creating directory "cef-pdf.dir\Release\cef-pdf.tlog\". 3>Target InitializeBuildStatus: 3> Creating "cef-pdf.dir\Release\cef-pdf.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. 3>Target CustomBuild: 3> Building Custom Rule C:/source/repos/cef-pdf/src/CMakeLists.txt 3>Target ClCompile: 3> Client.cpp 3> Common.cpp 3> Job.cpp 3> Manager.cpp 3> StdInputStreamReader.cpp 3> PrintHandler.cpp 3> RenderHandler.cpp 3> RenderProcessHandler.cpp 3> C:\source\repos\cef-pdf\src\Job\StdInputStreamReader.h(33,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\StdInputStreamReader.cpp) 3> SchemeHandlerFactory.cpp 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\PrintHandler.h(43,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\PrintHandler.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Job.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\RenderHandler.cpp) 3> Server.cpp 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Job.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> Session.cpp 3> C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\RenderProcessHandler.h(42,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\RenderProcessHandler.cpp) 3> C:\source\repos\cef-pdf\src\RenderProcessHandler.h(29,18): error C3668: 'cefpdf::RenderProcessHandler::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\RenderProcessHandler.cpp) 3> SessionManager.cpp 3> C:\source\repos\cef-pdf\src\Job\Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\Local.h(32,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\Remote.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\StdInput.h(20,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\Loader.h(39,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\Printer.h(53,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\StdInputStreamReader.h(33,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Job\ContentProvider.h(48,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3> C:\source\repos\cef-pdf\src\Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\SchemeHandlerFactory.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\PrintHandler.h(43,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> main.cpp 3> C:\source\repos\cef-pdf\src\RenderProcessHandler.h(42,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\RenderProcessHandler.h(29,18): error C3668: 'cefpdf::RenderProcessHandler::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\Client.cpp(103,86): error C2660: 'CefBrowserHost::CreateBrowser': function does not take 5 arguments 3> C:\source\repos\cef-pdf\cef\include/cef_browser.h(287,15): message : see declaration of 'CefBrowserHost::CreateBrowser' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3> C:\source\repos\cef-pdf\src\SchemeHandlerFactory.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3> C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Job/Local.h(32,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Server\../Job/Remote.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3> C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Server\Server.h(53,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3> C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Server/Server.h(53,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Job/Remote.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Job/StdInput.h(20,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3> C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>Done building target "ClCompile" in project "cef-pdf.vcxproj" -- FAILED. 3> 3>Done building project "cef-pdf.vcxproj" -- FAILED. 3> 3>Build FAILED. 3> 3>C:\source\repos\cef-pdf\src\Job\StdInputStreamReader.h(33,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\StdInputStreamReader.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\PrintHandler.h(43,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\PrintHandler.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Job.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\RenderHandler.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Job.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\RenderProcessHandler.h(42,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\RenderProcessHandler.cpp) 3>C:\source\repos\cef-pdf\src\RenderProcessHandler.h(29,18): error C3668: 'cefpdf::RenderProcessHandler::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\RenderProcessHandler.cpp) 3>C:\source\repos\cef-pdf\src\Job\Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\Local.h(32,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\Remote.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\StdInput.h(20,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\Loader.h(39,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\Printer.h(53,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\StdInputStreamReader.h(33,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Job\ContentProvider.h(48,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Job\Manager.cpp) 3>C:\source\repos\cef-pdf\src\Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\SchemeHandlerFactory.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\PrintHandler.h(43,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\RenderProcessHandler.h(42,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\RenderProcessHandler.h(29,18): error C3668: 'cefpdf::RenderProcessHandler::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Client.cpp) 3>C:\source\repos\cef-pdf\src\Client.cpp(103,86): error C2660: 'CefBrowserHost::CreateBrowser': function does not take 5 arguments 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Job\Visitor.h(26,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3>C:\source\repos\cef-pdf\src\SchemeHandlerFactory.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\SchemeHandlerFactory.cpp) 3>C:\source\repos\cef-pdf\src\Job\Job.h(87,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Job/Manager.h(54,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\RenderHandler.h(31,5): error C2144: syntax error: 'int' should be preceded by ';' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Client.h(173,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Client.h(107,18): error C3668: 'cefpdf::Client::OnProcessMessageReceived': method with override specifier 'override' did not override any base class methods (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Job/Local.h(32,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Server\../Job/Remote.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Session.cpp) 3>C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Server\Server.h(53,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\Server.cpp) 3>C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Server/Server.h(53,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Job/Remote.h(29,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Job/StdInput.h(20,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\main.cpp) 3>C:\source\repos\cef-pdf\src\Server\Session.h(99,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3>C:\source\repos\cef-pdf\src\Server\SessionManager.h(36,1): error C2143: syntax error: missing ';' before '}' (compiling source file C:\source\repos\cef-pdf\src\Server\SessionManager.cpp) 3> 0 Warning(s) 3> 70 Error(s) 3> 3>Time Elapsed 00:00:04.21
IMPLEMENT_REFCOUNTING(XYZ)
IMPLEMENT_REFCOUNTING(XYZ);
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) OVERRIDE
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, //Newly added CefProcessId source_process, CefRefPtr<CefProcessMessage> message) OVERRIDE
Hope this helps, for pplz that donot use C++ usually
the build appears to succeed but then the machines running the program fail with the error
./cef-pdf/linux/linux/Release/cef-pdf: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./cef-pdf/linux/linux/Release/cef-pdf)
the builds provided on the release page do not do this.
OPTIONS requests return 405 method not allowed.
[0818/155022.479392:ERROR:node_controller.cc(1258)] Error on receiving Mach ports 9A3CE724EE0F1F50.8B6639709E110ED7. Dropping message.
[0818/155022.480067:ERROR:node_controller.cc(1258)] Error on receiving Mach ports 9A3CE724EE0F1F50.8B6639709E110ED7. Dropping message.
[0818/155022.482067:ERROR:node_controller.cc(1258)] Error on receiving Mach ports 9A3CE724EE0F1F50.8B6639709E110ED7. Dropping message.
[0818/155022.495248:ERROR:node_controller.cc(1258)] Error on receiving Mach ports D7544DA778CC245.E7F190FF8AEC0953. Dropping message.
[0818/155023.489002:ERROR:node_controller.cc(1258)] Error on receiving Mach ports F6E274AE0B134AD3.784323643B9E5F17. Dropping message.
[0818/155023.489103:ERROR:node_controller.cc(1258)] Error on receiving Mach ports F6E274AE0B134AD3.784323643B9E5F17. Dropping message.
[0818/155023.489145:ERROR:node_controller.cc(1258)] Error on receiving Mach ports F6E274AE0B134AD3.784323643B9E5F17. Dropping message.
[0818/155023.489191:ERROR:node_controller.cc(1258)] Error on receiving Mach ports 9CEE88C2FC00399B.6E7EE136C68DE6D5. Dropping message.
[0818/155023.489227:ERROR:node_controller.cc(1258)] Error on receiving Mach ports 9CEE88C2FC00399B.6E7EE136C68DE6D5. Dropping message.
Not sure if this actually has any negative effects?
its obviously not being passed through, i'll look into this.
As a user, I would like the ability to customize the PDF metadata. (Creator and Producer specifically) Right now it lists the cef user agent and underlying skia/PDF library as the content creator.
I run build command in macos
cmake -G "Xcode" -DPROJECT_ARCH="x86_64" -DCEF_ROOT=/Users/123/src/cef-pdf/cef_binary_90.6.7+g19ba721+chromium-90.0.4430.212_macosx64_minimal ../
or
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCEF_ROOT=/Users/123/src/cef-pdf/cef_binary_90.6.7+g19ba721+chromium-90.0.4430.212_macosx64_minimal ../
It failed with this:
CMake Warning (dev) at src/CMakeLists.txt:70 (add_executable):
Policy CMP0037 is not set: Target names should not be reserved and should
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
The target name "cef-pdf Helper" is reserved or not valid for certain CMake
features, such as generator expressions, and may result in undefined
behavior.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at src/CMakeLists.txt:80 (FIX_MACOSX_HELPER_FRAMEWORK_RPATH):
Unknown CMake command "FIX_MACOSX_HELPER_FRAMEWORK_RPATH".
-- Configuring incomplete, errors occurred!
See also "/Users/weijiangchen/src/cef-pdf/build/CMakeFiles/CMakeOutput.log".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.