pdfcpu

Logo

A PDF processor written in Go.

View the Project on GitHub pdfcpu/pdfcpu


Changelog

List Viewer Preferences

This command outputs a list of any configured viewer preferences.

Have a look at some examples.

Usage

pdfcpu viewerpref list [-a(ll)] [-j(son)] inFile


Common Flags

name description values
v(erbose) turn on logging  
vv verbose logging  
q(uiet) quiet mode  
-o(ffline) disable http traffic  
c(onf) config dir $path, disable
opw owner password  
upw user password  
u(nit) display unit po(ints),in(ches),cm,mm


Arguments

name description required
all output all (including default values) no
json output JSON no
inFile PDF input file yes


Examples

Display all non default viewer preferences:

$ pdfcpu viewerpref list test.pdf
Viewer preferences:
   DisplayDocTitle = true


Display all viewer preferences:

$ pdfcpu viewerpref list -all test.pdf
Viewer preferences:
   HideToolbar = false
   HideMenubar = false
   HideWindowUI = false
   FitWindow = false
   CenterWindow = false
   DisplayDocTitle = true
   NonFullScreenPageMode = UseNone
   Direction = L2R
   PrintScaling = AppDefault
   NumCopies = 1


Display all non default viewer preferences using JSON:

$ pdfcpu viewerpref list -json test.pdf
{
	"header": {
		"version": "pdfcpu v0.6.0 dev",
		"creation": "2023-12-05 14:23:56 CET"
	},
	"viewerPreferences": {
		"displayDocTitle": true
	}
}


Display all viewer preferences using JSON:

$ pdfcpu viewerpref list -all -json test.pdf
{
	"header": {
		"version": "pdfcpu v0.6.0 dev",
		"creation": "2023-12-05 14:24:04 CET"
	},
	"viewerPreferences": {
		"hideToolbar": false,
		"hideMenubar": false,
		"hideWindowUI": false,
		"fitWindow": false,
		"centerWindow": false,
		"displayDocTitle": true,
		"nonFullScreenPageMode": "UseNone",
		"direction": "L2R",
		"printScaling": "AppDefault",
		"numCopies": 1
	}
}