1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
| var bitmap = new Bitmap(aktuelleBreite, aktuelleHoehe); var graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White); var deviceContext = graphics.GetHdc(); var parameters = new Bibliothek.Parameters { ... };
var pageRect = new Bibliothek.RECT { top = 0, left = 0, right = aktuelleBreite, bottom = aktuelleHoehe }; var rect = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Bibliothek.RECT))); Marshal.StructureToPtr(pageRect, rect, false); Bibliothek.FunktionPdfExport(handle, aktuelleSeite, deviceContext, ref parameters); graphics.ReleaseHdc(deviceContext); bitmap.Save(@"C:\bild.bmp", ImageFormat.Bmp); |