By Gregor on Wednesday, 17 June 2020
Posted in General Issues
Likes 0
Views 735
Votes 0
Hello,

I know it's new that pdf files are shown on mobile devices but I liked the 'old download button way' more. We have a lot of very large pdf's and I don't want our users to automatcally download the pdf's on their mobiles. Is there a way to turn this back?

Best,
Mark
You're most welcome.

The problem is we already have over 300 articles with pdf files in it (Library). Did the new feature change the code database?


I am not really sure what do you mean here.

Do you mean that will the old rendering pdf block of the existing blog post will get affected after update to 5.4.x which has this new feature?

If yes, the old rendering pdf block of the existing blog posts which are created before 5.4 will not be affected unless you re-save it.
·
Tuesday, 07 July 2020 17:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

Do you mean that you want to hide this on mobile view as shown in the screenshot? https://take.ms/Drbro

If yes, it is impossible to do this currently at this point of time.
·
Thursday, 18 June 2020 12:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwin,

Thank you but that's not what I meant. On my mobile the pdf's are now loading automatically. That used to be a download button. So when we embed a pdf of 30MB the website is not responding till the whole file is downloaded.

Best,
Mark
·
Tuesday, 23 June 2020 20:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

It is the correct behavior where the pdf will be loaded automatically in order to show up.

Do you mean that you want to display a download button on the embedded pdf instead of showing the pdf content automatically?
·
Wednesday, 24 June 2020 11:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwin,

Do you mean that you want to display a download button on the embedded pdf instead of showing the pdf content automatically?

Yes that's it!
·
Monday, 06 July 2020 16:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

Currently, it is impossible to revert back to the old behavior at this point of time.

Perhaps you can use File block for it.
·
Monday, 06 July 2020 17:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwin,

That's very unfortunate, This has a huge impact on the pagespeed and not the least google ranking. Most importantly it really impacts the user experience and their mobile data usage.

Regards,
Mark
·
Monday, 06 July 2020 18:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I would suggest you to use File block if that's the case as we do not have quick solution to show back the old behavior.

For your information, the reason that we added this was because this is a feature requested by other customers.

They want the ability to render the previews on mobile view.

By the way, we will consider to add an option to allow user to decide whether want to load the PDF preview or not on the site in the next major release version.
·
Monday, 06 July 2020 19:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwin,

'They want the ability to render the previews on mobile view.'

Nothing wrong with that as long as it is a new extra option. We have many existing pages with big .pdf files and no fallback.

How do I implement File block?

Regards,
Mark
·
Monday, 06 July 2020 19:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you please tell me what file is displaying the pdf?
·
Monday, 06 July 2020 23:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Gregor,

The file block is just another block in the composer in which you can upload the PDF and insert it with a download link. The file that is responsible to be generated with the PDF output is located at /components/com_easyblog/themes/wireframe/blogs/blocks/pdf.php

I am not sure if this could work but you can try replacing the contents of that file with the following codes,


<div class="eb-pdf-viewer">
<object data="<?php echo $block->data->url;?>" type="application/pdf" width="100%" height="<?php echo $block->data->height;?>" class="pdf-viewer-browser">
<iframe src="<?php echo $block->data->url;?>" width="100%" height="<?php echo $block->data->height;?>" scrolling="no" frameborder="0" allowTransparency="true">
<?php echo JText::_('COM_EASYBLOG_BROWSER_DOES_NOT_SUPPORT_PDF_VIEWER'); ?><br />
<a href="<?php echo $block->data->url;?>"><?php echo JText::_('COM_EASYBLOG_DOWNLOAD_PDF_FILE');?></a>
</iframe>
</object>
<div class="pdf-viewer-button">
<a href="<?php echo $block->data->url;?>" target="_blank" class="btn btn-default"><i class="fa fa-download"></i>  <?php echo JText::_('COM_EASYBLOG_DOWNLOAD_PDF_FILE');?></a>
</div>
</div>


Then re-save your post again.
·
Tuesday, 07 July 2020 00:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Thank you, much appriciated The problem is we already have over 300 articles with pdf files in it (Library). Did the new feature change the code database?

Regards,
Mark
·
Tuesday, 07 July 2020 01:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Irwine,

Thank you, that's good to know! I was afraid it was also changed on all the older articles but that's not the case

Regards,
Mark
·
Wednesday, 29 July 2020 18:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Wednesday, 29 July 2020 18:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post