Using Print settings with Chromium Embedded Framework 3 - delphi

I'm using the Chromium Embedded Framework in my Delphi XE7 application through the DCEF3 version.
Loading web pages through the TChromium object works fine. I also managed to get printing to work.
Problem: I don't seem to find how I can set the specific printing settings through the TCefPrintSettings in ceflib. The class is explained here, but I don't seem to be able to find out how to use it.
Anyone here that can point me in the right direction? That would be very much appreciated!
Thanks

CefPrintSettings is relevant in the context of CefPrintHandler which is only used when running on Linux. To my knowledge there is little control over print settings in CEF.
http://magpcss.org/ceforum/apidocs3/projects/%28default%29/CefPrintHandler.html
See a similar question here http://magpcss.org/ceforum/viewtopic.php?f=10&t=13036&p=26102

Related

What would be the best way to create a firefox plugin for taking desktop screenshots?

I need to create a firefox plugin that allows a user to take screenshots of any part of their desktop and have them uploaded to a server. There seems to be lots of plugins for screen capturing a webpage, but nothing for capturing anything outside of firefox. So after a little research I have not found much information on how this might be possible. I don't want to resort to a using a java applet but I will if that is my only option.
Does anyone have advice on how I might create such a feature?
Thanks
I don't think a Firefox addon is the most appropriate approach here. Maybe split the task into a Firefox addon to offer the "upload to a server" component and a native app to do the desktop screenshot (or just integrate with existing screenshot tools).
If you're worried about complicating the installation process for end users, you could look into bundling the addon component and native app into a single installer (e.g. MSI on Windows, RPM on Linux, etc.). You'll have to come up with different apps for each platform you want to support (and maybe even each version - e.g. Windows XP vs Windows 10).
Whatever you decide, you'll probably need to create a more specific question to get further help here (there's no simple Firefox.Addons.API.TakeScreenShot() answer I'm afraid).
Also make sure you're using the right terminology - a plugin is the deprecated NPAPI approach whereas addons are still supported.
I'm actually working on taking native desktop screenshots just in the last coupel of days. I'm using js-ctypes. My work goal is the same exact thing to, upload to server. If you would like to collaborate I am very open to it! We can chat about it on #jsctypes irc channel :) irc://moznet/jsctypes (Mibbit IRC WebApp) If you don't know js-ctypes thats ok i can handle that while you can handle uploading techniques, and an editor on canvas :) The editor is a huge part of it, you can see my ideas/plans here: https://github.com/Noitidart/NativeShot/wiki/NativeShot
I'm really really interested in a collab on this!
I'm still working on windows right now, the color is messed up: https://github.com/Noitidart/NativeShot/tree/digitanks-method
I was just about to start OSX work following this example here: https://developer.apple.com/library/mac/samplecode/SonOfGrab/Introduction/Intro.html and here: Take ScreenShot without Window
You can install the addon from that branch and click the icon that gets added to the toolbar, it will take a screenshot with 3sec delay and then append it to the body of the selected tab. (Windows only right now)
Doneskis baby check it out: https://addons.mozilla.org/en-US/firefox/addon/nativeshot/
Got some quirks. Released it as v1.0 though. I'm working on Android support, pretty close. I need to flesh out the editor tools. Please let me know if you're willing to collaborate.

Windows 7 integration with Delphi

I need components to integrate my app to Windows 7. I'm talking about the taskbar's ability to have progressbar, buttons, text and so on.
What is the best you know?
I don't know about components, but I've seen a few blog posts that explain how to implement this yourself. Check out http://www.drbob42.com/examines/examinC5.htm and http://alex.ciobanu.org/?p=215, for example.
Daniel Wischnewski is developing some Windows 7 components for Delphi.
This video on his blog, demonstrates some of the features.
There's a package of Windows 7 components, free with source, at delphi.fsprolabs.com. The best I can say is that the components perform as expected, when you work out how to use them: the implementation is not very elegant and I found it hard to get started with them. Mason Wheeler's link to DrBob's post will get you to about the same point but you will gain useful knowledge along the way.
There is also a project hosted on goolge code from The unknownones with a component set
called TaskbarListComponents.
It looks to be a very nice and a complete implementation.
You can see them in action here.
http://www.vimeo.com/14291783 TTaskbarListThumbButtons and TTaskbarListOverlayIcon
http://www.vimeo.com/14354328 TTaskbarListProgress
http://www.vimeo.com/14356627 TTaskbarlistFormTab and TTaskbarlistControlTab

Online programming editor

