Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie PDE Questions



On Thursday, June 19, 2003, at 10:15 PM, Marc Stibane wrote:

(Since I am not getting my own post for more than 12 hours, I repost it)

Rajesh wrote:
http://developer.apple.com/techpubs/macosx/CoreTechnologies/graphics/ Printin
g/ExtPrintingDialogs/Integration/chapter_8_section_9.html
Check this out and the whole chapter and make the code changes in the PM
accordingly.

The only such function (Create Printing Dialog Extensions Paths) I could
find in the whole project is in RasterModule.cp, included in the main
SamplePM. So it seems that the PM should be put into the folder
"SamplePM" inside of /Library/Printers.

PMs and PDEs should be installed in /Library/Printers/. The guideline is for them to share the same parent directory in /Library/Printers/. The sample code in CreatePrintingDialogExtensionsPaths specifies that the PDE is called PrintQuality.plugin and it's located in /Library/Printers/SamplePM/. Typically you would install your modules in /Library/Printers/vendorname/ where 'vendorname' is your company name.

(BTW, what is the shortcut of "Find Selection" (cmd-H in MPW, THink C,
CodeWarrior etc.) in PB, now that cmd-H means Hide?)

However, this function only builds a path for the "PrintQuality.plugin",
not for the "OutputBins.plugin".

The OutputBins sample is for a PostScript printer with a PPD file that contains the OutputBin keyword. In Jaguar, that PDE should be installed in /Library/Printers/PPD Plugins/. Note that in Jaguar, PostScript printing uses the CUPS print chain, not Tioga PMs. If your printers are PostScript printers, at minimum all you need to install are PPD files. If you want to customize the Print dialog UI for your printers, then you would develop a PPD Plugin, for which the OutputBins sample code should be used. On the other hand, if your printers are non-PostScript you have a choice. On Jaguar and later, develop a CUPS filter and supply a PPD file. Alternatively develop a PM and PDEs, and use the SamplePM and PrintQualityPDE as starting points.


Also the Installation Location settings in the project are
"/Library/Printers/Sample", not "/Library/Printers/SamplePM". Doesn't
matter, since PB only puts its built targets inside the build folder and
seems to ignore this setting. (What is it good for anyway?)

Yes, the installation setting in the pbproj should be /Library/Printers/SamplePM.


But no matter where I manually copy the built 3 plugins, whether into
/Library/Printers/Sample or into /Library/Printers/SamplePM, nothing
shows up in the print dialog (I tried TextEdit and PB).

Could it be that this PM-PDE only works with a HP printer? I notice
CFSTR("DESKJET 8") in the Initialize() function. I remember having read
that the Initialize function should test whether the correct printer is
selected and return a value which is used to determine whether the PDE
should be loaded or not.

The SamplePM is written for HP's deskjet printers. You cannot create a queue for the PM unless you have a USB printer that identifies itself as a DeskJet or DeskWriter (see the code in CreatePrinterBrowserModuleInfo).


Which brings me to the biggest question: How do you debug a PDE? If I
could set a breakpoint inside the Initialize() function, I might get a
clue whether the code gets called at all...

You can debug PDEs using PB and/or gdb but you have to get your PDE to be loaded first. That means creating a printer queue and selecting your printer in the Print dialog. If your breakpoints are never hit, my first piece of advise is to make sure you have valid UUIDs for your PM and PDE.


Marc Stibane
Fesh! email@hidden
Gotzkowskystr. 15 tel +49-30-3990 2690
10555 Berlin, Germany mobil +49-162-912 9388


In a world without walls and fences,
who needs windows and gates?
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.

References: 
 >RE: Newbie PDE Questions (From: Marc Stibane <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.