More

Viewer not displaying the data in my standalone PyQGIS Application

Viewer not displaying the data in my standalone PyQGIS Application


I tried creating a standalone external application of QGIS using python and I followed the tutorial mentioned in the link http://download.osgeo.org/qgis/doc/workshops/foss4g2007_qgis0.9_workshop_en.pdf

After running the python file the viewer opens and allows the user to browse for Shapefiles. The problem is that the Shapefile cannot be viewed in the viewer. It raises an error "Invalid Shapefile" though I added a correct Shapefile everytime I loaded any shapefile.

My code as well as the error is attached. Please tell me where I am wrong.

def addLayer(self): file = QFileDialog.getOpenFileName(self, "Open Shapefile", ".", "Shapefiles (*.shp)") fileInfo = QFileInfo(file) # Add the layer layer = QgsVectorLayer(file, fileInfo.fileName(), "ogr") if not layer.isValid(): raise IOError("Invalid Shapefile") # Change the color of the layer to gray symbols = layer.renderer().symbols() symbol = symbols[0] symbol.setFillColor(QColor.fromRgb(192, 192, 192)) # Add layer to the registry QgsMapLayerRegistry.instance().addMapLayer(layer) # Set extent to the extent of our layer self.canvas.setExtent(layer.extent()) # Set up the map canvas layer set c1 = QgsMapCanvasLayer(layer) layers = [c1] self.canvas.setLayerSet(layers)

And the error window is


Non-valid layers are most of the times due to a wrong QGIS prefix definition.

Please try with:

qgis_prefix="C:Program FilesQGIS Wienaappsqgis" QgsApplication.setPrefixPath(qgis_prefix, True)

Which should go right before this line:

QgsApplication.initQgis()

Now your tested layers should be valid.


CefSharp not displaying PDF files in the builtin viewer

I'm writing a custom webbrowser based on CefSharp 90.6.7. I have a problem with opening PDF files. I'd like these files to be opened in the Chromium built in PDF viewer. Instead of this I just get a white screen with an error "The PDF cannot be loaded" message. There I have the possibility do download the PDF file and after downloading this gets displayed in the default PDF viewer.

Unfortunately I don't know how the web application is serving the PDF files (it's a SAP UI5 ABAP something), but when I try this in latest nightly Chromium, MS Edge or other Chromium based browsers, these correctly display the PDF file in the build in viewer.

Can you point me what do I miss? Is it somehow necessary to handle these PDF files? I tried to google for an example, but haven't found anything.


Events not visible in Event Log viewer

Last weekend a server crashed, during the investigation I noticed that in the immediate run up to the failure we saw a large number of a specific event in the application log. In an attempt to understand what was occurring I attached a task to that event to send me an email if it occurred again.

I've been receiving emails all weekend, some 200 emails received since Friday evening, and they are still arriving.

This morning I've logged onto the server and opened event viewer and I cannot see any new instances of that event in the log viewer.

If i filter by event ID I can see the series of events from last week but nothing since then.

Get-Eventlog shows the same as the GUI viewer, ie no record of these events, and yet I am still getting the emails generated.

Everything else seems to be being logged as expected, as far as I can tell.

This is a Server 2008 R2 box runnin in an ESXi cluster, latest updates etc. Tools is up to date with ESXi (although I am going to move to 10.0.5 I think).

EDIT: WEVTUTIL qe APPLICATION >>ApplicationLog.log

I can now see the logs triggering hte event. Still no idea why these are not showing in the viewer.


This issue usually occurs in case you have edited your page and added the Page Viewer Web Part using Google Chrome!

In Google Chrome, the blank page inside the Page Viewer Web Part means

This content cannot be displayed in a frame!

To make sure that, try to open the same page in Internet Explorer and you will get

So How to solve this issue?

  • Go to Site Collection Settings > Site Collection Administration > HTML Field Security
  • Check Permit contributors to insert iframes from any external domain into pages on this site.

  • Go back to your page and check if the Page URL has been rendered inside the Page Viewer web part or not!

In case, the issue still persists that means the publisher of this content does not allow it to be displayed in a frame.


2 Answers 2

This answer may need pgf CVS, I do not know.

The external lib can be customized to produce png on its own -- with correctly scaled images.

The pgfmanual for pgf (CVS?) describes the process in all detail in Section 34.7 Bitmap Graphics Export in its documentation of the external library.

There are three steps involved:

a) modification of the system call (no problem, should be possible with any version of the external lib)

b) the /pgf/images/external info key (which is probably pgf CVS, only) which generates TeX dimension information for every exported image and stores it appropriately.

c) the use of pgfexternalwidth when loading the image (this is actually output of this 'external info' thing).

The ikzset statement in my suggested solution defines a new style 'png export'. Rather than activating it globally as in my solution, you may just enable it for a single picture by


Viewtron Software & App Downloads

    Windows CMS Software (Version 1.0.0.32) - The Windows Central Management Software for Viewtron DVRs allows users to connect to and view security cameras from multiple DVR locations from a central client application. The software lets the user configure groups of connections, then picks and choose which cameras should be displayed. This software only works on Windows PCs
  1. Windows Remote Client Software - Allows users to remotely connect to one Viewtron DVR.
  2. Back-Up Player - Used for viewing recorded video on the DVR.
  3. Remote Search - Allows users to search through recorded video footage by day and time.

