Forum moved here!

Home / Use sumatra as external viewer

Jose_Marques

Hello, I use as default pdf reader the program pdf xchange editor. I use sumatra pdf as external viewer launched from pdf xchange editor. Although when I lauch sumatra pdf from that program, sumatra pdf opens the pdf file always on the first page, but I wanted that sumatra pdf open pdf file on the same page that it is open on pdf xchange editor. I put here a print from settings of external viewers

What should I put on parameteres box to make sumatra open pdf on the same page that it is open on pdf xchange editor.
Thanks in advance and best regards.

GitHubRulesOK

This question is best answered by PDF xchange since the options you are using would work the other way, that is from SumatraPDF you should be able to open a file FROM SumatraPDF in PDF exchange editor using the same "%1" filename parameter and /A page=%p for the current page.
e.g. in SumatraPDF settings.txt it would be

ExternalViewers [
	[
		CommandLine = "C:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe" /A page=%p "%1"
		Name = PDF XChange Editor
		Filter = *.pdf
	]
]

SumatraPDF expects the page number as -page # filename so I am guessing you need the PDF xchange Numero de Pagina %p symbol from its shown drop down

  -page %p "%1"

note there is a space before -page

Remember when the file is open in both you may need to press R to reload and view after an edit and as with all editors to work on multiple files set UseTabs = true and ReuseInstance = true

There is also a filesize limit whist viewing and editing the same file
In SumatraPDF 3.1.2 the file is locked at 10 Mb
In Pre-Release it is now 32 Mb
If the file is larger you need to close it in SumatraPDF whilst saving edits.

Jose_Marques

It worked. Thank you very much.

GitHubRulesOK

@Jose_Marques

SumatraPDF also supports the zoom and scroll commands so try them out, you can remove either or both if they do not suit the way you work

-page %p -zoom %z -scroll %vx,%vy "%1"