- PDF files

From: Campbell, Robert D (UK Edinburgh) <"Campbell,>
Date: Mon, 07 Feb 2005 09:34:42 +0000

----boundary-LibPST-iamunique-331750578_-_-
Content-type: text/plain



I have written a small Command to open a 'PDF' file.
It works for me, but has several problems, in particular:

1 - A customer might have a different version of Acrobat.
2 - She might keep in in a different path
3 - or not have Acrobat
4 - or prefers to use GSview etc.

It is also not memory safe!

Does anyone know a better approach?

Thanks

Robert



MODULE WandsAcrobat;
IMPORT WinApi, SYSTEM;
CONST
  Acrobat = 'C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe ';

PROCEDURE Display*(IN path, file: ARRAY OF CHAR);
  VAR
    cmd: WinApi.PtrSTR;
  BEGIN
    cmd := '012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789';
    cmd^ := Acrobat + SHORT(path + file);
    IF WinApi.WinExec(cmd, WinApi.SW_SHOW) = 0 THEN END
  END Display;

END WandsAcrobat.


    DevDebug.Unload

    "WandsAcrobat.Display('P:\MyProject\MySubsystem','MyComponentSpecification.pdf')"

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-331750578_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0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gc3lzdGVtIGFu
ZCBub3RpZnkgdGhlIHNlbmRlci5ccGFyDQpZb3Ugc2hvdWxkIG5vdCBjb3B5IGl0IG9yIHVzZSBp
dCBmb3IgYW55IHB1cnBvc2Ugbm9yIGRpc2Nsb3NlIG9yXHBhcg0KZGlzdHJpYnV0ZSBpdHMgY29u
dGVudHMgdG8gYW55IG90aGVyIHBlcnNvbi5ccGFyDQoqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxwYXINClxwYXINCi0t
LSBCbGFja0JveFxwYXINCi0tLSBzZW5kIHN1YmplY3QgSEVMUCBvciBVTlNVQlNDUklCRSB0byBi
bGFja2JveEBvYmVyb24uY2hccGFyDQpccGFyDQp9


----boundary-LibPST-iamunique-331750578_-_---
Received on Mon Feb 07 2005 - 10:34:42 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:25 UTC