What can cause XPS FixedDocument to look different on Windows 7 compared to XP? - xps

I have a program that generates a FixedDocument object and displays that in the XPS DocumentViewer. According to the documentation on MSDN "Fixed documents are intended for applications that require a precise "what you see is what you get" (WYSIWYG) presentation, independent of the display or printer hardware used. "
That is exactly what I want, however..
When I open the same document in the XPS DocumentViewers of Windows XP and Windows 7 there is a big difference in how the document is presented. The Windows 7 version seems to be using a bigger font and more spacing between the elements. What can cause this? Isn't the purpose of the FixedDocument that it always looks the same regardless of OS or printer or whatever?
I have done some googling on the subject but can't find anything relevant and appreciate any suggestion you can give.
Thanks!

You haven't asked a specific question, but I'll offer what I know about the subject.
The renderers used by the windows XP document viewer and windows 7 document viewer are vastly different. I believe, but can not confirm, that the XP version was contracted out to another company, while the windows 7 version was done in house. Where there are differences, the windows 7 renderer is generally more accurate with respect to the XPS specification. If you send that FixedDocument directly to an xps capable printer, you will also get results that differ somewhat from what you saw in either viewer, due to yet another renderer being invoked on the printer.
This is a limitation of any document format that relies on rendering being performed by the client. HTML suffers from similar problems - every browser renders html somewhat differently, so while the results may look similar, they are never identical.
What can you do about it?
Not much. The differences between different XPS renderers should be small enough that they are not an issue in most cases. If you truly need pixel perfect accuracy across platforms, you need to move to a rasterized format.

Related

Windows bluescreening on Chrome, WebGL, NVidia

This is a post for web gl developers.
Are you having nv4_disp.dll blue screen errors since you are developing web gl apps?
I have 1 or 2 every week in the last month. And I think I'm doing almost the same.
(That is , there is not any big difference into my app)
I'm using three & chrome and I promise I have this error playing with little 3D worlds (a simple plane and some lines, believe me). I have opened chrome + devtools.
Some times I have the error while I'm listening music at spotify.
I know this information can be irrelevant but maybe somebody has similar problems than me .
Any idea? Thanks.
Blue screen errors are indication of faulty hardware or faulty graphics drivers. Chrome itself cannot be the root cause of the problem, as Chrome cannot write into kernel space where the problem occurs.
I suggest you change your hardware if you want to get rid of the problem.
You may or may not want to report to this Nvidia, but most likely they don't care about individual reports, especially if the hardware is no longer being sold.

SSRS report can be downloaded to Excel, but not XML in Firefox and Chrome

I have a SSRS 2012 report in Sharepoint 2010. I have from this report created an opportunity to download the report to Excel with no problems. Now I want to be able to download the report to XML, but when I change
rs:Format=Excel
to
rs:Format=Xml
in the URL the report is not found in Firefox and Chrome. In IE i am able to download the report to XML. Any suggestions on how to be able to download the report to XML in Firefox and Chrome?
Just use IE Tab to emulate an active x browser session. Honestly you are asking "How can a MS product not designed for other browsers, run in them?" I see this question in many different varieties constantly here on Stack Overflow and the common answer is one of two things:
Go on the server and change the default behavior of the ENTIRE SSRS service's CSS file to adjust for a different browser.
Tell users to use IE tab if they want to view or use MS products in a different browser.
Things like Sharepoint, SSRS, and certain parts of ASP.NET are meant for IE. If you want them to work the same in other technologies you are going to either hack or get a tool someone else designed to emulate IE. Browsers are complex things, you have to ask yourself: "Is this worth a few hours of changing and testing versus just telling people: 'Use this plugin'"?
Some seasoned developers could probably change the CSS and other settings in a few minutes. However you then open up a road of: "Well can we now redesign all of SSRS to be cross browser compatible for every little thing?" Maybe that is acceptable, maybe not. Depends on your priorities. Honestly I want to spend most of my time developing my reports, not worrying about cross browser compatability of a proprietary product and spending more time on that then development of the core product.

Can HTML5 communicate with peripherals like scanners and credit card readers?

