Asger Alstrup wrote:
> Hi,
>
> I attach some code that can open PDFs using DDE, which is the API
> interface. It also allows you to go to a specific page, and so on. It has
> been tested with a range of different Acrobat versions on all windows
> versions. It would be simple to extend this with other methods, such as
> close, print and so on.
Very nice, Asger. Of course, when you post code, you have to expect
questions from thickos like me who try and read it.
Where does 'gstring' come from? There ain't no typedef to
std::string.
class AcrobatReader {
public:
AcrobatReader( std::string const & appName );
};
AcrobatReader::AcrobatReader( gstring const & an ) :
appName( an ),
ddeId( 0 )
{
...
}
I note that
'bool firstTime;'
sin't actually used (or even initialised).
You use 'retCode' in the constructor to flag whether acroread was found,
etc but if not you don't disable the class or throw an exception. Why not?
Do I miss something?
Moving on, this class is used to control a single
'acrobatReaderExecutable' running a single 'file', right? One way to
extend it would be to store a vector<string> files, rather than a single
file, no?
Finally, and most importantly, how do you envisage this class being used?
I'd imagine using it as the basis of a stand-alone process communicating
with LyX through pipes connected to its STDIN,STDOUT,STDERR streams.
However, We have no such communication code in LyX ATM, so the first thing
to do would be to add such a capability to LyX.
Do I read you correctly?
--
Angus