Forum moved here!

Home / Customize external viewers PhantomPDF

1112

How can I open a pdf file in the Foxit PhantomPDF reader in SumatraPDF with go to a page number?
maybe good idea does to provide auto-detect feature for that PDFreader?

and
how does it work?

https://www.sumatrapdfreader.org/docs/Customize-external-viewers.html

$F = "C:\Program Files (x86)\Foxit Software\Foxit PhantomPDF\FoxitPhantomPDF.exe"
$File = "e:\Books\JavaScript\Lucas da Costa - Testing jаvascript Applications (MEAP), 2020.pdf"
&$F $File /A page=5


ExternalViewers [
	[
		CommandLine = "C:\Program Files (x86)\Foxit Software\Foxit PhantomPDF\FoxitPhantomPDF.exe"
		Name = "Foxit PhantomPDF"
		Filter = 
	]
]

ExternalViewers [
	[
		CommandLine = FoxitPhantomPDF.exe %1 %p
		Name = Foxit PhantomPDF
		Filter = 
	]
]
GitHubRulesOK

If Foxit is “on path” then the second shorter call should be enough but needs a few small changes. & makes it a shortcut to ALT+F+X (sadly F and P are already used) From the manual https://cdn01.foxitsoftware.com/pub/foxit/manual/phantom/en_us/FoxitPhantomPDF10.1.1_Manual.pdf#page=439 :slightly_smiling_face: there are other commands. but minimum would be:-

CommandLine = FoxitPhantomPDF.exe "%1" /A page=%p
Name = Fo&xit PhantomPDF
Filter = *.pdf

If not on path then need the longer first part

CommandLine = "C:\Program Files (x86)\Foxit Software\Foxit PhantomPDF\FoxitPhantomPDF.exe" "%1" /A page=%p
1112

It is work for me:

ExternalViewers [
	[
		CommandLine = "C:\Program Files (x86)\Foxit Software\Foxit PhantomPDF\FoxitPhantomPDF.exe" "%1"  "/A" "page="%p
		Name = Fo&xit PhantomPDF
		Filter = *.pdf
	]
]
GitHubRulesOK

The new manual above does not show all the CLI options so you need to google but you can include similar to SumatraPDF options just add at the end named destinations or zoom=50 or nolock=1 but some settings like exit after print may need setting inside Foxit
see https://kb.foxitsoftware.com/hc/en-us/articles/360042671711-Parameters-for-Opening-PDF-Files-with-a-command