Command Syntax

Required and optional values

Every command statement you enter for FLIP2PDF must include the following values:

  1. the executable name
  2. the name of the input file, or a web site address if you want to convert a web page to a PDF file
  3. the name you want to assign to the output PDF file

You can also provide the name of the JSON profile file but that is optional.

flip2pdf --input inputname --output outputfilename --profile profilename

The JSON profile file includes a list of settings that define exactly what kind of PDF output document you want to produce. See "Setting up your profile."

Two optional values are also available:

  • --password. If an input document has a password, you can include this value to provide a password so that FLIP2PDF can read and open that file. This only works with Office input files.
  • --encrypt. Use this value to assign a password to a PDF output document. This only works with Office input files.

For each command line option, you can use either the short or long notation:

  • -i    [--input]
  • -o   [--output]
  • -j    [--profile]
  • -p   [--password]
  • -e   [--encrypt]

Type flip2pdf –-help at the command line for a list of software options.

What a basic command looks like

A command might look like this:

flip2pdf --input TestDocument.docx --output TestDocument.pdf --profile standard.json

If you are converting an input file that is password protected, you can supply the password to open that file using a command syntax like this:

flip2pdf --input TestDocument.docx --output TestDocument.pdf --profile standard.json --password Fischer@27

Then, if you want to assign the same password (“Fischer@27”) to the PDF output file, use this command syntax to supply both passwords:

flip2pdf --input TestDocument.docx --output TestDocument.pdf --profile standard.json --password Fischer@27 --encrypt Fischer@27

The FLIP2PDF software assumes that the file extension you provide for an input file is valid.

Providing path names

You don’t need to include the absolute path for any of these files if the input file and profile are stored in the current working directory, and if you save the output file to this directory as well.

If you want FLIP2PDF to take an input file from one directory and save the output to another, however, you need to provide the path as well as the file name:

flip2pdf --input C:\Datalogics\Source\AnnualReport2016.docx -–output C:\Datalogics\OutputFiles\AnnualReport2016-B.pdf -–profile standard.json

If any of the file or path names include spaces, use quotes around the name:

flip2pdf --input "C:\Datalogics\Source\Annual Report 2016.docx" –-output C:\Datalogics\OutputFiles\AnnualReport2016-B.pdf –-profile standard.json

Converting web page content to PDF

You can also convert an HTML file or a web page to PDF output. Enter the name or the name and the path for that HTML file in the command line statement, as you would any other kind of file, like this:

flip2pdf --input C:\Datalogics\Source\AnnualReport2016.html --output C:\Datalogics\OutputFiles\AnnualReport2016-B.pdf --profile standard.json

If you want to convert a web page to a PDF file, enter the web site address in the command line statement instead.

flip2pdf --input https://www.datalogics.com/products/pdftools/flip2pdf/ --output C:\Datalogics\OutputFiles\FLIP2PDF_Page.pdf -–profile standard.json

The product will convert all of the content shown on that page to a PDF output file, including HTML, stylesheets, and graphics.

Using the JSON profile

The JSON profile file is not required. If you are content to use the default settings provided with the FLIP2PDF software, you can enter a command statement like this:

flip2pdf --input TestDocument.docx --output TestDocument.pdf

If you do specify a JSON profile file name in your command statement, you can use either the relative or the absolute path for that file. If you don’t provide an absolute path for the JSON profile, FLIP2PDF will look for the file in the working directory. If the file is not in the working directory, FLIP2PDF will look for the JSON profile in the FLIP2PDFProfiles directory where the product was installed.

If FLIP2PDF can’t find the JSON profile, you will see an error message.

These are the FLIP2PDF default settings:

Output PDF file
Compression method jpeg
Downsampling All images are downsampled by default to 300 DPI
Tagged PDF Do not create a tagged PDF document when converting an Office file

In other words, if you don’t include a JSON profile in your command line statement FLIP2PDF will generate a standard PDF document. The file will not be tagged, and any graphics found in a PostScript or Microsoft source document will be downsampled to 300 DPI and compressed using the jpeg compression method. Note also that the fonts used by the PDF output file will be embedded in that PDF file.