For a school project i need to write or use a online programming editor. It is a part of a bigger project. I thought of a java application, php/html/javascript or flash.
I have a couple of things i could do:
Find a good working application and edit it so it works with the rest of the project
Find good parts for a editor and make it working my self (syntax highlighter, auto-indent, autocompletion, etc.)
Combination of those two
Does anybody know a good editor or have tips for this project or a editor?
Thanks for reading,
Leon
For the syntax highlighting and basic editing part, check out my recent question Textarea that can do syntax highlighting on the fly?
Solutions presented there:
CodeMirror
Bespin (Mozilla only, but great)
For the rest - autocompletion etc. - ... Check out the Wikipedia article Comparison of JavaScript-based source code editors
Interested to see what other suggestions come up.
Bespin comes to mind. Though it might be too bleeding edge, depending on how the rest of the project is built/meant to be used (but hey, programmers love bleeding edge).
If you decide to use PHP/HTML/CSS/JavaScript, see GeSHi for syntax highlighting.
I have a side project developed with ACE.
It connects to your server through SFTP and allows you to create new files,read and edit all from your browser with your file tree at sidebar.
Demo at TePe
Code at Github Repo
I found Cobalah Editor it's also built on CodeMirror but with some customization. There are some themes available we can set, increase or decrease font size.

Delphi 2009 gives access violation error when integrated debugging is enabled

I'm pretty much at my wits end at the moment.
I am using Delphi 2009 (Update 3) on Vista (service pack 2) and without fail, if integrated debugging is enabled and I try to run a project, it will give an access violation and the project will crash out.
This happens even if I haven't even added any code to the default project template.
The only way I get around this is by disabling the integrated debugger, (then I may as well just be using a text editor and a command line compiler...)
Does anyone have any advice for this? I've been googling without much success.
Thanks in advance.
I have used this combination without any problem.
Have you tried at at a clean machine (just installing delphi and try a "hello world" application?
Go to Project > Options, Compiler tab. Uncheck Optimization, check stack frames. This seems to be the usual advice in the faqs on Delphi debugging. It may only apply to the earlier versions of Delphi but is worth trying.

Skins in delphi7

I wish to skin my aplication and have noticed that there appears to be no obvious way to do this.
I am used to skinning files for java and wondered if there was any way of changing the appearance of the "standard" delphi7 application.
Edit:(taggs)
Have you looked at SpTBXLib?
http://www.silverpointdevelopment.com/sptbxlib/index.htm
I use the Developer Express Skins library. This works well for standard components, and their own. You can create custom skins, or use their standard ones which include nicely designed haloween and winter ones. They also have a ribbon control to make your app Office 2007 look.
I've seen positive comments about AppFace, but I have not tried it.
Looks like there are some relevant links in this forum thread
Appface looks promising with the extreem looks and the need for just 2 lines of code. but thats a lot of money to make four buttons and a editbox look nice.
linkrank does the same thing but does not look as good and costs even more this time about 180.
Again both seem to boast that you only need 2 lines of source code and theme file.
the link to given forum did not seem to yeild any results apart from these two.
Would be br8 to find a free version even if i have to put in more work myself.
Edit: "suipack" is yet another tool for the same job
Re-Edit: VCL seems to be the basis of what is needed here some copenents listed on
http://www.vclcomponents.com/catalog/Delphi_Skin
Re-Edit-2: found a freeware version here
Re-Edit-3: added coponent but not only is there no help file with this it seems to be incomplete as throws a cannot find "skins.pas" exception
http://www.vclcomponents.com/Delphi/Form_Enhancement/VclSkin-info.html
gone evaluate it and post results back up.
After spending hours installing it or not,, as the case was,, installed the unicodecontroler and the toolbar2000 but the toolbar200 seemed to have a issue with the library path and after i fixed it it would not alow me to reinstall, i had to do this as SpTBXLibDsgn_*.dpk would not install due to not finding reference of tb2kdsgn_d7.dpk..
this results in me going ARRRRRGGGHHHHHH and bashing my head on the wall, the only method for creating skins for free in delphi7 comes as 7 manual installs(as a noob this was hard)
and thenn when i make a boo boo it wont let be uninstall,,, ouch
looks like there will be no styles for me....
Edit: if anyone wants to go for styles i seriously suggest the multiinstaller that i didnt see untill i had currupted my tbk2000 package :(
Another skinning component set for Delphi is AlmediaDev
AFAIK, there are two Delphi components available to skin your application without requiring any code, but both are not free
VCLSkin
SuiSkin

Resources