Export DICOM files to images, movies, clipboard and text

MicroDicom DICOM viewer can export DICOM images to common graphics formats and videos. Our software can be used to convert JPEG, BMP images to DICOM images. Images can be send to the Windows clipboard and after that paste in other applications.

  • Export DICOM to JPEG, BMP, PNG, GIF, TIFF
  • Export DICOM to WMV, AVI
  • Export DICOM to text or Comma Separated Values (CSV) file
  • Export DICOM image to clipboard
  • Export JPEG, BMP, PNG, GIF, TIFF to DICOM
  • Copy image to clipboard
  • Automated open and copy DICOM images from CD/DVD

PDF reader app that remembers the last page you were on? [closed]

Want to improve this question? Update the question so it's on-topic for Android Enthusiasts Stack Exchange.

  • I usually access my PDFs via the DropBox app on my phone.
  • Every time I open the same PDF it starts back at page 1.

Is there a way to set up the Android Adobe Reader app to remember the last page I was on?

If not, is there another PDF reader app that has this option?


Viewer not displaying the data in my standalone PyQGIS Application - Geographic Information Systems

If you want the save the captured packets for viewing them later, use "Save Packets Data To File" option from the File menu.

Display Mode

Starting from version 1.35, there is a new mode - 'URL List'. This mode only display the URL addresses list (http://. ) found in the captured packets.

Exporting the captured data

  • The upper pane: you can select one or more items in the upper pane, and then copy them to the clipboard (You can paste the copied items into Excel or into spreadsheet of OpenOffice.org) or save them to text/HTML/XML file (by using 'Save Packet Summaries').
  • The lower pane: You can select any part of the TCP/IP streams (or select all text, by using Ctrl+A), copy the selected text to the clipboard, and then paste it to Notepad, Wordpad, MS-Word or any other editor. When you paste the selected streams to document of Wordpad, OpenOffice.org, or MS-Word, the colors are also transferred.
    Your can also export the TCP/IP streams to text file, HTML file, or raw data file, by using "Export TCP/IP Streams" option.

Displaying characters above ASCII 127

The 'IP Country' columns

You can also use the GeoLite City database. Simply download the GeoLite City in Binary / gzip (GeoLiteCity.dat.gz) and put it in the same folder of smsniff.exe
If you want to get faster loading process, extract the GeoLiteCity.dat from the GeoLiteCity.dat.gz and put it in the same folder of smsniff.exe

Capture and Display Filters

For both filter types, you can add one or more filter strings (separated by spaces or CRLF) in the following syntax:
[ include | exclude ] : [ local | remote | both ] : [ tcp | udp | tcpudp | icmp | all ] : [ IP Range | Ports Range ]

  • Display only packets with remote tcp port 80 (Web sites):
    include:remote:tcp:80
  • Display only packets with remote tcp port 80 (Web sites) and udp port 53 (DNS):
    include:remote:tcp:80
    include:remote:udp:53
  • Display only packets originated from the following IP address range: 192.168.0.1 192.168.0.100:
    include:remote:all:192.168.0.1-192.168.0.100
  • Display only TCP and UDP packets that use the following port range: 53 - 139:
    include:both:tcpudp:53-139
  • Filter most BitTorrent packets (port 6881):
    exclude:both:tcpupd:6881
  • Filter all ICMP packets (Ping/Traceroute activity):
    exclude:both:icmp

Live Mode

Viewing process information

  • Process information is only displayed for TCP packets (It doesn't work with UDP)
  • Process information may not be displayed for TCP connections that closed after short period of time.
  • Retrieving process information consume more CPU resources and may slow down your computer. It's not recommended to use this feature if you have intensive network traffic.
  • Process information is currently not saved in ssp file.

The structure of .ssp file (SmartSniff Packets File)

The main header structure:
00 - SMSNF200 signature.
08 - (2 bytes) The number of bytes in the header (currently 4 bytes for the IP Address)
0A - (4 bytes) IP Address

Header of each packet:
00 (2 Bytes) packet header size (currently 0x18 bytes)
02 (4 Bytes) number of received bytes in packet.
06 (8 Bytes) Packet time in Windows FILETIME format.
0E (6 Bytes) Source Mac Address.
14 (6 Bytes) Dest. Mac Address.
1A The remaining bytes are the TCP/IP packet itself.


Viewer not displaying the data in my standalone PyQGIS Application - Geographic Information Systems

The amalgamation of technology and engineering in the process of acquiring, storing, retrieving, displaying and distributing images has resulted in, a one-stop solution for healthcare informatics and the deliverance of optimum results to clients. Read more.

Vendor Neutral Archive vs PACS—Enter the Future of Medical Image Archiving with Cloud-based PACS

PostDICOM - November 22, 2019

Medical imaging technology today is at the peak of its development. Today, medical images are of the highest quality and resolution. But the improvement in quality comes at the cost of huge file sizes. Read more.

Top 25 Free Dicom Viewers for Doctors, Medical Students, and Health Professionals

PostDICOM - June 17, 2019

DICOM (Digital Imaging and Communications in Medicine) is a standard format that enables medical professionals to view, store, and share medical images irrespective of their geographic location or the devices they use, as long as those devices support the format. Read more.


Watch the video: PyQGIS print field names