I have this problem I have been dealing with for some time now. We have our own CMS were our user’s add there data, pictures or PDF’s. We then use API to recive the “files” or data (text).
One company has 10 PDF’s that they like to access on their (info)touchscreen. But the text on some of the PDF are very small so you have to “zoom in” to see the text, it’s a time schedule for a construction site,
example: Bastionen - Bygning 5 - Version 0 - A3 1.0.pdf (174.9 KB)
The problem is when you zoom in the document start’s “flying” around if your not careful, and we get a’lot of complains. They would like the document to be locked so they can zoom in.
If anyone have a solution that they think might work in our case please help out, we will make sure that there is free drinks at the ISE 2020 in Amsterdam.
Have you not tried putting it inside a scroll collection?
Here is an attached project, you don’t have to have the scroll collection that big but it will allow you to view the document without going “Everywhere”
If you need to zoom the document more simply make the document bigger than the scroll collection
Click the enter/next button to complete the request, it will add this into the scene interface assets drag and drop that onto the scene and you should do the trick.
Personally, I would keep everything the same that you have, but then create a hidden group on top of your collection. The hidden group contains a pin board and a PDF inside. Whenever you touch a PDF in your collection, you show the hidden group and set the PDF to the new one selected via binding.
The kicker is this, you can lock the directions of movement and zoom of the PDF using the pinboard properties. So now you have a larger, zoomable pdf that doesn’t move around so much .
The other option you could do is to create your dynamic zoom bars and scroll bars. Use the Linear converter, you can use two scroll collections. One scroll collection has your scroll bar. As the scroll bar moves from right to left, the width and height of the PDF will increase/decrease proportionally. Then create other scroll bars to manipulate the x and y axis dynamically.
In this scenario, you don’t need to have a free-floating PDF in a pin board, and you don’t need to use multi-touch if that’s too hard to control. The PDF will stay where it is.
You could also do a hybrid of this by creating only the zoom-scroll bar. Then use the pin board collection that only moves the PDF…Uncheck rotate, and uncheck zoom properties. Again, you decide how much control you need the user to have.
I have some issues converting your help in to the composer, I understand what you are writing but I’m not sure how to set it up in the composer, have you tried it yourself or do you have pictures of this how-to?
As a thought, You can use a HTML Frame asset as a separate popup…
You could then use the Text manipulation Interface asset to load the pdf into a PDF Viewer.
In this case I use the Google PDF viewer URL, but you could just load as an iframe, or even have your local html act as a decent viewer…and load something like: PDF.js
I use the concatinate to build the content, and the concatinate in the middle could be dynamic from your URL…
Have shared a quick n dirty example…pdf-viewer.zip (6.2 MB)
It’s working quite good, but it has some hiccups, sometime when you press a button it “loads” one of the other documents, then if you press it again it show’s correct.
hey Kasper, yeah, I’m trying to figure out the best way to do this. Maybe one of the guru’s here can let me know what’s going wrong, but in the meantime, i’ve changed the ordering of the loading and added a slight delay (.5 seconds, then 1 second)… it seems to work nice now, Also, the concatination now uses text that can be manipulated via Html Viewer before & Html Viewer after, this way you can easily edit the html you’re creating.
BTW, do check out that PDF javascript library, i’ll look to implement it myself, looks quite nice, and would mean not using the Google viewer, or alternatively, just load via Iframe or embed
Let me know if this helps, i’m doing similar for loading html into a viewer from my Asset Grid.
Hi Ryan
It seems to run much smoother now, this might actually work for thees guys on the construction site. One thing I have learnt from these guys is if there is a “glitch” or a button that they don’t understand why is there or how it work’s, I will be the first to know. They are very good at building tall buildings, but when it comes to a touch screen they have a’lot to learn. I owe you @Ryan Ryan, @Seb, @Promultis and @AlexB a few rounds at the upcoming ISE in Amsterdam. Thanks a’lot guys.
Enjoy Kasper, the team and community here are amazing. Do also look at the document viewer as Seb pointed out. My tests had the document loading a little slow at first, but second load was fast.