Open PDF at a chapter

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 709
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Open PDF at a chapter

Post by mrcoollion » Fri Feb 19, 2021 2:39 pm

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: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Open PDF at a chapter

Post by richmond62 » Fri Feb 19, 2021 3:04 pm

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: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Open PDF at a chapter

Post by FourthWorld » Fri Feb 19, 2021 4:18 pm

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: 709
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Open PDF at a chapter

Post by mrcoollion » Sat Feb 20, 2021 7:29 pm

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: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Open PDF at a chapter

Post by richmond62 » Sat Feb 20, 2021 7:34 pm

Pages and Chapters are NOT the same thing.

mrcoollion
Posts: 709
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Open PDF at a chapter

Post by mrcoollion » Mon Mar 29, 2021 9:23 am

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

Return to “Talking LiveCode”