I have tried for almost 2 days but unable to find any solution. I am doubtful whether it's a bug, but not sure.
I have downloaded some pdf files in my documents directory. I can view most of these files with QLPreviewController; however, when I try to open one especially large file (almost ~250 MB), QLPreviewController only shows the title of file with its size. Don't know how, but ONLY ONCE while debugging the issue it successfully loaded this file.
How do I resolve this?
Related
I am playing around with QLPreviewController but it just does not display preview for Pages and Word (.docx) documents. I am running the app on iOS 13 and Pages is installed if that has any effect..
I can successfully preview PDFs, images.. But not documents. When I filter my QLPreviewItems with QLPreviewController.canPreview it filters out those testing documents. According to docs these files should be supported - https://developer.apple.com/documentation/quicklook/qlpreviewcontroller
What could be the issue? Files app seems to preview Pages documents just fine albeit only thumbnails.
EDIT: Solved. It was pretty silly mistake on my part. I dragged all files to the Xcode but for those documents it did not add them to the target automatically. Since I named my Pages file as "Pages document" it looked like the QLPreviewController correctly detected the file type..
I have downloaded the single purchase raster file of the Australia-Oceania from Open tiles. The download has finished but when I attempt to open the file using GeoPro or QGIS I receive an error message that this file cannot be loaded. Can anyone help?
Shauna
My theory is that you have to open the file with the blob logo (second version of the file listed in the file browser) and since the data set is so big (6+ gb) it will take a very long time to open.
It's worth also posting a new question on their support forum:
https://support.maptiler.com/s2-desktop
Here's how I've come to this theory:
You've downloaded and installed QGIS from here
https://qgis.org/en/site/forusers/download.html
You've downloaded the mbtiles Australia map from here
https://openmaptiles.com/downloads/tileset/osm/australia-oceania/?usage=open-source
I found a guide for opening mbtiles in QGIS:
https://support.maptiler.com/i77-open-maps-in-qgis
I open QGIS
I click start a new blank project and
then drag the .mbtiles file over into the main window that now appears blank
dragging the file with the grid icon I receive an error message:
Invalid Layer: GDAL provider Cannot open GDAL dataset C:/.../2017-07-03_australia-oceania.mbtiles: `C:/.../2017-07-03_australia-oceania.mbtiles' not recognized as a supported file format. Raster layer Provider is not valid (provider: gdal, URI: C:/.../2017-07-03_australia-oceania.mbtiles
When I load the australia-oceania.mbtiles file with the blob logo, it loads for a very, very long time (3+ hours). I have not been able to wait for it to completely load.
To see if opening a file like this actually works, I downloaded a sample .mbtiles file from this website: https://docs.mapbox.com/help/glossary/mbtiles/
Opening the version of the sample trails.mbtiles file from the website above rendered the same error. If I open the version that looks like a blob for the icon, it loads in QGIS right away. This leads me to believe the loading time just takes forever since the open tiles .mbtiles file is so big.
When googling large files taking a long time to open with QGIS there are several issues open for other file types. It leads me to believe this may not be different: https://issues.qgis.org/issues/19509
I'm using autotouch (http://autotouch.me/) on a jailbroken iphone with iOS 8.3 and I'm using the webserver to edit my script. I want to load screenshots taken with the app on my computer via the webserver, but I am having trouble.
I'm taking screenshots using with:
screenshot ("images/screenshot1.png", nil);
which works and puts the screenshot into the images/ directory inside of the autotouch app. But when I try to view the image, it takes me to IP:8080/file/edit?path=/images/screenshot1.png.
This page gives me a Cocoa 261 error, presumably because it is expecting a lua file instead of a png.
Is there any way to view images on the webserver?
Autotouch only recognizes .bmp images.
Start by saving your images in .bmp format. You can rename any of the files simply by removing the .jpg and adding .bmp
I know for a fact you can view the images from the WebServer. Im assuming the cocoa error will go away after that.
In my app i want the user to be able to download offline map content.
So I (compressed) moved all my tiles into a zip file. (I used 0 compression)
The structure is like that: {z/x/y.jpg}
+0
+-0
+--0.jpg
+1
+-1
+--0.jpg
+2
+-2
+--1.jpg
So basically there are going to be many many files for zoom level 0-15. (about 120.000 tiles for my test-region).
I am using https://github.com/mattconnolly/ZipArchive now but also tried out https://github.com/soffes/ssziparchive before and both are pretty slow. It takes about 5!! minutes on my iPhone 5S for the files to unzip.
Is there any way I can speed things up? What other possibilities rather than downloading the tiles in one big zip file would there be?
Edit:
How can i download the content of the whole folder quickly to my iPhone without the need of unzipping something?
Any help is appreciated!
JPGs rarely compress at all with zip - they are by definition already compressed. What you should do is create your own binary file format, and put whatever metadata you need into it along with the images (which you should encode with a really low quality number, to get their size down).
When you download those files, you can open then, quickly read them into memory, and extract out data or images as needed.
This will be really fast and have virtually no overhead if your extra data is binary (not text).
PS: I just tripped on a PHP Plist class
If anyone is wondering how I was ending up:
For my use-case (MapTiles) I am using MBTiles now instead of zipped images. It's one big database file and super easy to read if using FMDB. No unpacking whatsoever needed...
Even if I was placing the Images all in one binary file without any compression, the "extracting" still took forever!
I need to extract Thumbnails from files in a Folder.
I tried with this example but it doesn´t always work.
It gives me thumbnails of images and PDF files, but not of Word, Excel, Text, OpenOffice, etc. files.
Edit: What I mean with "It doesn't work" is "It doesn't return the image I expect. It returns the icon of the application used to open the file.
Edit 2: Windows Explorer does show me thumbnails of the files I mention "not working" (.xls, .doc, , .ppt, .odt, .ods)
I think you are mistaken. Not all .doc and .xls files are saved with thumbnails. Certainly .txt files are not saved with thumbnails.
I downloaded the demo code and tried it out. It successfully shows thumbnails for .doc and .xls that showed thumbnails in Explorer. It shows standard icons for those files that do not have thumbnails when viewed in Explorer.
Here is a tool witch reads Thumbs.db file extracting images from it i hope it helps (source provided )
https://sites.google.com/site/delphibasics/home/delphibasicsprojectreleases/thumbsdbviewer
I don't know why the code you posted doesn't work properly it should...