Cant print to pdf on Windows

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Cant print to pdf on Windows

Post by dunbarx » Fri Mar 17, 2017 4:51 pm

On my Mac, where I develop, in the IDE, if I print a card with:

Code: Select all

  get the desktop folder & "/SubmissionDrawing.pdf"
open printing to pdf it
No issues, and if no such pdf file exists, one is created on the desktop as advertised.

So now I make a standalone, in one operation, for both Mac and Windows. The Mac standalone works just as it should. But the Windows (Windows 7) version will not create the pdf file. No errors, just no file. I don't like Windows, and this is only making it worse.

Anyone know how this can be?

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Cant print to pdf on Windows

Post by FourthWorld » Fri Mar 17, 2017 7:01 pm

What is the value of "the result" immediately after calling "open printing"?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2949
Joined: Sun Sep 23, 2007 4:58 pm

Re: Cant print to pdf on Windows

Post by SparkOut » Fri Mar 17, 2017 7:24 pm

Your code works for me (on Windows 10, LiveCode 9.0 dp 6)

Are you sure you have enabled "PDF Printer" in the standalone inclusions as well as the "Printing" and "Print Dialogs" options?

The file "revpdfprinter.dll" needs to be in the same folder as your standalone (not in the externals subfolder).

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Cant print to pdf on Windows

Post by dunbarx » Fri Mar 17, 2017 8:21 pm

Sparkout.

I did have all the inclusions.

But I had the .exe, a splash stack, on my desktop, even though I had the .dll file and the working stack in the "documents" folder. This always was enough to use and save the working stack.

But in order to print to pdf, the .exe has to be in the documents folder as well. I made a shortcut to the desktop, and all is fine now. But is all this commonly known?

Thank you.

Craig

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Cant print to pdf on Windows

Post by Klaus » Fri Mar 17, 2017 9:14 pm

Hi Craig,
dunbarx wrote:...But in order to print to pdf, the .exe has to be in the documents folder as well...
or the "revpdfprinter.dll" as well in the desktop folder.
That's the point, the DLL and EXE have to be in the same folder! :D

Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Cant print to pdf on Windows

Post by dunbarx » Fri Mar 17, 2017 9:42 pm

Klaus,

Just so.

I am making this up as I go along, so please tell me where I am off base. The bundle that comprises the Mac standalone contains the .dll file, as well as everything else, and so wherever the standalone sits, so do all the support files. If I simply place the single .app file in the documents folder, I can save at will, and all this without a separate .exe file that Windows (ptui) requires.

What threw me, being a Mac guy, was that Windows would work in the same way. :oops:

Craig

Post Reply