Jump to content
TNG Community

Viewing pdf with multiple pages on an iPad


bflack

Recommended Posts

Apologies, I tested this concern and found the same error; tested by looking at other multi-paged pdfs without spaces, and failed to report back.

However, just to make sure, I renamed the example previously used replacing spaces with dashes (as suggested), and get the error message, similar to before: PDF.js v2.4.456 (build: 228a591c) Message: Missing PDF "https://flackology.com/documents/In-Memoriam-Charlotte-Sonya-Weber.pdf".

I understand that spaces in file names may affect some browsers, but haven't directly had that experience myself (Firefox, Chrome & Safari). This doesn't seem to be an issue in this case.

I'm leaving the mod "installed" now, set at enable PDGjs viewer for mobile only --which may be helpful in thinking about this problem.

Again, thanks for working on this.

Link to comment
Philip Roy

https://flackology.com/documents/In-Memoriam-Charlotte-Sonya-Weber.pdf

Brings up an error …so what is the actual path or link to where that pdf is?

Link to comment
1 hour ago, Philip Roy said:

https://flackology.com/documents/In-Memoriam-Charlotte-Sonya-Weber.pdf

Brings up an error …so what is the actual path or link to where that pdf is?

public_html>genealogy>documents>In-Memoriam-Charlotte-Sonya-Weber.pdf. As I understand it, the URL flackology.com points to public_html where there's a re-direct index.html file to the genealogy folder; see screenshot from the ftp client.

Screenshot 2023-05-18 at 8.04.59 PM.png

Link to comment
52 minutes ago, bhemph said:

The rootpath looks correct.  What does the Genealogy URL in the next section have?

I'm unsure about the question. Does the attached screenshot answer your question?

Screenshot 2023-05-18 at 8.01.11 PM.png

Link to comment
Philip Roy

As I understand it, the URL flackology.com points to public_html where there's a re-direct index.html file to the genealogy folder”

I think that’s where your problem is. If your entire TNG website is working with the index file that is redirecting then it’s going to cause issues. I don’t believe that’s how a web host points a domain to a subfolder. It seems to be the cheats way of doing that… I’m pretty sure there should be a more technical process the points that new domain directly to that specific folder on the server… Not via a redirect file. 

Link to comment

Bob, your issue is not ipad specific : I cannot open my pdf on my Android phone. I am only prompted to download it and if I do, I can read it like any other independent media, outside TNG. I mean : the same media that can be opened within TNG when browsing on my computer. On computer and Android phone, the browser is Firefox. But I cannot find anyway to install extensions on the phone version.

Link to comment
edglimited
21 minutes ago, Katryne said:

But I cannot find anyway to install extensions on the phone version.

Katryne, trying to install extensions via Firefox on Android is almost impossible. You need to download the extension you want as an .apk file or as software. This can be done via (a) Google Shop or Andriod or (b) as an .apk file from various Android Sites, like Aptoide, Huawei Gallery or F-Droid. (see screenshot) Then simply unpack and install it via the downloads section within your Android Phone. Double clicking on it will work like a .exe file and install it. I dont have an Android or Google Phone, mine runs on Ubuntu Computer Software.

Search for .apk extensions for Android, the Sites I mentioned above, or the other alternative is to sideload it onto your Phone. Search "sideloading extensions to android mobiles".

Drew..

Screenshot_20230519-152857_Trebuchet.png

Link to comment

Thanks Drew. I do have 1 or 2 apps to read PDF on my phone. But not from within Firefox : when browsing my TNG, I cannot read the pdf for the browser is not fitted for this. That's why I must download the pdf and then read it with the reader, but not within Firefox.

Link to comment
Philip Roy

Sorry, it’s been a bit of a hectic end to the week, but I wanted to come back and justify my previous comment.

The problem with a redirect at the public_folder, is that it assumes that every browser that hits any party of your website gets redirected. In other words (and I hope I’m explaining this correctly) you think that no matter what file your website points to, it’s going to be impacted by that redirect in the public HTML file…and that’s not correct at all. The file at that level, only redirects browsers that point to that folder.

So here’s the best example to explain this. You indicated to us that one of your PDF files lies at the following URL…

https://flackology.com/documents/In-Memoriam-Charlotte-Sonya-Weber.pdf

…but that’s producing an error. And that’s because the PDF really lies at the following URL…

