Open PDF at a chapter

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 744
Joined: Thu Sep 11, 2014 1:49 pm

Open PDF at a chapter

Post by mrcoollion »

Hello all,

I am working on a manual for my application which is a PDF document I build with MS-Word and it has a chapter (and sub chapters) for each application feature.
I want to open this PDF at the chapter that relates to the application feature I place the Help button at.
Is it possible to open a PDF with chapters at a chapter or at a paragraph?

Regards,

Paul
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10431
Joined: Fri Feb 19, 2010 10:17 am

Re: Open PDF at a chapter

Post by richmond62 »

As a poisonous so-and-so I would first ask:

How do you differentiate (electronically) between a chapter and a paragraph?

https://www.unicode.org/charts/PDF/U0000.pdf

I would be inclined to mark chapter divisions with some sort of invisible control chaarcter that LiveCode could pick up on.
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Open PDF at a chapter

Post by FourthWorld »

It will probably depend on the reader app, but Adobe provides a way to do that with a hashtag appended to the URL:

https://helpx.adobe.com/acrobat/kb/link ... robat.html
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
mrcoollion
Posts: 744
Joined: Thu Sep 11, 2014 1:49 pm

Re: Open PDF at a chapter

Post by mrcoollion »

Thanks for pointing me to the right direction.

After some testing I found that :
1) placing

Code: Select all

#page=5
after the pdf URL makes the pdf go to page 5 :D
2) using

Code: Select all

#nameddest=<destination name>
does not work yet but might be part of Google Chrome Canary (a beta version is downloadable).

Thanks again and be safe.

Paul
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10431
Joined: Fri Feb 19, 2010 10:17 am

Re: Open PDF at a chapter

Post by richmond62 »

Pages and Chapters are NOT the same thing.
mrcoollion
Posts: 744
Joined: Thu Sep 11, 2014 1:49 pm

Re: Open PDF at a chapter

Post by mrcoollion »

True, but at least I can point to a page which at this moment is sufficient for me because the pdf is a manual and does not change that much.
Post Reply