New topic: Macintosh Save to PDF button
<http://forums.realsoftware.com/viewtopic.php?t=30552> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message jvs Post subject: Macintosh Save to PDF buttonPosted: Mon Oct 19, 2009 12:28 pm Joined: Sat Oct 21, 2006 6:03 pm Posts: 27 If I know the user has pressed the Save to PDF button rather than the Print button, I can set the print resolution, but HOW DO I KNOW THE USER HAS PRESSED Save to PDF ??? And, is my asssumtion correct? (I can do it in windows, but that's because it's actually printing to PDF) Top Karen Post subject: Re: Macintosh Save to PDF buttonPosted: Mon Oct 19, 2009 12:37 pm Joined: Fri Sep 30, 2005 8:53 am Posts: 690 jvs wrote:If I know the user has pressed the Save to PDF button rather than the Print button, I can set the print resolution, but HOW DO I KNOW THE USER HAS PRESSED Save to PDF ??? No you can't ... I believe as far as the OS (and so RB) is concerned you are just printing to a printer using a specific print driver. Either set Max*Resolution to -1 when opening the "printer" and use what you get back, or set resolution to a specific value that should look fine printed like 300 DPI before you open it. - Karen Top jvs Post subject: Re: Macintosh Save to PDF buttonPosted: Mon Oct 19, 2009 1:05 pm Joined: Sat Oct 21, 2006 6:03 pm Posts: 27 A PowerPC accepts 300dpi. An Intel machine resets it to 72. 72 won't work ... and windows uses 1200dpi. So, there's gotta be a way. Top Karen Post subject: Re: Macintosh Save to PDF buttonPosted: Mon Oct 19, 2009 1:22 pm Joined: Fri Sep 30, 2005 8:53 am Posts: 690 jvs wrote:A PowerPC accepts 300dpi. An Intel machine resets it to 72. 72 won't work ... and windows uses 1200dpi. So, there's gotta be a way. I have a PPC BUT i have run into the 72 DPI thing as well when setting Resolution to -1. Here is the printing code I use to get around that. Then PS.HorizontalResolution (and vertical) gives 300DPI for me ... It looks redundant but it's what I needed to do. Maybe it will work for you Code:Dim PS as PrinterSetup = New PrinterSetup If PageSetupString.LenB > 0 then ' Have a saved Setup String PS.SetupString = PageSetupString Else PS.MaxHorizontalResolution = -1 PS.MaxVerticalResolution = -1 If NOT PS.PageSetupDialog Then Return False PageSetupString = Ps.SetupString End if PS.MaxHorizontalResolution = -1 PS.MaxVerticalResolution = -1 Dim g as Graphics = OpenPrinterDialog(PS) If g is NIL then Return False // Actual printing code follows Top jvs Post subject: Re: Macintosh Save to PDF buttonPosted: Mon Oct 19, 2009 1:45 pm Joined: Sat Oct 21, 2006 6:03 pm Posts: 27 Yep ... that's pretty much what I've got ... Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
