How to start writing a virtual printer for Mac OSX? - macos

I am new to mac OS world. Please suggest me how to start writing for a virtual printer which fulfill the following requirement:
Software installation process should install it on the target system as a printer driver which should be available for selection from any application installed on the target system.
Can export image(can be any file type like word document, image etc) to pdf.
Welcome for providing any suggestions like how to go for it(Api's, Frameworks) or any links for proof concept projects/content which can help me out.

OS X comes with PDF printer support built-in. You don't need to build anything if you select print to PDF in the standard OS X application Print dialog. You can also easily supply links to specific directories or scripts to run in conjunction with printing to PDF. Google for OS X PDF Services.

After lot of research I have found that below link and knowledge of cups(www.cups.org/)will give you great help to create your own custom virtual printer.
Please refer to this link:-
http://developer.apple.com/library/mac/#samplecode/SampleRaster/Listings/sampletopdf_c.html#//apple_ref/doc/uid/DTS40009295-sampletopdf_c-DontLinkElementID_17
Also search for "CUPS-PDF print to pdf" great help guys.

Related

How to create windows custom virtual printer to send document to remote server

I am pretty new to windows development and I want to create a package that installs a virtual printer. This virtual printer when selected during the printing process, sends the file to a remote server (REST API), nothing more, no rendering, no UI.
I tried googling regarding this but couldn't find any good docs or source code on how to create a driver.
Any help would be much appreciated.
You can use one of the Microsoft Printer Driver Samples from here.
I think that you might be able to maybe SampleOpenXPS sample

can not save microsoft office2011 files for mac by using osxfuse for developing

I am using osxfuse to develop a network disk with our service on mac osx, when I open a office2011 file and save in my disk, it will appear this error as below:
"you cannot save while the file is in use by another process.try saving the file with a new name."
but it is fine for office 2016. I am confusing about this and do not know how to resolve it?
who can help you?
I am working on my own FUSE file system and also had this problem. I found that in my case it was because I mounted the file system with the "noapplexattr" option.
It looks like MS Word requires applexattr.
MS Office apps uses extended attributes a lot. So your fs should has support of xattrs at least via apple double files (._fileName)
Also i found that MS Word likes to use exchange operation while saving files.
But it also may be an issues in your read/write/move methods implementation.
When i have such doubts - i use loopbackFS example app and just compare how it works with my FS.

How to create installer for mac software

I've created software using Filemaker and I have to create an installer.
I already done it for Windows but I have to create one for Mac too. The installer will be able to install the software, install a font and ask the serial number.
Can someone help me?
I think Apple used to (still does?) offer a program with Xcode that was called PackageMaker, but I don't think they still do. It might be available from a previous version of Xcode. I found surprisingly little information about it online.
However, the command line tools that it was based on, pkgbuild, productbuild, and pkgutil , seem to be installed on my laptop running Yosemite with an Xcode utilities installation.
I would check out the accepted answer to a similar question here on Stack Overflow. It looks quite detailed, but I think it's going to be very advanced work to get a successful package created.
The above is what you probably want if you want your installer to use Apple's own Installer app. If all you want is to create an installer that gets the job done, I would probably use FileMaker itself.
Create a FileMaker file that stores your solution within a container field, lock it down with security and scripting, use Export Field Contents to get the solution file and your fonts to the right places, perhaps with some supporting AppleScript that makes use of the command line. Use FileMaker Advanced to package this up as a runtime solution and all the user has to do is double-click the runtime app and you can guide them from there. Once the installation is complete you could even open the installed solution for them and prompt them at that point to enter a serial number.

How to tell if a specific file extension has a default program to open it? e.g. PDF, in Windows 7

I want to know if there is a specific entry to check in the registry to see if there is a default program associated with a specific file type?
My main example would be a PDF. Documentation in my company is mainly PDF. We want to be able to distribute the latest Adobe Reader because, generally, a lot of the PCs using my company's software will not have access to the internet.
During installation, I want to be able to check if the computer we are installing on already has a program to view PDF files. If yes, carry on. if not, then run the Adobe distribution as part of the install.
I'm focused on Windows 7 PCs, registry entry(ies) I can read programatically to see if, as an example, PDF has a valid program to open it.
No this option not exists. Although HKCR\'PROGID'\shell\open may points to the installed software.
User MC ND have wrong answer. See my screenshot:
During installation, I want to be able to check if the computer we are installing on already has a program to view PDF files. If yes, carry on. if not, then run the Adobe distribution as part of the install.
So I have pdf reader (!!!) with no associations. MC ND you are still thinks, I have no pdf reader?
From console
assoc .pdf to get the "fileType" associated to the extension. Once you have the fileType (ex. AcroExch.Document.11):
ftype AcroExch.Document.11 to get the associated program.

Create "printer" to print as PDF to SQL database

I would like to create a "printer" that would display as an available printer when a user tries to print a document.
If this printer is used, a window will be displayed showing the available locations in the database that the document can be stored. The document will then be converted to PDF format and the resulting blob data will be inserted into the database.
I found a similar topic here: How to create own XP printer driver. However, some of the answers suggest using RedMon (which does not look like it currently supports Windows 7). The solution should be supported in Windows XP and up.
I thought I would start a new question to see if anybody has done anything more recently than that previous question.
Any help would be greatly appreciated.
Thanks.
You don't need RedMon. The top answer to the question you linked (the answer from Oleg) is precisely the answer to your question. Just take the Port Monitor sample from the WDK and modify it to do as you need. However, you will also need a print driver in order to create a printer. For that you can use the Unidriver or Postscript drivers shipped with Windows. All you'll need to provide is an .inf file that will install and name your printer appropriately and a .ppd or .gpd file to describe its characteristics. Many examples of both can be found readily in the WDK or online.
using pdfcreator or bullzip pdf as a printer to create a pdf file in a folder and then using use some folder watchers (like 'Watch4Folder') in order to trigger a script (to insert the file into a blob field), in a way that you can create several folders so you can customize the target database by choosing diferent folder where to "print" the pdf file.
Sorry for my english
Claudio

Resources