1. DeltaJ59
  2. Commercial Templates
  3. Friday, 10 March 2023
  4.  Subscribe via email
I have encountered a problem displaying a multipage pdf especially in IOS devices. Only the first page is visible.

I have two ways to display it correctly. On a mobile device I would hjave available a url link to point to the pdf stored in /image and let the viewer click to view.

For other devices I can put a line of code starting <object> with details of the file location and size and media type etc which works fine. This feature is inbuilt into TinyMCE for Joomla 4. FYI JCE offers a different solution creating an iframe to show the pdf.

I would like to write some conditional code that will select which line of code runs when somebody visits this particular Article in Jooomla.

I understand it is not reliable to determine the device in use so would have to rely on a certain breakpoint on screen size.

Have you some guidance you could share please on how to insert some code to do this (I realise this is not strictly a template issue but hope in this case you may be kind enough to give me a start in doing this)

many thanks!
Accepted Answer Pending Moderation
0
Votes
Undo
I no longer need a reply to this. There is too much uncertainty as to which device will work with multi-page pdf embed in J4 so I’ve adopted an alternative solution. The menu item pointing to the pdf is now system link / url type. The pdf opens fine when the menu is clicked. It looses the website environment but this in fact enhances the readability in smaller devices.
  1. more than a month ago
  2. Commercial Templates
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!