problems with Image() in wxPDFdocument
BlitzMax Forums/Brucey's Modules/problems with Image() in wxPDFdocument
| ||
When I run this code I get an 'Unhandled Memory Exception' Error. But the pdfdocument.bmx in the samples folder runs fine. I just can't get my head around this :-( Thanx for any help! |
| ||
Rather than running test() like that, you should probably do it from inside wxMax :New MyApp.run() Type MyApp Extends wxApp Method OnInit:Int() test() End Method End Type I imagine that wxWidgets has things it needs to initialize, and without kicking off a wxApp instance it never gets the chance to. Oh, and interestingly, if your gif has alpha transparency Acrobat Reader won't show it (at least on my v7 it won't). :o) |
| ||
Wow!!! Thanx so much, it works now! Brucey, your support is just fantastic! I've tried a gif with alpha and another with index transparency but my version of Acrobat Reader (v8) won't show any of them. PNG pics with alpha works fine. |
| ||
Try a gif with no transparency at all - worked fine here. Mind you, these days you probably want to stay away from gifs altogether. You can always convert them to something better ;-) |
| ||
Yup, gif's with no transparency work ok but as you say, gif's are not worth the trouble anymore and I converted that beautiful green apple into a PNG32 file, drilled a big whole into it and alpha masked the shadow and it renders great in the pdf doc! |
| ||
Nadia, you could, btw, use OpenURL() to open the PDF for you. This should work on Linux and Mac too. ...rather than tying yourself to platform specific code ;-) |
| ||
Thanx for the tip about OpenURL()! The nice part about ShellExecuteA(), which I used in the code above is, that I can replace the "open" parameter with "print" and it will send my pdf file direct to the default printer (via Acrobat Reader). But yes, it is win32 specific code :-( |