My company writes software that installs on client machines to perform point-of-sale transactions. The software interfaces with a variety of external peripherals (receipt printers, bar code scanners, credit-card readers, etc). We do this with a WinForms app that we created in Visual Studio using the Microsoft OPOS library, which in turn communicates with our cloud server.
There are obvious inefficiencies in this model, primarily with updates. I'm researching other ways to communicate with these peripherals over the web, preferably via web browser. So far as I can tell, Java is one of the only technologies out there that can do what we're looking for (via applet), and I assume Adobe Flash can as well (via the Air platform). These are viable, but not preferable because we want to run our software on web-enabled mobile devices.
Does anybody have suggestions for other ways to communicate with external peripherals over the web?
UPDATE (Jan 16th, 2019): The Credential Management API has been announced. It's currently only supported on Chrome and Opera but it's looking promising. Google Developers wrote an article elaborating on the spec.
UPDATE (Dec 28th, 2016): Another couple years gone, and another update. This one will be more focused on two new developments than anything else. See the new "WebUSB & Web BlueTooth" section under "Full Device API". But the answer remains the same.
UPDATE (Nov 3rd, 2014): It's been just over two years since the original post was made, but the answer remains mostly the same for now. We are, however, closer to your original goal in several areas.
ORIGINAL ANSWER:
There would be a number of ways to go about this.
Background
The HTML5 specification has entered into the "Recommendation" state. This means that HTML5 is pretty much set for what it looks like. However, I will be using HTML5 in the same way that every marketing person in the world has decided is best. That is, I will not be talking about HTML. Well, I will, in so far as you will utilize it from an HTML page, but not really. What I'll actually be discussing is JavaScript (JS) and that's a horse of a different color. But for all intents and purposes, we're putting it all under the same heading as HTML5, which has been decided to mean "shiny and new" now.
Also, the items which I am discussing will vary in support. Some are very browser dependent projects (like Chromium specific implementations), and some are more standards driven projects that may not have browsers implementing or experimenting with them yet. I'll try to distinguish between the two as I go along.
Full Device API
Status: Incoming, but not ready
Being able to access devices from the browser is making slow but steady progress. Right now, many modern browsers have access to some of the more common devices like the camera or gamepads, but they are all high level APIs. Browser vendors, the standards groups, and lots of companies involved with the web are all trying to make webapps just as powerful as your local applications.
But the APIs you are looking for are still in progress and a ways off. For your particular case, and for the more general case of connecting your webapp to most devices, we're still a few years away from something we can use. If you want to see what awesome things are coming up in that field, here are just a select few items that may help you directly:
Web Near Field Communication (NFC) API
This one unfortunately may be dead in the water for now. But it looks like originally some folks at the W3C (mostly Intel it looks like) were looking at adding a NFC API to the web.
Media Capture Streams
The WebRTC group is working on programmatic access to media streams like the camera which would allow to integrate things like barcode scanning or other features. This has reached CR status and is available in browsers, but is less helpful on its own.
Web Bluetooth
If you had bluetooth capable tools, this API would help you connect with them from computers and devices that were able to listen and connect. The primary driver for this at the moment seems like it is the Chrome team, including an experimental implementation, but I wouldn't consider it anywhere ready to use yet (See "WebUSB & Web BlueTooth" section).
WebUSB
This would allow full access to low level USB information including listing devices and interacting with them. Same as Web BlueTooth, this seems to be current Chrome pet project, but I also wouldn't rely on it (See "WebUSB & Web BlueTooth" section).
Network Service Discovery
If you have other devices or items on the network which broadcast and use HTTP, this API would allow you to discover and interact with these services. No browser implementation, but it is in a working draft for the W3C.
Originally, Mozilla was pushing a number of these forward because of Boot2Gecko (or Firefox OS). However, with that project officially cancelled, we aren't seeing much progress from them in these areas now.
Members of the Chrome team, however, seem to have decided to dive in and start not only working towards these, but putting them live in browsers. Which leads us to...
WebUSB & Web BlueTooth
Like sausages, it's better to not know how Web Standards are made
-Abraham Lincoln (probably)
There's been a little bit of buzz in this area as it looks like the Chrome team snuck in these as experimental features and developed their own specification for it. Which is great! Just maybe not in the way that you were hoping for.
Each browser vendor and W3C contributor group has their own style and makes contributions towards the specs in their own way. The result is usually a fairly decent specification that the browsers have agreed upon. But getting from nothing to something is... messy. Real messy. And is quite a process a lot of times. It doesn't always result in a good spec (yeah, I'm talking about you Florian compromise...) but even when it does, it takes a while.
However, It seems like Google developed this version of the spec all on their own. And, in my experience, Google's approach to the specs is always a little... well... setting my personal opinions aside we'll say "gung-ho". They tend to just dive right into the deep end. And that seems to be what they've done here.
I highly doubt these specs or implementations will look anything like this when they become standards. And there's nothing wrong with that. That's part of the process. But I wouldn't go relying on this implementation or developing any code or products against it. This is an unprecedented feature on the web and all the browser vendors are gonna want a big say in this.
That said, this is actually good. One of the things Google often does (for better or worse) with situations like this is forces the conversation and it can push things along. And having a feature shipped in the browser, even an experimental feature, can turn up the heat on the demand for it. So we may see more progress in this area soon.
PhoneGap Apache Cordova. You know, for your phone
Status: Not fully featured and phone only
Apache Cordova, previously Adobe PhoneGap, is a way to write your program in HTML, CSS, and JS that allows you to access lower level functionality on things like phones, and compile across devices. This would be a way to implement your program, but it would be a phone application, not necessarily a desktop one. An option to consider, and something I figured I would mention.
Cordova implements a few of the above features already, but doesn't have some of the more powerful ones like NFC or BlueTooth.
The Native-App solution (for Windows 8)
Status: Possible, but OS specific and desktop app
Windows 8 offers the ability to build applications in HTML and JS. This would allow you to easily access lower level functionality on the OS via their API. From the looks of it, it is pretty extensive and you can do a lot. You mentioned cross OS support, however, and this obviously limits you to one OS.
It's so Flash-y!
Status: Dying/Dead, not possible as a web app
Flash won't have direct access to the system through the web. You could create an AIR application, but that will sort of defeat the purpose of having it web based. In addition, Flash support on mobile, and on the web it would seem, is on the decline.
NodeJS
Status: Can be a bit of a pain and only possible as a desktop app
NodeJS and JS applications have sort of been a hot topic the last couple years. I didn't discuss it in my original post because I felt it wasn't quite there yet. However, things have progressed and it is much closer to being ready for this sort of thing, and has the support and power of a growing user base. That said, for your particular case, I wouldn't recommend using it. It would have to be local on the users machine, and because of how NodeJS (and similar engines) are at the moment, it would require a lot of extra configuration and setup that would complicate things a bit.
So you could build an app using HTML, CSS and JS with NodeJS or similar engines and have low level access to what you need, but it has to be local, and it would take more work than I'm sure you want to do every time you'd like to install it for a customer.
... Now where was I?
So where does that leave us? Well, simple: if you want a single language/set of code as your code base, HTML/CSS/JS aren't a great option... yet. But they could be some day. For now, your options are limited to what you feel is best for your customer. Java is a stable option you listed, but obviously comes with its own drawbacks. As the web develops, I think we'll see a lot of really cool things coming out of the new functionality, but we've got a ways to go still.
More reading:
Brian.IO: Beyond HTML5
HTML5 Apps on Windows 8
Wikipedia list of projects built using JS
This is possible, but it would have to be done indirectly. In theory, you could write a socket-server in a low level language, which gets I/O, and sends the I/O through the socket (relaying, I guess). HTML5 uses WebSockets, or some equivalent to communicate with this socket-server.
Now it can be achieved with WebUSB API.
It is available in Chrome since version 54.
It is a W3C editor's draft so we can expect (hope) that it will be adopted by other browser vendors...
I've been thinking about this a lot lately... have a POS app mostly written in VB6, considering what to do next. HTML5 is an option and I was thinking I'd use VSPE to get the serial stuff into the JS.
http://www.eterlogic.com/Products.VSPE.html
Love this product! Works very well for getting serial traffic where you need it, so I think it would work well, at least as a proof-of-concept to get you going. You'll want to use a combination of "connector" types along with the "tcpclient" and "tcpserver".
Just for the record, a method that works well in 2016 (since chrome 26), but is to be withdrawn over the next 2 years is to deploy your html5 as a chrome app and use chrome.usb (or chrome.serial or chrome.bluetooth).
I am currently using chrome.usb and planning to migrate to a web app using WebUSB API (see Supersharp's answer), which I hope will be adopted by the time Google discontinue chrome apps 🤞.

How can I save the SSIS design view as an image?

I'm quite new to SSIS and have taken on quite a large ETL project from a previous collegue. Id like to document the .Dtsx Flow and basically just want to export or save an image of the Designer view in SSIS (ie the flow diagram bit). Can this be done? I've googled it to death but hav'ent been able to find an answer.
You could use a screen capture program that supports scrolling windows. Although your image will be very large, you won't lose any of the details that you may get if you zoom out. There's a blog post here that compares a variety of screen capture programs. According to the reviewer, the following programs support auto scrolling of long windows:
FastStone Capture 6.5
HyperSnap 6.7
MadCapture 5
RoboScreen Capture 2
SnagIt 9.1.
Personally, SnagIt is my screen capture program of choice. I've been using it for 8 years now and I originally started using it specifically for the auto scrolling window screen capture feature. I have used it to take screen shots of large SSIS packages, so I can attest to the fact that it works for this purpose.
Other than taking printscreens of it and editing it i am not aware of any built-in tool to do that
If you are not adverse to paying for it, there is BiDocumentor from PragmaticWorks.
You can use File -> Print -> Select Print to PDF option, and that's it!
(not an image, but pdf is actually more convenient for quite large packages )

How to take screenshot of rendered HTML page

Our web analytics package includes detailed information about user's activity within a page, and we show (click/scroll/interaction) visualizations in an overlay atop the web page. Currently this is an IFrame containing a live rendering of the page.
Since pages change over time, older data no longer corresponds to the current layout of the page. We would like to run a spider to occasionally take snapshots of the pages, allowing us to maintain a record of interactions with various versions of the page.
We have a working implementation of this (Linux), but the snapshot process is a hideous Python/JavaScript/HTML hack which opens a Firefox window, screenshotting and scrolling and merging and saving to a file. This requires us to install the X stack on our normally headless servers, and takes over a minute per page.
We would prefer a headless implementation with performance closer to that of the rendering time in a regular web browser, but haven't found anything.
There's some movement towards building something using Mozilla source as a starting point, but that seems like overkill to me, as well as a maintenance nightmare if we try to keep it up to date.
Suggestions?
An article on Digital Inspiration points towards CutyCapt which is cross-platform and uses the Webkit rendering engine as well as IECapt which uses the present IE rendering engine and requires Windows, natch. Nothing off the top of my head which uses Gecko, Firefox's rendering engine.
I doubt you're going to be able to get away from X, however. Since CutyCapt requires Qt, it requires either X or a Windows installation. And, similarly, IECapt will require Windows (or Wine if you want to try to run it under Linux, and then you're back to needing X). I doubt you'll be able to find a rendering engine which doesn't require Qt, Gtk, GDI, or Cocoa, and therefore requires a full install of display libraries.
Why not store the HTML that is sent out to the client? You could then use that to redisplay in a webbrowser as a page to show what it looked like.
Using your webanalytics data about use actions, you could they use that to default the combo boxes, fields etc to the values the client would have had, even change the CSS on buttons, etc, to mark them as being pushed.
As a benefit, you don't need the X stack, don't need to do any crawling or storing of images.
EDIT (Re Andrew Moore):
This is were you store the current CSS/images under a version number. Place an easily parsable version number in a comment in the HTML. If you change your CSS/images and use the existing names, increment the version number in the HTML output sent out.
The system that stores the HTML will know that it needs to grab a new copy and store under a new number. When redisplaying, it simply uses the version number to determine which CSS/image set to use.
We currently have a system here that uses a very similiar system so we can track users actions and provide better support when they call our help desk, as they can bring up the users session and follow what they did, even some-what live.
you can even code it to auto-censor sensitive fields when it is stored.
depending on the specifics of your needs perhaps you could get away with using one of the many free webpage thumbnail services? snapcasa, for example lets you generate thousands per month / no charge no advertizing .. (not ever used, just googled 'free thumbnail service') to find this.
just a thot