How do I open to a specific page or destination in a pdf file using Buddy API Xtra?
hello,
i'm working cd rom catalog utilizes buddy api xtra open pdf files when link clicked. client able open specific page within pdf file.
i can open pdf file using buddy api baopenfile() function i'm having trouble opening specific page when add #page=4:
baopenfile("@\pdfs\powder cores\magnetics_powder_core_catalog_2011.pdf#page=4","normal")
i've tried working code below seems me should work... didn't realize "open..." part of function in director.
on mouseup me pagenum = 4 theapp = bashortfilename(bafindapp("pdf")) thedoc = bashortfilename("@\pdfs\powder cores\magnetics_powder_core_catalog_2011.pdf") theargs = "/s /a page=" & string(pagenum) & "&pagemode=bookmarks" -- (translates "/a page=4" in example) open theapp && theargs && thedoc end
thoughts?
thank in advance!
the problem _player.open cannot append command switches.
one possible solution use valentin's shell xtra:
http://valentin.dasdeck.com/xtras/shell_xtra/win/
(you need copy xtra director's configuration\xtras directory , bundle projector.)
using xtra, code become this:
on mouseup me
pagenum = 4
theapp = bafindapp("pdf")
thedoc = _movie.path & "pdfs\powder cores\magnetics_powder_core_catalog_2011.pdf"
theargs = "/a ""e&"page="&string(pagenum)&"=openactions""e
shell_exec(theapp, "open", theargs && thedoc)
end
buddy's bashell may work, haven't tried it.
More discussions in Director Lingo
adobe
Comments
Post a Comment