What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

PDF Expert attaching wrong file

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0
I have created an Adobe form for ordering using Adobe Acrobat XI. The form is working well on the PC and in PDF Expert except for the mail to button.

I created a command button to mailto a hard coded address, attach the form and populate subject and body.

Everything is working except for the attachment.

The process is:

I open up a form in PDF Expert. I create an order and save as in PDF Expert to the documents folder.
I have two tabs open now. One is the original file and the other is my saved file.
Whilst on the newly saved file, I click on the Email form. This is using generic javascript code to email a form.
The email is created, the To:, subject and body is correct. However the attachment is actually the original form.

To get the correct attachment I have to either close out of the file or move from one tab to another. When I reopen or jump back to the file it attaches the correct file.

Does anyone know what causes this behaviour? It is like there is a cache of the file name until you move out of the file. It is not ideal to move off it so I would love to work out why this is happening.

Regards

Vera
 

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,132
Reaction score
15,337
Location
Milton-Freewater, OR
Sounds like a glitch between whatever extension you are using for the Javascript command and PDF Expert. Since you can't edit/change the behavior of PDF Expert, about all you can do is try tweaking your Javascript to see if you can get different results.

I kind of duplicated your workflow with a form I created in PDF Office and using the Workflow app. I was able to follow the steps you outlined (copy a form, edit that form, use my workflow to automatically send an email with that attachment from the open tab of that document). Each time PDF Expert gave me a choice I chose to send/copy the original document (not flatten it), if that makes any difference.

All three times I got the form and content I meant to send.

Of course this is not conclusive, but it suggests the problem may lay (or at least be corrected) in the script/app you are using to send the file.

That's all I can think of. Good luck.
 
OP
E

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0
Thanks for your response. I do get the option of the type to send and I do flatten.

Are you able to provide the code you used? My javascript is very limited and I have learnt on the job creating the form.

Would be greatly appreciated.

Regards

Vera

Sounds like a glitch between whatever extension you are using for the Javascript command and PDF Expert. Since you can't edit/change the behavior of PDF Expert, about all you can do is try tweaking your Javascript to see if you can get different results.

I kind of duplicated your workflow with a form I created in PDF Office and using the Workflow app. I was able to follow the steps you outlined (copy a form, edit that form, use my workflow to automatically send an email with that attachment from the open tab of that document). Each time PDF Expert gave me a choice I chose to send/copy the original document (not flatten it), if that makes any difference.

All three times I got the form and content I meant to send.

Of course this is not conclusive, but it suggests the problem may lay (or at least be corrected) in the script/app you are using to send the file.

That's all I can think of. Good luck.
 

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,132
Reaction score
15,337
Location
Milton-Freewater, OR
Workflow doesn't use javascript (at least where you can see it). Instead you have a bunch of actions that you can drag into an execution order. Some have options you can set in the action, some don't. Some pass information, some act on it, etc. If you can handle even basic javascript programming you'll get the hand of Workflow quickly. It's kind of like building a block diagram of your script, except this block diagram is the script.

The workflow I used to do this is too simple to bother diagramming. It just used the Send Email block. It takes whatever input you give the workflow, creates an email with the address, subject and content you've specified, then sends it. You can either let it pull up and populate a normal email dialog, then you tap Send, or you can have it automatically send.

If you do it automatically you need to authenticate your email address and password in Workflow. This wasn't much fun (since all but one of my email accounts needs 2-step verification) but I got it to work.

I'll try my workflow again with a flattened copy and see if it makes a difference, but I rather doubt it will.
 
OP
E

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0
Thanks for the response. I use workflow with SharePoint but not sure if it is the same as you mean.
 
OP
E

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0
Actually I don't get the message to flatten when I email. I get it when I click on button to Save As. When I click on my button Email Form, it just brings up the email message with all the variables correct but not the attachment. Very strange.

Thanks for the response. I use workflow with SharePoint but not sure if it is the same as you mean.
 
OP
E

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,132
Reaction score
15,337
Location
Milton-Freewater, OR
Actually I don't get the message to flatten when I email. I get it when I click on button to Save As. When I click on my button Email Form, it just brings up the email message with all the variables correct but not the attachment. Very strange.

Yes. I get the same thing, but I get the flatten option again when I use the Workflow action from the share sheet. Either one should do the job as far as the sent email is concerned.

With my current workflow, I don't see the email before it is sent. I'm just sending them to myself and checking what I receive.
 

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,132
Reaction score
15,337
Location
Milton-Freewater, OR
I threw a quick preview into my workflow so I could see the PDF before it was sent. It was the correct PDF.

Both tests I made with flattened documents worked correctly.
 
