Windows PDF Printer from a service - pdf

I have a windows app that occasionally (like once a day) saves a report in PDF Format at a predefined folder location all silently.
I use Bullzip for this.
So app basically just prints to bullzip like it would a normal printer and bullzip silently handles the rest.
I am now trying to convert this app to a proper service but I am struggling to find a PDF printer service that can handle connections from a service,
Has anyone any suggestions

Win2PDF works from a Windows Service if you print silently by setting the file name using the Windows API, or by using the PDFDefaultFileName registry setting. If you use a registry setting, you must use the "HKEY_LOCAL_MACHINE\Software\Dane Prairie Systems\Win2PDF" location because the HKEY_CURRENT_USER locations are not available from a Windows service.

Related

Filelauncher save files

Let's say i have a list of files. When I click on one it will get downloaded and saved into the app's isostore. Then it's opened in the default viewer/editor on the windows phone like this:
Windows.System.Launcher.LaunchFileAsync(file);
But when I make some changes to the file and want to save it, it can't, because it's a read-only copy of the file. Is there some way to get write-access to the file or else some public/shared (iso)store that every app has access to? The goal is to download the file, edit it and upload it back to the server.
Per the Windows Phone documentation, the Windows.System.Launcher.LaunchFileAsync API is not implemented for the Windows Phone platform:
Windows Phone 8: This API is not implemented and will throw an
exception if called.
In regards to saving the file so that it can be accessed by other applications, this is not possible, unless the file you are dealing with is a photo, in which case you could use the Media Library API.

Print PDF from Navision Application Server

I have problem printing reports to PDF through bullzip from Navision Application Server (1) if user is not in Local Admin group (2). Only under both conditions.
In Nav code I'm doing the following: init bullzip automation object (set all parameters to suppress GUI), run report to print document to virtual bullzip printer, catch output file. Thats it. Straight as a rail.
I have two environments: Windows Server 2008 and Windows 7 (different versions of Nav, but this is changing nothing). On Windows 7 it just do nothing (but works if user is admin). On server I can see error in Event Log (translated to English)
Faulting application gui.exe, version 9.8.0.1599, time stamp 0x517126dc, faulting module USER32.dll, version 6.0.6002.18541, time stamp 0x4ec3e39f, exception code 0xc0000142, fault offset 0x0006f52f, the process ID 0x3bc, application start time 0x01ce562238369fa9.
Gui.exe is a part of bullzip.
If I run the same code from Nav Classic Client, or from the same NAS launched in command line, or under local administrator account, or if i put the NAS user in local admin group - it works just fine.
To solve this problem i need to find out one of two and how to fix it:
What is the difference between local admin and regular user that could cause application to crash in non-interactive mode (service) under regular user account.
What is the difference in running NAS as service and as command line that could cause application to crash when run as service.
What I've tried so far: extend non-interactive desktop heap, give user all local privileges that admin have in gpedit. Not works. Don't know direction for further digging.
Any alternative free pdf printers advices are welcome.
This question is still actual. Though I've managed to setup PDF printing with PDFCreator. The tough part was to let several different NAS to print simultaneously. And now the setup have a bottleneck - PDFCreator's printing queue. With bullzip automations it could be avoided.
We've had some cases where third party DLL's have crashed within NAV due to permission restrictions.
The only effective way we could narrow down the files that it was trying to access was through using Process Monitor to try narrow down what was causing permission issues.
We found a folder within System32 to do with the System's Network Profile that some DLLs use. On that note, NAS's and such should be run under a domain account.
I think re-installing the application will do that,
Just make sure you are uninstalling each bullzip and ghost script,
Now Ghost script is tricky thing, if you are installing 32 bit over 64 then you are having problem,
refer this download link download appropriate version, install it,
and then install bullzip, after downloading new version from here
this will do..
then also if any problem(if you are using application for automation, you require new com object..) refer Forum, that explains most of application interface problems..
where you need to use public class PdfSettings with namespace bioPdf.
I hope this will help ..

Why might CorelDraw's publish to pdf feature produce different size files depending on which group the executing user account is in?

As part of a project I am developing a web service to convert CDR files to PDF. I am using c# to trigger CorelDraw's publish to PDF feature. The conversion is run as a command line utility called by the web service.
I am hosting the web service in IIS. I have created a user account for the website's application pool in order to be able to run CorelDraw (I was unable to get it to work with the default application pool and configuring DCOM).
I am getting PDF files of different sizes depending on whether I manually log in to the account and run the conversion program or trigger it through the web service from another machine. I seem also to get different file sizes depending of whether the application pool account is in the users or administrators group.
Can anyone suggest why this might be happening and what I can do about it?
pdf files sometimes have partial or complete typeface (font) data embedded in them. Maybe access permissions to the font source are different for the different credentials you're using and Corel is leaving them out if it doesn't have access to them.
In Adobe Reader, right click, choose Document Properties, and look at the Fonts tab. Check both the bigger and smaller pdf files, and see if they have same set of font data loaded.

IIS7.5 Excel printing not working when run from server

I'm having trouble generating a PDF-file with PDFCreator from Excel macro (using VB.NET 3.5 and Interop).
Through Windows login as the domain user I can run the macro directly from Excel and everything works fine (a pdf file is printed and saved), but when published and run as the same user from server there is no printer found.
In the macro I know this can be solved by setting Application.ActivePrinter ("PDFCreator on Ne00:" in my case), which again works when I run directly from Excel but not from server. So what I wonder is how to make it possible to set ActivePrinter when running on server?
It worked with previous IIS version on the server (6.0). I have tried giving the domain user access permissions (e.g. in DCOMCNFG), the PDFCreator is set up correctly and accessible, don't really know how to approach this.
Using Office Interop from server-like scenarios (IIS/ASP.NET/Windows Service...) is NOT supported by MS - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
Another point is that since windows vista there have been several security-related changed which prevent doing any "desktop-like" things (for example printing...) from a Windows Service...
Alternative to Interop:
To create PDF from Excel file there are several libraries out there which do not use Excel and work fine in server-scenarios - like Flexcel, Aspose.Cells, SpreadsheetGear...
It works even in IIS8 also.
Give Microsoft Excel Application sufficient Permission from DcomConfig (Eg-IIS_IUSRS,Network Services etc)
take care of impersonate user id and password provided In Web.xml. do not make it true if not necessary. it worked for me when i removed this.

Acessing Printers and Faxes folder on a network machine in asp.net

From my vb.net code I am trying to set a printer name for the crystal reports printing
rpt.PrintOptions.PrinterName="\johnKing\HP LaserJet 2200 Series PCL"
But when I go to windows-->Start--> Run and enter \JohnKing
It is showing me Printers and Faxes folder and Scheduled task folder. But when I open Printers and Faxes it will show the adderess as Printers and Faxes on JohnKing.
From my web application I want to sent the Printer name is the name shown above.
Please help
I don't believe you can access a network printer this way. I think you need to add the device locally first.
Share the printer on the system with the printer installed
Connect to the share on the system running your application
User the local printer name in PrinterOptions.PrinterName
You could probably connect and install the printer programatically if need.
I get the impression that you want to print to a local printer from the web application. You might be able to do this with ActiveX or something, but to my knowledge, the printer needs to be installed on the web server.