We have a new convenience function in DynaPDF. It's RenderPageToImage. Here is some example code:
dim pdf asnew MyDynapdfMBS
//wheretogetPDFpagesdim f as FolderItem = SpecialFolder.Desktop.Child("test.pdf")
//wheretowritedim t as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
pdf.SetLicenseKey "Pro"//ForthisexampleyoucanuseaProorEnterpriseLicensecall pdf.CreateNewPDF nilcall pdf.SetImportFlags(pdf.kifImportAll + pdf.kifImportAsPage)
//renderthepagecall pdf.RenderPageToImage(1, t, 72, ImageView1.Width, ImageView1.Height, DynaPDFRasterImageMBS.krfDefault, DynaPDFRasterizerMBS.kpxfRGB, DynaPDFMBS.kcfJPEG, DynaPDFMBS.kifmJPEG)
Now as you see, we create an in memory PDF object with CreateNewPDF and passing nil. We set import flags to get all page items and to import page as page and not as template. Next we open the import file. This is now the initialization. You can keep the PDF object in memory for use later. To get a page to a JPG file, we add a page and import a page replacing the current one. This way we have now the first page of the source PDF in memory. We close page and start rendering. This little function takes a few parameters. First the page number of the current in memory PDF you want to render. In our example, this is the first page. Be aware that if we imported page 5 of the PDF file, the in memory page number would still be one. Next it takes a folderitem for the destination path. We also pass width and height of the target size. Next we can give some render options, but we simply pass default. We use RGB format, a JPEG compression and a JPEG file format. Done.
If you run the code with our plugins, you can see the rendered page in the jpg file. Cool, isn't it?
Update: If you pass nil for the file parameter, the image is created in memory. You call GetImageBuffer to get the data and FreeImageBuffer to release memory.
You can add pictures to a PopupMenu control with our plugins for Cocoa targets. I just made an example project to show this. It's included in our prerelease. See also NSPopUpButtonMBS class.
Arbed is the solution to convert the umlauts and special characters from Mac Roman to UTF-8 for importing very old REALbasic projects into current Real Studio.
If you do iPhone development, don't forget to install iPhone 4.x simulator. (see Downloads section in Xcode preferences). This way you can debug both with 4.x and 5.x simulators as they show differences.
If you filled a bug and got this status as an answer after waiting some time, it can be disappointing. Whether it's Real Software, Apple or some other software vendor.
If I report a bug, I'm never sure whether it is a bug or just my fault. I'm not sure whether it's going to be fixed or not. And if it is fixed, will I get it soon? Will they fix my old version with .1 version update or do I have to wait for the next major update?
With the decision of not fixing the bug, the status is clear. I can now find a workaround or decide myself that I won't fix it. Sometimes I would prefer if the companies answer soon that they won't fix it than if I have to wait years just to get a message that the problem is no longer reproducible.
Fixed bug with plugin calling GetFolderitem wrong. This affected ColorSyncProfileLocationMBS class.
Added NSExpressionMBS class.
Added NSSortDescriptorMBS class.
Added NSPredicateMBS, NSCompoundPredicateMBS and NSComparisonPredicateMBS classes.
Added NSMetadataQueryResultGroupMBS class.
Added CFBookmarkMBS module. This is the new way with Mac OS X 10.6 to handle alias files.
Fixed problem with WindowsSystemTrayMBS class. Some features like balloon didn't work on Windows XP, because we now compile plugins with Windows 7 SDK. And with Windows Vista some structure size changed which causes Windows XP to not show balloon.
Added groupForUniqueId or personForUniqueId to ABAddressBookMBS class.
On linux we now load gtk and gdk libraries with .0 in path name if needed.
WinHIDMBS class now can use more than 520 bytes for background listening buffer.
Don't miss the chance to meet so many Real Studio developers in one place, here in Europe.
I mean if you want to meet more, you'll probably have to go Real World next year, but that's 4479 miles further to west from Frankfurt.
Recompiling 400 plugins from scratch takes a whole day!
(more than 10 hours on a Mac with 4 cores with VMWare for Windows and Linux compilers.)
Moved my Linux build machine to Ubuntu 10. Linux plugins now require glib 2.3, 2.4 or 2.7 depending on the features they use. We need 2.7 currently for OptimizePNG, PortAudio and ZipFile. If that is a problem for you, please contact us.
"I am considering buying Real Studio and I believe that your plugin would provide the functionality I need." I see a lot of people the last weeks writing similar emails to me and I like it.
Sending data on WinHIDMBS class fails if the size of the data doesn't match the packet size. Mac system fills up with zeros, but Windows simply silently fails.
Moved to Mac OS X 10.7.2. I got both Xcode 3 and Xcode 4 installed, so I can create PPC plugins. Still I may not do PPC any more for all projects. For example I may drop it for Filemaker plugin or SQLite Extension. Instructions here
From Mail migration I now know that I have 323443 emails on disc. Spotlight says indexing hard discs will take 3 weeks, but it finished after 10 hours.
We got a new third party example: EasyStatusItem. Also the CURL OAuth project is updated. Both will be in the next prerelease.
If you use our plugins to connect to Oracle database and you want to update a LOB field in a table, you need to use 'FOR UPDATE' in the SQLSelect to actually have the row locked for update. Else you get error 22920.
If you plan to use Filevault 2 in Mac OS X 10.7.2 and you had previously the PGP whole disc encryption installed, you can get intro trouble.
Because as long as PGPwde.kext is in the /System/Library/Extensions folder, your Mac will not boot.
You can of course go in target disc mode and remove the file by mounting the disc on another Mac with Lion.
For me, it's the third time PGP WDE shocked me and certainly the last day it will be allowed to exist on my Macs.
On our conference day, 4th November 2011 in Frankfurt/Main, Germany, you can meet Real Studio developers from around the world including:
Stéphane Pinel from Real Software
Geoff Perlman from Real Software (via video chat)
Jens Boschulte from DynaForms GmbH
Simon Larkin from QiSQL
Bob Keeney from BKeeney Software Inc.
Christian Schmitz from Monkeybread Software
and more than 30 Real Studio developers.
Get in touch, share ideas and brainstorm new projects. Learn about what other developers do with Real Studio. And get the latest information about future of Real Studio from Geoff Perlman and Stéphane Pinel.
The biggest Real Studio event until Real World 2012!
At least we have more people on this event than on realcon2011 last May or realcon2010 last year.
This are moments where I think about how much he influenced my life.
Think about where mobile phones would be if Steve didn't start the iPhone project at Apple?
How would laptops look today if Steve didn't push engineers for perfection to get battery life longer or the device thinner.
I wish Apple all the best and I'm confident that Tim Cook and his team will continue to run the company successfully.
Today in 4 weeks, we'll be sitting at the bar with some people. That will be the evening between the training and I know from a few people that they'll be there on the evening. So we can meet at the bar and decide what we do for dinner.
More details for the Real Studio Database days on the website.
UTF8 validation makes RegEx very slow. We'll disable it in next plugins by default. Also we'll make sure with ConvertEncoding that all strings are UTF-8.
That is globalization: Our new floor tiles are from the U.A.E.. They came by truck over 6646 km and still aren't expensive. Check the route here
If you see message about deprecated CPSGetFrontProcess function in console, don't worry about it. That's an internal framework function called by some other Apple framework. Seems like one side of Apple doesn't care for other side of Apple deprecated something.
Next plugins will have ImageMagick with 8, 16 or 32 bit Quantum size. If you miss an ImageMagick function in the plugin, please email and we'll add it.
Bob blogged about our Real Studio Database Days on bkeeneybriefs.com. I hope he can make it.
I just got a nice new example project from Christophe De Vocht. It shows how to open a HUD window in Cocoa and adds controls inside. The controls provided are PopupMenu, Checkbox, Slider and Button.
This project requires Mac OS X 10.6 or newer.
Please try it. We'll include it in the next prerelease, but you can download a copy here: hudobjects.dmg
Thanks to Christophe De Vocht.
Whether you app is made with Real Studio, Filemaker, Xcode or something else, you'll need to learn about sandboxing.
First you can read Apple's Documentation.
The important thing is to write an entitlement plist file. This can be a text file saved with some text editor (like BBEdit) and saved with extension .plist. Or use the Property List Editor application coming with Xcode.
As you see it's simply an xml file with some special keys and values. Here we turn sandbox on and than define that we want user selected files to be read or written.
Once you have your compiled Carbon or Cocoa application and your entitlement file, you can sign your application. For that you need to name the certificate. If you are Mac Developer, you probably have already a Mac App Store 3rd party developer certificate, so you can use that one. The line goes like this:
Now you can run your app on Mac OS X 10.7 and see the sandbox: Yes in the activity monitor application.
It seems like our NSSavePanelMBS class works just fine in sandboxed application. Or do you see an issue?
A client recently asked what is new in SQL and ChartDirector plugin. This question is not easy to answer. First we have a lot of shared code between our plugins. The picture handling, the string handling, the file access and a lot of other key areas as common between plugins. A fix for one plugin, fixes it for all.
But a few things are unique to plugins. So I found this items for this year:
Still a month left and we already have more then 30 people from eight countries: Germany, Austria, Belgium, Sweden, France, United Kingdom, USA and the Netherlands. Want to join? Sign up here.
We'll try to improve and learn from previous events. First big difference is that Monkeybread Software hosts the Real Studio Database Days and not Application Systems Heidelberg. Second is that we have one big room for everyone. With tables, wireless network and a brand new video projector for the presentations. Also I want to note that this conference day on 4th November is not a repetition of realcon2011. It's a new event and we asked speakers to show new content.
For the evenings, we expect to handle it very easy. Between 6 and 7 pm, we meet in the hotel bar and depending on the weather and pleasure, we may decide to have dinner right in the hotel restaurant or take the subway to the city center and visit some nice dinner location.
You want to show something? We still have spotlight slots available for short presentations on applications made with Real Studio.
PS: If you emailed Nils and you did not get responses, don't be angry. Nils left ASH end of May 2011 just after realcon2011, so he is no longer involved in Real Studio events.