Page 1 of 1

Cant print to pdf on Windows

Posted: Fri Mar 17, 2017 4:51 pm
by dunbarx
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

Re: Cant print to pdf on Windows

Posted: Fri Mar 17, 2017 7:01 pm
by FourthWorld
What is the value of "the result" immediately after calling "open printing"?

Re: Cant print to pdf on Windows

Posted: Fri Mar 17, 2017 7:24 pm
by SparkOut
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).

Re: Cant print to pdf on Windows

Posted: Fri Mar 17, 2017 8:21 pm
by dunbarx
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

Re: Cant print to pdf on Windows

Posted: Fri Mar 17, 2017 9:14 pm
by Klaus
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

Re: Cant print to pdf on Windows

Posted: Fri Mar 17, 2017 9:42 pm
by dunbarx
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