Jump to content
TNG Community

Viewing pdf with multiple pages on an iPad


bflack

Recommended Posts

I can view all pages of a PDF using a desktop browser, initially seeing the first page of the document, but then can view all pages by clicking the menu symbol above the page, and a panel slides out with thumbnails of multiple pages. This function doesn't appear on iPads (and other mobile devices), or at least it's not obvious how to view more than the front page. Any thoughts? If I'm correct are there any fixes?

Many thanks, Bob  

Link to comment
Rob Severijns

Additional to @Philip Roy posting I would advise you to install the "Pdfjs_viewer_mod_hide_buttons_v13.0.0.1" if you want to prohibit the saving, downloading, printing and bookmarking of your PDF files for all visitors.

This is of course dependend on the level of privacy you want for your website in general and PDF files in particular.

The mod is available on the same page as the https://tng.lythgoes.net/wiki/index.php/PDFjs_Viewer_Mod

Link to comment

The PDFjs Viewer Mod seems like the right strategy. I've installed the mod, but am stymied at the very last step which requires Go to General Settings and update the Media section after install.

When I go to Setup >> Configuration >> General Settings>>Media, there's no "update" option available. However there is evidence that PDFjs Viewer is installed, an option to enable for "mobile only" or "always". Otherwise, the Mod Manager shows no installation errors. Can you advise on how to "update the media section"? Seems necessary since there's an error message when I try to access PDFs now from an iPad: "Missing PDF file" which is totally accessible from a desktop browser.

Again, thanks!

Link to comment
Philip Roy

First, posting this question three times in separate forum posts is simply not needed. Patience is.

Anyone who replied already received your comment, but we may have other things we need to focus on.

Second, it's referring to this new setting...decide if you want this functionality to be for mobile only or for all instances (Always)

Screenshot 2023-05-02 at 5.43.04 PM.png

Link to comment

I stand corrected, and apologize for the impatience. I'm very appreciative of the community help!

Selecting "Always" disables all pdf's getting the attached error message for the "standard site" and "mobile site" mode --and also causes the error on desktop browsers. I've switched back to "Mobile only" which at least gets the desktop browsers working correctly again. 

Cheers

Screenshot 2023-05-02 at 2.35.09 AM.png

Link to comment
Philip Roy

Is this with every PDF on your site? That sounds like you have an issue with a PDF missing as opposed to the mod.

Perhaps provide a link to the page where the PDF shows.

From memory the mod requires you upload a folder to the root of your TNG site. Did you do that as part of the set up process.

Link to comment

Happens on all PDFs viewed from iPad in the "Mobile site" mode, and when switched to "standard site" mode I get only the front page of the PDF -as it was before installing the Mod. Pretty sure the folder is installed at the root; see screen shot. Also the Mod Manager report doesn't show any errors; again see screenshot.

Sorry this is bothersome, dealing with these technical issues is a modest stretch for me.

Screenshot 2023-05-02 at 3.17.25 AM.png

Screenshot 2023-05-02 at 3.15.08 AM.png

Link to comment
Philip Roy

The PDF is reasonably big in file size at 5.4Mb...I realised it when I first came to the page and had to wait for the PDF to load.

Try a page with a smaller PDF and see if that is working. Also, I have no idea of this affects the mod, but I would never put a file on a website with spaces in the filename as some browsers don't cope with them. Maybe try renaming a couple of PDFs to not have spaces (for example "In-Memoriam-Charlotte-Sonya-Weber.pdf" and see if that makes any change.

Sorry, a bit of a guess from me at this stage.

Link to comment

OK thanks for suggestions. I've fiddled with inserting hyphens, tried smaller PDFs ... without any affect. Best to uninstall the mod at this point. 

Link to comment
3 hours ago, bflack said:

OK thanks for suggestions. I've fiddled with inserting hyphens, tried smaller PDFs ... without any affect. Best to uninstall the mod at this point. 

@bflack

Whilst the link you provided was, as @Rob Severijns mentions, quite a long time loading, it loaded and worked for me just fine.. I doubt this is a Mod issue!!

I'm using Vivaldi Browser on a Windows 10 Laptop.

Link to comment
Philip Roy

That was me that mentioned that…and it was a guess at the issue, as stated. Also it’s loading now because as he mentioned, he’s disabled the mod as that was causing errors.

Link to comment

Thanks all for suggestions.

I completely uninstalled, then carefully re-installed per instructions, including extracting the zip file on the server (as opposed to expanding locally, then placing on server). Still no success, get error message when opening pdf's on iPad. Now uninstalled again, back to the condition before fiddling with the mod.

Link to comment

I’ve been ruminating about what’s preventing PDFjs from finding the target files, after carefully re-installing again (unsuccessfully - so it’s un-installed now).

Is it possible the way my site is set up on the server throws off the expected file path? Specifically, there’s a redirect at the URL, flackology.com to the folder ‘genealogy’, home for the TNG index.php and other php files & folders: https://flackology.com/genealogy/index.php.

I’ve assumed this ‘genealogy’ folder is in effect the ‘root folder’ where the PDFjs folder must reside, but wonder if the redirected location throws things off.

If so, I’m clueless on the fix. This is somewhat above my experience to troubleshoot, so I appreciate any thoughts/suggestions. 

Link to comment
Philip Roy

That’s shouldn’t have any impact I would have thought. I’ve been wondering also…and the thing that popped into my head was the permissions on the folder and files that you have to upload to the root of your site. Maybe check the permissions of the files? Again, this is just a guess…

https://tng.lythgoes.net/wiki/index.php/Permissions_Explained

Do you have the ability to set up a local copy of your site on your PC or Mac using WAMP or MAMP? You can find info how to do that on the wiki. I just wonder how you might get on trying that?

Link to comment

The pdfjs folder is still on the server, with the permissions on the attached screenshot. Seems identical to other folders within TNG. In any event, permission settings are beyond me. Not sure I feel comfortable fiddling with them, especially when everything else works. 

 

Almost forgot the file permissions in the folder. Again seems the same as other files; see attached.

Thanks for thinking about this!

image.png

Screenshot 2023-05-05 at 7.18.53 PM.png

Link to comment
  • 2 weeks later...

The web does not like spaces within file names. Try to rename your pdf removing the spaces, this way : In_Memoriam_Charlotte_Sonya_Weber.pdf

Link to comment

The rootpath from general setting is below. Works for all other aspects of the website, so I'm reluctant to reconfigure on the server. As another approach, and I'm way in over my head here, can I modify the mod code to point to the right folder? Totally guessing that a relative reference is needed rather than the absolute path calling for the documents folder.

Apologies if I'm way off on this.

image.png

Link to comment
Philip Roy

A number of us have commented on the use of spaces in the filename of PDFs is not a good idea, but I can’t see any response saying you’ve tried a PDF without spaces. Can you confirm you’ve tested that this isn’t the issue?

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...