https://flackology.com/genealogy/documents/In-Memoriam-Charlotte-Sonya-Weber.pdf

You might be thinking “but wait…I’ve got a redirect at the top level folder of the domain to send everything to the genealogy folder” but that’s not how redirects work. I’m possibly explaining this badly, but when a browser looks for that PDF file, it completely ignores the fact that somewhere on the rest of your website, there is a redirect that it doesn’t see or react to. It’s like me walking through a side door at your house and you being surprised and saying “did you not see the front door?”…nope!

I’ve never set up a website domain, pointing to a subfolder, but everything that I’ve read suggests that you shouldn’t be using a redirect..particularly when you are running a website that isn’t just static files, but a dynamic, database driven website.

At the bare minimum, you should be using an htaccess file instead of a redirect (from what I read) but even then I’m not sure that’s the correct approach to use. I think you need to contact your web hosting company and have a discussion with them about how you’re pointing your domain to a subfolder as that’s clearly causing issues.

Apologies if any of this doesn’t make sense, but it’s Friday night here and I’m having a wine…but this issue has been bugging me all day ;-)

 

Edited by Philip Roy
The links were wrong
Link to comment

Thanks for the explanation. Seems logical, and I will spend time with tech at the host server to understand options. If I recall correctly, there are some complications with the setup which lead to the redirect approach, that is I host a small number of mini-sites off the same server, and a firewall is engaged because of a prior hacking incident. In other words, it's somewhat beyond me, but I think we've identified the nub of the issue.

That said, everything works correctly now, except for this mod, which is coded assuming a direct address of flackology.com/documents/. Isn't there another approach of modifying the file reference in the mod to be relative to the code location, rather than using the underlaying URL?  

Link to comment
edglimited
20 hours ago, Katryne said:

But not from within Firefox : when browsing my TNG, I cannot read the pdf for the browser is not fitted for this.

Hi Katryne, that was my point, you can read pdf's from within Firefox now, on Andriod Phones. The alternative is the extension or the software download..
https://www.ghacks.net/2022/12/10/firefox-for-android-is-getting-a-native-pdf-viewer/

Drew.. (see screenshot)

Screenshot_20230520-125358_Firefox_Nightly.png

Link to comment

Drew, I do not think the feature (Reading pdf directly within Firefox) is available yet for ordinary users. For nightly, maybe.

EDIT  : yahoo ! I was able to update my Firefox for Android (via wifi it was easier 😋) and now my pdf opens correctly within the TNG.

Edited by Katryne
Link to comment
14 hours ago, bflack said:

Isn't there another approach of modifying the file reference in the mod to be relative to the code location, rather than using the underlaying URL?  

Yes, the mod does.  That is why I asked what the other field General Settings > Site Design and Definition > Genealogy URL is populated with.  It may be something there getting misinterpreted and throwing the path off.

image.png

Link to comment
11 hours ago, bhemph said:

Yes, the mod does.  That is why I asked what the other field General Settings > Site Design and Definition > Genealogy URL is populated with.  It may be something there getting misinterpreted and throwing the path off.

image.png

OK, sorry I misinterpreted your question. Those settings are attached below ...

Screenshot 2023-05-20 at 11.08.30 AM.png

Link to comment

PROBLEM SOLVED - I just changed the Genealogy URL setting to match the setup on the server, that is: https://flackology.com/genealogy --and now the mod works. I've left the setup on the server alone, with the redirect --appreciating this may not be the best practice.

I feel badly this took so much back and forth to resolve, but I am thankful for everyone's thoughts and suggestions.

Link to comment
edglimited
20 hours ago, Katryne said:

EDIT  : yahoo ! I was able to update my Firefox for Android (via wifi it was easier 😋) and now my pdf opens correctly within the TNG.

Hi Katyrne, yes they updated Firefox several days ago, the roll out to all countries was a barrier. Does your Firefox update come with the Pdf Toolbox as well.??? When you open up a Pdf Doc, you should have an option to download the Pdf, there are also 9 dots, on the top menu, which contain the footer menu, click on those dots and the footer menu will open. Click on the small spanner in the bottom right hand corner, as in the screen caps. You will then have extra Pdf options..

Screenshot_20230521-093241_Firefox_Nightly.png

Screenshot_20230521-093254_All_PDF.png

Screenshot_20230521-093314_All_PDF.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...