|
@@ -18,8 +18,8 @@
|
|
// You should have received a copy of the GNU General Public License
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.
|
|
// along with wkhtmltopdf. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
-#include "commandlineparser.hh"
|
|
|
|
#include "outputter.hh"
|
|
#include "outputter.hh"
|
|
|
|
+#include "pdfcommandlineparser.hh"
|
|
#include <QWebFrame>
|
|
#include <QWebFrame>
|
|
|
|
|
|
#define STRINGIZE_(x) #x
|
|
#define STRINGIZE_(x) #x
|
|
@@ -29,7 +29,7 @@
|
|
Output name and a short description
|
|
Output name and a short description
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputManName(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputManName(Outputter * o) const {
|
|
o->beginSection("Name");
|
|
o->beginSection("Name");
|
|
o->paragraph("wkhtmltopdf - html to pdf converter");
|
|
o->paragraph("wkhtmltopdf - html to pdf converter");
|
|
o->endSection();
|
|
o->endSection();
|
|
@@ -39,7 +39,7 @@ void CommandLineParser::outputManName(Outputter * o) const {
|
|
Output a short synopsis on how to call the command line program
|
|
Output a short synopsis on how to call the command line program
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputSynopsis(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputSynopsis(Outputter * o) const {
|
|
o->beginSection("Synopsis");
|
|
o->beginSection("Synopsis");
|
|
o->verbatim("wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>\n");
|
|
o->verbatim("wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>\n");
|
|
o->endSection();
|
|
o->endSection();
|
|
@@ -91,7 +91,7 @@ void CommandLineParser::outputSynopsis(Outputter * o) const {
|
|
Explain what the program does
|
|
Explain what the program does
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputDescripton(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputDescripton(Outputter * o) const {
|
|
o->beginSection("Description");
|
|
o->beginSection("Description");
|
|
o->beginParagraph();
|
|
o->beginParagraph();
|
|
o->text("Converts one or more HTML pages into a PDF document, ");
|
|
o->text("Converts one or more HTML pages into a PDF document, ");
|
|
@@ -110,7 +110,7 @@ void CommandLineParser::outputDescripton(Outputter * o) const {
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
\param sure Is the functionality restricted in this wkhtmltopdf
|
|
\param sure Is the functionality restricted in this wkhtmltopdf
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputNotPatched(Outputter * o, bool sure) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputNotPatched(Outputter * o, bool sure) const {
|
|
o->beginSection("Reduced Functionality");
|
|
o->beginSection("Reduced Functionality");
|
|
if (sure)
|
|
if (sure)
|
|
o->paragraph("This version of wkhtmltopdf has been compiled against a version of "
|
|
o->paragraph("This version of wkhtmltopdf has been compiled against a version of "
|
|
@@ -140,7 +140,7 @@ void CommandLineParser::outputNotPatched(Outputter * o, bool sure) const {
|
|
Explain the page breaking is somewhat broken
|
|
Explain the page breaking is somewhat broken
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputPageBreakDoc(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputPageBreakDoc(Outputter * o) const {
|
|
o->beginSection("Page Breaking");
|
|
o->beginSection("Page Breaking");
|
|
o->paragraph(
|
|
o->paragraph(
|
|
"The current page breaking algorithm of WebKit leaves much to be desired. "
|
|
"The current page breaking algorithm of WebKit leaves much to be desired. "
|
|
@@ -169,7 +169,7 @@ void CommandLineParser::outputPageBreakDoc(Outputter * o) const {
|
|
Output documentation about headers and footers
|
|
Output documentation about headers and footers
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputHeaderFooterDoc(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputHeaderFooterDoc(Outputter * o) const {
|
|
o->beginSection("Footers And Headers");
|
|
o->beginSection("Footers And Headers");
|
|
o->paragraph("Headers and footers can be added to the document by the --header-* and --footer* "
|
|
o->paragraph("Headers and footers can be added to the document by the --header-* and --footer* "
|
|
"arguments respectfully. In header and footer text string supplied to e.g. --header-left, "
|
|
"arguments respectfully. In header and footer text string supplied to e.g. --header-left, "
|
|
@@ -225,7 +225,7 @@ void CommandLineParser::outputHeaderFooterDoc(Outputter * o) const {
|
|
Output documentation about outlines
|
|
Output documentation about outlines
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputOutlineDoc(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputOutlineDoc(Outputter * o) const {
|
|
o->beginSection("Outlines");
|
|
o->beginSection("Outlines");
|
|
o->beginParagraph();
|
|
o->beginParagraph();
|
|
o->text(
|
|
o->text(
|
|
@@ -247,7 +247,7 @@ void CommandLineParser::outputOutlineDoc(Outputter * o) const {
|
|
Output contact information
|
|
Output contact information
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputContact(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputContact(Outputter * o) const {
|
|
o->beginSection("Contact");
|
|
o->beginSection("Contact");
|
|
o->beginParagraph();
|
|
o->beginParagraph();
|
|
o->text("If you experience bugs or want to request new features please visit ");
|
|
o->text("If you experience bugs or want to request new features please visit ");
|
|
@@ -262,7 +262,7 @@ void CommandLineParser::outputContact(Outputter * o) const {
|
|
Output beginning of the readme
|
|
Output beginning of the readme
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputDocStart(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputDocStart(Outputter * o) const {
|
|
o->beginSection(QString("wkhtmltopdf ")+QString::number(MAJOR_VERSION)+"."+QString::number(MINOR_VERSION)+"."+QString::number(PATCH_VERSION)+(QString(STRINGIZE(BUILD)).isEmpty()?"":" ")+STRINGIZE(BUILD) + " Manual");
|
|
o->beginSection(QString("wkhtmltopdf ")+QString::number(MAJOR_VERSION)+"."+QString::number(MINOR_VERSION)+"."+QString::number(PATCH_VERSION)+(QString(STRINGIZE(BUILD)).isEmpty()?"":" ")+STRINGIZE(BUILD) + " Manual");
|
|
o->paragraph("This file documents wkhtmltopdf, a program capable of converting html "
|
|
o->paragraph("This file documents wkhtmltopdf, a program capable of converting html "
|
|
"documents into PDF documents.");
|
|
"documents into PDF documents.");
|
|
@@ -273,7 +273,7 @@ void CommandLineParser::outputDocStart(Outputter * o) const {
|
|
Output information on how to use read-args-from-stdin
|
|
Output information on how to use read-args-from-stdin
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputArgsFromStdin(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputArgsFromStdin(Outputter * o) const {
|
|
o->beginSection("Reading arguments from stdin");
|
|
o->beginSection("Reading arguments from stdin");
|
|
o->paragraph("If you need to convert a lot of pages in a batch, and you feel that wkhtmltopdf "
|
|
o->paragraph("If you need to convert a lot of pages in a batch, and you feel that wkhtmltopdf "
|
|
"is a bit to slow to start up, then you should try --read-args-from-stdin,");
|
|
"is a bit to slow to start up, then you should try --read-args-from-stdin,");
|
|
@@ -291,7 +291,7 @@ void CommandLineParser::outputArgsFromStdin(Outputter * o) const {
|
|
Output information on how to compile
|
|
Output information on how to compile
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputCompilation(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputCompilation(Outputter * o) const {
|
|
o->beginSection("Compilation");
|
|
o->beginSection("Compilation");
|
|
o->paragraph("It can happen that the static binary does not work for your system "
|
|
o->paragraph("It can happen that the static binary does not work for your system "
|
|
"for one reason or the other, in that case you might need to compile "
|
|
"for one reason or the other, in that case you might need to compile "
|
|
@@ -340,7 +340,7 @@ void CommandLineParser::outputCompilation(Outputter * o) const {
|
|
Output information on how to install
|
|
Output information on how to install
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputInstallation(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputInstallation(Outputter * o) const {
|
|
o->beginSection("Installation");
|
|
o->beginSection("Installation");
|
|
o->paragraph(
|
|
o->paragraph(
|
|
"There are several ways to install wkhtmltopdf. You can download a "
|
|
"There are several ways to install wkhtmltopdf. You can download a "
|
|
@@ -358,7 +358,7 @@ void CommandLineParser::outputInstallation(Outputter * o) const {
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
|
|
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputPageSizes(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputPageSizes(Outputter * o) const {
|
|
o->beginSection("Page sizes");
|
|
o->beginSection("Page sizes");
|
|
o->beginParagraph();
|
|
o->beginParagraph();
|
|
o->text("The default page size of the rendered document is A4, but using this --page-size option"
|
|
o->text("The default page size of the rendered document is A4, but using this --page-size option"
|
|
@@ -376,7 +376,7 @@ void CommandLineParser::outputPageSizes(Outputter * o) const {
|
|
Output examples on how to use wkhtmltopdf
|
|
Output examples on how to use wkhtmltopdf
|
|
\param o The outputter to output to
|
|
\param o The outputter to output to
|
|
*/
|
|
*/
|
|
-void CommandLineParser::outputExampels(Outputter * o) const {
|
|
|
|
|
|
+void PdfCommandLineParser::outputExampels(Outputter * o) const {
|
|
o->beginSection("Examples");
|
|
o->beginSection("Examples");
|
|
o->paragraph("This section presents a number of examples of how to invoke wkhtmltopdf.");
|
|
o->paragraph("This section presents a number of examples of how to invoke wkhtmltopdf.");
|
|
o->paragraph("To convert a remote HTML file to PDF:");
|
|
o->paragraph("To convert a remote HTML file to PDF:");
|