Error for PrintPDF code

Hello friends,
I am experimenting with the PrintPDF code.
I have not tried it but I am wondering if it is correct.
It looks like it begins with a “open Bracket” and closes with a different sign.

That’s a typo. It should be

printpdf {file="Invoices.pdf"}

Is there a reason not to use PrintToPDF instead?

Hi Dave,
Thanks for confirming the error.
Actually, I am trying to get my form to produce a PDF only on my desktop.
The following is the code I am using, it seem like it is working but I can not find the file after completion.
PrinttoPDF “~/Desktop/My Report.pdf”,“Form”,“Your form name”
(This was given to me by CooperT. I noticed while typing it in that there was no opening quote before My Report.pdf. Could that be the reason it might not be working?)

Tom got the syntax right.

~/Desktop/My Report.pdf

is all one string. There shouldn’t be any quotes in the middle of that. Where he wrote "Your form name" you should be writing the actual name of the form you are printing.

I am so sorry but I am getting lost.
This is what I would like to do in a procedure:
I have a form called “Tuition Accounting Statement 2019/2020”
I want to print this form as a PDF only to the desktop.
Can you please give me what the line of code should say?

Dave, you may have already submitted this, but if you haven’t gotten around to it yet, I just submitted the typo to the corrections system.

Here is the code:

printtopdf "~/Desktop/My Report.pdf","form","Tuition Accounting Statement 2019/2020"

That fixed it.
Thanks as always Jim for your help.

Hello friends,
I am still having an issue I can’t seem to work around.
Using the alertsheet function and selecting print preview everything seem to work fine and then it opens Acrobat to display the report. When I quit Acrobat I want it to go back to my date entry form in Pan X, remove all summaries and select all records. I can’t seem to do this because of Panorama using Acrobat to display the results.
Any help would be appreciated.

Here is my procedure:
Alertsheet “What do you want to display with this form?”,“Buttons”,“Preview,Print to PDF,Print,Cancel”

If info(“dialogtrigger”)=“Preview”
Openform “Re-Enroll/Tuition Listing”
Openform “Data Entry”

elseif info(“dialogtrigger”)=“Print to PDF”
printtopdf “~/Desktop/Re-Enrollment Tuition Payment Listing 2019-2020.pdf”,“form”,“Re-Enroll/Tuition Listing”
; openform “Data Entry”

elseif info(“dialogtrigger”)=“Print”
printtopdf “”,“Printer”,"",“orientation”,“Portrait”
; openform “Data Entry”

elseif info(“dialogtrigger”)=“Cancel”
; openform “Data Entry”



I don’t know of any way to cause Panorama to perform an action when you quit Acrobat.

Okay Jim,
I was just trying to get back to where I was in Panorama before I selected the Print Preview. I can do it manually removing summaries and selecting all records, but I wanted to make it easy on the operator without going through all the gymnastics.

Have you tried setting everything back to where it was by continuing the procedure after you have it open in Acrobat? It may or may not work. Panorama X has some problems with continuing procedures after a Print command.

The problem that it leaves Panorama X and open Acrobat for the Print Preview. When I close Acrobat it shows my data entry screen showing 148/159 records. I am trying to get back to where I was before selecting the command. I can do it manually but I am trying to make it easy on the operator. I want to automatically select all records and remove all summaries. Everything is fine until it leaves Panorama and goes to Acrobat.

Gerald, I think if you move the statement

Openform "Data Entry"

up so that it comes immediately after

if info("dialogtrigger") = "Preview"

then when you quit Acrobat, the Data Entry form will be on top. At least, that is what happens in my testing. And the summary records have been removed and all records have been selected.


You are correct Cooper. When I close Acrobat it returns me to my desktop but Panorama is not active. I have to click on the frontmost window of my Data Entry form which is great and then manually select all records.

One thing surprises me: that you still have to select all. There is a selectall statement in the procedure, and in my testing it does work as expected. Are you sure that all records are not selected when you quit Acrobat?

Yes Cooper, there ia a select all and remove summaries. The problem is that it can’t complete because when it returns on my desktop my database is not open and selected, I have to click on it. It makes sense that it cannot complete the procedure when the database is not active and open.
Maybe the only way to go if they want to see a 26 page preview is to write a PDF to the desktop and just open it in Acrobat and view it and close.

Thank you all for your suggestions but I have come to the conclusion that everything that you do in Panorama X needs to stay in Panorama. There really is a problem when you are doing a print preview and it had to open Adobe Acrobat.
The solution I have come up with is to printtopdf on the desktop. The operator can then open the PDF and view it or send the PDF to another team member.

I think your solution is the better approach. But I know that there are various ways that Panorama’s capabilities can be extended by using things like Applescript and Python. My abilities are very limited there, but I know they are out there.