realbasic-nug
[Top] [All Lists]

printing htmlviewer in MacOSX

To: realbasic-nug@lists.realsoftware.com
Subject: printing htmlviewer in MacOSX
From: Wade Maxfield <wmaxfield@gmail.com>
Date: Sat, 30 May 2009 18:13:28 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com; dkim=neutral (body hash did not verify) header.i=@gmail.com
Delivered-to: listarchive@realsoftware.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=jZ9Hpusb0hYyOh96+ynb0v2j3Wu2VwkvW9r9TXy0ns8=; b=ZOyZYPwdWSYhKiZeTfHMxXD9F9a0c6ZFkblv9f7C1qfQ+QDEuGLTFmHXd6oa8OqPs7 8pHAHdZIVLXQkZ1f6Z3yO+ZvoDBHVaI2ZO5euRmZWGAT+atSs1fXUDcbVhAxUC6/z+lA y1WfjNCYJLqKRazkTCbJRC84XLpaXaFTeDV9k=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=rxcGjXGvu41518WAp98IYf9pVa/g4VtBObckHoqOSfmsw0fJ0L5VKWaMgXfsx7N9o1 7lRRMxcRSrVxfYXFvaqiFX9NQPisFBrTIXv9JfVEr7rmZAKoCtBF40sDtnHKVmtl6tF3 kTP9pNwYxxi/1hhe+/bJH7kE8vUjia05VKjjo=
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
  I am also trying to print the htmlviewer content in realbasic.  2009R2

 I have this code, thanks to Shawn Giese, software.sirkevi.com, and it
mostly works:

dim filestring as string
dim f, f1,f2 as folderitem
dim execString as String

 f = GetFolderItem("PointerToHTMLFile.html")
  f1 = SpecialFolder.Documents
    filestring = f1.ShellPath+"/cwoutput.pdf"

    if f <> nil and f1 <> nil then
      execString = "/System/Library/Printers/Libraries/convert -f "+
f.ShellPath +" -o " + filestring
      s.execute execString
  // added hoping would fix launch
      execString = "chmod a+rwx "+filestring
      s.Execute execString
//
      f2 = GetFolderItem(filestring)
      if f2 = Nil then Return
      f2.launch
    end if

  The problem is that f2.launch fails to launch the pdf file.  It is there.
If I Right-click and choose open in Finder, it launches in preview as
expected.  The "chmod" was added to see if the executable bits were needed,
then I gave it universal privs to see if any difference was made.

  Anyone know why f2.launch() fails? I'm f.launch() -ing a pre-made pdf file
in another part of the program, and that works.
  BTW, the convert --help shows that the default is "application/pdf" for
the created file, using "-j application/pdf" does not help this problem (It
was in there first).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>