I've developed a web service for printing (C# MVC 4) that creates XPS documents and then prints them via various printer servers (MS) to various print queues. This all works fine against Sharp print queues, but all font data is lost when printing to Lexmarks although the font sizes remain correct. The XPS documents all present correctly when viewed in an XPS viewer, and when printed out via the viewer to the Lexmarks via the print server work properly. The fonts are on the print servers, the Sharp queues are on the same print servers as the Lexmarks and the fonts are all specified in the XPS documents. Changing the Lexmark printer settings, drivers etc appears to make no difference.
The only pertinent question (from a year ago) on here, said the MS solution was to turn off the print spooler when doing server side printing due to a font conversion bug.
I know this is a pretty vague question, but if anyone has been through this pain and has any tips on how to resolve this I'd appreciate it.
Well, there's not much to go on, but I suspect three things:
The XPS document you are producing references fonts without embedding them
The Lexmark print drivers on your server are XPS drivers
The fonts are not installed on the printers themselves.
Assuming I'm right, changing any of these three facts should rectify the situation, though I make no guarantees about #3.
The reason this is happening is that the fonts are not used until the XPS is rasterized - that is converted into raw image data. I suspect that in the Lexmark case, this is occurring on the device, while in the Sharp case, it is occurring on the print server. This is supported by the fact that printing the XPS document from the XPS viewer works correctly, since this causes the rasterization to occur on the machine where the viewer is running.
Using a non-XPS driver on the print server will cause a bit of a performance hit. The print server will effectively be converting XPS to GDI, which the non-XPS driver will then convert to another PDL, such as PostScript or PCL. I suspect that this is the case with the Sharp drivers, though it may also be that the Sharp driver is an XPS driver that performs the rasterization on the host.
OK..after a lot of testing the following was noted (and may be of help to others).
In answer to the above questions..
1) embedded fonts confirmed and used MS official test XPS files.This did not help.
2) Lexmark driver used was winprint > RAW. changing this didn't help.
2) Fonts are installed on the printer
Tests
1) new print server, printing directly to a sharp printer. Problem appeared in that fonts were lost. The resolution to this was to change the spooler settings to print only after all documents were printed. The problem vanished, however I didn't want to rely on people configuring printers which requires specialist settings, so I rejected that. This is a client's network and I have no control over it.
2)printed to existing web service (using user impersonation) on print server to Sharp queues to confirm that this still worked. Confirmed.
3)Printed to existing web service (using user impersonation) on the print server to Lexmark queues and this still failed and the fonts were lost.
4) Printed from 2 separate IIS boxes to the print server to the Lexmark queues (using a domain app pool identity account) and this now worked correctly (in c# new printserver(\printerservername)) in that the Lexmarks printed correctly.
5)Printed to existing web service (using the domain app pool identity account) on print server to the Lexmark queues and this still failed (in c# new localprintserver()).
6)Printed to existing web service (using the domain app pool identity account) on print server to the Lexmark queues and this still failed (in c# new printserver(\printerservername))
The upshot of all this is that if you print locally the fonts are lost for some odd reason, but if you print remotely, the fonts are retained. All the servers have the same basic set up (no xps viewer etc and the domain app pool account is a service account) and the only difference I can see is the new localprintserver against new printserver(\printservername) calls. The same code was ported from machine to machine with the web config file holding the local or remote setting. All machines have IIS 7.5 .net 4.5 MVC 4 and are in the trusted zone.
So my solution will be split, non Sharp printing will be carried out on the document builder remote to the print server service and Sharp printing will be done on the print server (this is required for the Equitrac "follow me" printing) because I didn't want to use kerberos delegation. As stated it's not my domain and I could see the whole place grinding to a halt print wise over a lost spn or a kerberos failure.
Anyway, hope this helps someone.
Related
My Bixolon SRP-350II is not shown in the list of available devices given by
posExplorer.GetDevices();
All I see are Microsoft's simulated devices. The printer itself works, I can print on it and, using raw printing, send commands such as "cut". I've installed the OPOS driver for the printer, but nothing changed.
Is it necessary to do some further configuration? Is the order of installing POS.NET, the OPOS-driver and the Windows driver important?
Alright, figured out the Printer had to be configured with PSPLauncher.exe and now it shows up. Still, I am not sure I understand where exactly the benefit of POS .NET lies. I want the customers to plug-in new printers and when using Raw Printing and EscPos-commands, this seems to be much easier.
Plug printer in, install windows driver, set to main printer and then cut-commands etc. are being send in the raw stream.
I can't say directly for printers, but where we get the benefits out of POS.NET is the standard code we wrote for the scanners, or MSRs or cash drawers. All we have to do is install the driver, and configure the device in OPOS configuration (which is probably the step you were missing and resolved with the "PSPLauncher.exe") and we know that it's code-compatible and just works.
We have hundreds of terminals across the country (Australia) and they all use a variety of models and brands for the devices (within a range of tolerance) but because of POS.NET they're all supported.
I am building a Google Chrome Packaged App. I have a requirement to access printer available via a "Closed" Network (not connected as USB). Obviously Chrome Cloud Print API is NOT my option, since I'm talking about "Closed" network, hence no internet access (besides I need to print very fast, so even if I had internet I could not afford to go via Cloud and wait few seconds to print.). I have done my research, so far this seems to be NOT possible in Google Chrome Packaged App. Please let me know if I've overlooked something, or if there's a workaround.
Thanks very much.
If the printer is available in the same network, you can access it using Network Communications with the Sockets API.
If you're OK with requiring user confirmation before printing, then you can use window.print(), which works in Chrome apps with a couple of limitations: 1) There was a bug that could cause crashes on OS X (http://crbug.com/297179), and while this bug is fixed in the Canary and Dev versions of Chrome, it will take a few weeks for the fix to make its way to the Beta and Stable versions; 2) On Window and Linux/Chrome OS, the size of the print preview panel is limited to the size of the window being printed, so you need to make sure that window is large enough to make all of the print preview UI accessible to users.
Because window.print() has not been used very much so far in Chrome apps, you may run into issues with it that have not been seen by others. If you do, please report them at http://crbug.com/new.
If you need the print to happen without user confirmation, your program may have to use the sockets API to communicate directly with your printer or print server (as described by xmarcos in another response to this question). You will probably need to use something like pdf.js (as described at Converting canvas to pdf) to convert what you want to print to something your pinter will understand.
I am trying to do a loadtest on QC11.5 application using Neoload, While recording request are being captured but response body not been stored.
<<body not stored by Neoload >> Error
please help to resolve this issue
Hum... It sounds like a well-known project ;> Here is a summary for the other readers. Hewlett Packard Quality Center 10 or 11 is not a "full" web application. It is kind of local application, installed through Internet Explorer with .cab and .ocx using a HTTP tunnel. The problem to load test it is that the dialog sent by this fat client is fully encrypted. For NeoLoad, an encrypted conversation (over HTTP or HTTPS) is considered as binary and it is not stored in the design. But it is clearly showed in the "Check VU" step. Here we speak about an "alien" encrypting service on top of standard services like SSL, where NeoLoad performs well.
For the readers, to put it in a nutshell, QC cannot be load tested with a network-based approach, like all the majors and professional load testing tools do. Here it is one of the rare situations where a synchronized functional test could be the solution... with hundreds or thousands of desktops.
I'm trying to build a virtual printer.
There are already some answers like this and this.
However my demand is more specific. I just want to create a virtual printer that can be added into the system and can be accessed from any application. On clicking print command, a dialog looks like a real printer pops out and generates a PDF on printing. Then some more actions, like pushing the PDF to my server, are performed.
Do I need to dig into Windows Driver Kit? Or is there any free SDK for this?
Thanks.
Not sure if this question is still relevant to you, but you'd probably want to think about something like this:
Use the WDK (Windows Driver Kit) to create a Unidrv UI plugin. This will allow you to specify UI during the print (for your printer dialogue). The reason why you'd want to show UI here is because it's one of the only printer driver components that runs in the user session (the same process as the printing application). The XPS pipeline and port monitor are both session 0.
If you want to stick to MS convention, you'll do the spool file to PDF conversion in the render filter of the XPS Filter pipeline (this is if you're using an XPSDrv driver). The filter pipeline is where you have the opportunity to modify the XPS spool data coming in and in the final filter, convert it to your output document type (PDF in your case).
To do post print processing, you might want to consider creating a port monitor (again with the WDK) and kicking off a new process to do the post print processing after the port monitor writes out the print output to disk.
Only problem with this approach is that you can't use port monitors in Version 4 drivers (this is the new type of driver in Windows 8). Version 3 drivers still work in Win 8, but I guess they'll be phased out eventually.
Sorry it's probably not very obvious, but as I say, it's a high level overview (and unfortunately driver development is still very complex beyond a simple print to file). Version 4 printer drivers are becoming a lot easier to develop, but unfortunately with the removal of port monitor support and other improvements, it makes it a lot harder to develop anything requiring post processing.
[DISCLAIMER: I'm associated with the Mako SDK R&D team]
I know you asked for a free SDK, unfortunately I don't know of anything that would be suitable, but I know our company offer a Virtual Printer Platform (SDK) which would be good for you (prints to PDF and supports post print processing). You can find more information at the Mako SDK website
Hope this helps a bit anyway. I know printer driver development can be very confusing at times!
After reading up and doing a lot of research, with the aim to setup up something like redmon and use the printer SDK, I have completed the project using this SDK: http://www.novapdf.com/pdf-sdk.html
This solution however will work with windows only.
[I am not affiliated with novaPDF]
I have investigated an OSX version, however this will be a different build, you can probably set something up using this method: http://www.jms1.net/osx-pdf-services.shtml [I have not yet tried this]
The situation is simple. I've created a complex Delphi application which uses several different techniques. The main application is a WIN32 module but a few parts are developed as .NET assemblies. It also communicates with a web service or retrieves data from a specific website. It keeps most of it's user-data inside an MS Access database with some additional settings inside the Registry. In-memory, all data is converted inside an XML document, which is occasionally saved to disk as backup in case the system crashes. (Thus allowing the user to recover his data.) There's also some data in XML files for read-only purposes. The application also executes other applications and wants for those to finish. All in al, it's a pretty complex application.
We don't support Citrix with this application, although a few users do use this application on a Citrix server. (Basically, it allows those users to be more mobile.) But even though we keep telling them that we don't support Citrix, those customers are trying to push us to help them with some occasional problems that they tend to have.
The main problem seems to be an occasional random exception that seems to pop up on Citrix systems. Never at the same location and often it looks related to some memory problems. We've p[lenty of error reports already and there are just too many different errors. So I know solving all those will be complex.
So I would like to go a bit more generic and just want to know about the possible issues a Delphi (2007) can have when it's run on a Citrix system. Especially when this application is not designed to be Citrix-aware in any way. We don't want to support Citrix officially but it would be nice if we can help those customers. Not that they're going to pay us more, but still...
So does anyone know some common issues a Delphi application can have on a Citrix system?
Does anyone know about common issues with Citrix in general?
Is there some Silver Bullet or Golden Hammer solution somewhere for Citrix problems?
Btw. My knowledge about Citrix is limited to this Wikipedia entry and this website... And a bit I've Googled...
There were some issues in the past with Published Delphi Applications on Citrix having no icon in the taskbar. I think this was resolved by the MainFormOnTaskbar (available in D2007 and higher). Apart from that there's not much difference between Terminal Server and Citrix (from the Application's perspective), the most important things you need to account for are:
Users are NEVER administrator on a Terminal or Citrix Server, so they no rights in the Local Machine part of the registry, the C drive, Program Folder and so on.
It must be possible for multiple users on the same system to start your application concurrently.
Certain folders such as the Windows folder are redirected to prevent possible application issues, this is also means that API's like GetWindowsFolder do not return the real windows folder but the redirected one. Note that this behaviour can be disabled by setting a particular flag in the PE header (see delphi-and-terminal-server-aware).
Sometimes multiple servers are used in a farm which means your application can run on any of these servers, the user is redirected to the least busy server at login (load balancing). Thefore do not use any local database to store things.
If you use an external database or middleware or application server note that multiple users will connect with the same computername and ip address (certain Citrix versions can use Virtual IP addresses to address this).
Many of our customers use our Delphi applications on Citrix. Generally speaking, it works fine. We had printing problems with older versions of Delphi, but this was fixed in a more recent version of Delphi (certainly more recent than Delphi 2007). However, because you are now running under terminal services, there are certain things which will not work, with or without Citrix. For example, you cannot make a local connection to older versions of InterBase, which use a named pipe without the GLOBAL modifier. Using DoubleBuffered would also be a really bad idea. And so on. My suggestion is to look for advice concerning Win32 apps and Terminal Services, rather than looking for advice on Delphi and Citrix in particular. The one issue which is particular to Citrix that I'm aware of is that you can't count on having a C drive available. Hopefully you haven't hard-coded any drive letters into your code, but if you have you can get in trouble.
Generally speaking, your application needs to be compatible with MS Terminal Services in order to work with XenApp. My understanding is that .NET applications are Terminal Services-compatible, and so by extension should also work in a Citrix environment. Obviously, as you're suffering some problems, it's not quite that simple, however.
There's a testing and verification kit available from http://community.citrix.com/citrixready that you may find helpful. I would imagine the Test Kit and Virtual Lab tools will be of most use to you. The kit is free to use, but requires sign-up.
Security can be an issue. If sensitive folders are not "sandboxed" (See Remko's discussion about redirection), the user can break out of your app and run things that they shouldn't. You should probe your app to see what happens when they "shell out" of your app. Common attack points are CHM Help, any content that uses IE to display HTML, and File Open/Save dialogs.
ex: If you show .chm help, the user can right-click within a help topic, View Source. That typically opens Notepad. From there, they can navigate the directory structure. If they are not properly contained, they may be able to do some mischief.
ex: If they normally don't have a way to run Internet Explorer, and your app has a clickable URL in the about box or a "visit our web site" in the Help menu, voila! they have access to the web browser. If unrestrained, they can open a command shell by navigating to the windows directory.