OP
E

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0
I have had a look at the app and created a workflow to create an email. However I am not sure how to add an attachment or attach the workflow to PDF Expert. Do you have any pointers on that?

Vera


Yes. I get the same thing, but I get the flatten option again when I use the Workflow action from the share sheet. Either one should do the job as far as the sent email is concerned.

With my current workflow, I don't see the email before it is sent. I'm just sending them to myself and checking what I receive.
 

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,132
Reaction score
15,337
Location
Milton-Freewater, OR
When you are editing the workflow tap the gear/settings icon near the top right. make sure you have Action Extension option selected. You can also restrict what kind of input the workflow accepts. I rarely do this last part.

ImageUploadedByTapatalk1447801238.935700.jpg


The only action in your workflow should be the Send Email action. Type in the address fields and the Subject. If you want the email to be sent immediately without intervention, be sure to turn off the Show Compose Sheet switch. It will ask you to provide the email address and password for the account you want to use to send. This is where I ran into trouble with the two-step verification.

It took a while to verify, and didn't actually work. The first time I used the action it asked for the email and password again. From then on it's remembered.

ImageUploadedByTapatalk1447800870.511163.jpg


That's it for the workflow itself.

In PDF Expert, when you are ready to send the form, use the share icon (box with up arrow) and choose the Open In option. You'll get another chance to flatten the document, if you haven't done so already. Then it will show you the Share Sheet.

In the bottom set of gray icons, slide over until you see the More option. Use it to turn on Workflow (you won't have to do this again).

ImageUploadedByTapatalk1447800898.408489.jpg


Now choose the Run Workflow icon. Tap on the workflow you saved. (If you failed to choose Action Extension in the workflow's options, it will not show up here)

ImageUploadedByTapatalk1447800918.832901.jpg


The workflow will spring into action, showing you the steps as it does them. If you left Show Compose Sheet on, then it will populate the email address, subject line, add the attachment, then wait for you to tap Send. If you think you might want to add comments or adjust the subject line, this is the way to do it. If the Show Compose Sheet switch is off, then it will send the email, and close without any intervention (unless it asks you for your email address and password the first time)

ImageUploadedByTapatalk1447800950.932890.jpg
 
Last edited:
OP
E

eddoria

iPF Noob
Joined
Nov 16, 2015
Messages
11
Reaction score
0
Thank you so much for the help. I have actually been able to create the workflow and run it in PDF Expert. It does attach the correct file.

I have some questions:

Does everyone who would use the order form in PDF Expert need to have workflow installed as well? Or can I share the workflow to multiple ipads?

Is it possible to grab info from form fields to populate the subject? Ideally I would like to have the customer name and date of order captured in the subject.

Your help is so gratefully appreciated.

Vera

When you are editing the workflow tap the gear/settings icon near the top right. make sure you have Action Extension option selected. You can also restrict what kind of input the workflow accepts. I rarely do this last part.

View attachment 68769

The only action in your workflow should be the Send Email action. Type in the address fields and the Subject. If you want the email to be sent immediately without intervention, be sure to turn off the Show Compose Sheet switch. It will ask you to provide the email address and password for the account you want to use to send. This is where I ran into trouble with the two-step verification.

It took a while to verify, and didn't actually work. The first time I used the action it asked for the email and password again. From then on it's remembered.

View attachment 68764

That's it for the workflow itself.

In PDF Expert, when you are ready to send the form, use the share icon (box with up arrow) and choose the Open In option. You'll get another chance to flatten the document, if you haven't done so already. Then it will show you the Share Sheet.

In the bottom set of gray icons, slide over until you see the More option. Use it to turn on Workflow (you won't have to do this again).

View attachment 68765

Now choose the Run Workflow icon. Tap on the workflow you saved. (If you failed to choose Action Extension in the workflow's options, it will not show up here)

View attachment 68766

The workflow will spring into action, showing you the steps as it does them. If you left Show Compose Sheet on, then it will populate the email address, subject line, add the attachment, then wait for you to tap Send. If you think you might want to add comments or adjust the subject line, this is the way to do it. If the Show Compose Sheet switch is off, then it will send the email, and close without any intervention (unless it asks you for your email address and password the first time)

View attachment 68767
 

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,132
Reaction score
15,337
Location
Milton-Freewater, OR
1: You can share the workflow itself, but each person and/or device needs the Workflow app installed to use it.

2: Maybe. There are several actions that can view and extract information from files. Getting something like the file name or creation date is fairly easy. I don't know if it can be done with fields a PDF form, or how difficult it would be.

If it can be done the workflow would probably be very specific, and only work with that particular form; though I could be wrong. I may play with this a bit. You've made me curious about how much information Workflow can expose in a file.
 

Most reactions

Latest posts

Top