Workaround for calling from InDesign on Mac Acrobat
With the help of @Test username and @Gilad D, I could get my original problem about 90% fixed. Now, I need to tie everything together in order to solve this puzzle. This puzzle called Acrobat from a script on Mac InDesign.
Windows users have no trouble because BridgeTalk is available for their use, allowing them to call Acrobat directly from InDesign script. Mac users, on the other hand, have been cheated by Adobe. BridgeTalk does not work with Acrobat on a Mac. Unfortunately, where I work, I found myself in the unenviable position to require a script (written in JavaScript/ExtendScript) InDesign to call Acrobat to a simple page of replacement function. And, of course, our computers here at work are all Macs.
With the help of the above, I, at least, got most of the way. I discovered that AppleScript can be used to call Acrobat and do things. And there is a 'doScript()' JavaScript function, which allows the scripts to another language to be run inside a JavaScript script. Unfortunately, I ran into a wall when have AppleScript to save a file, but at least I can have call a function of the JavaScript script folder level to take care of her for me, I looked for work. Yes, you can see the complications here.
So what must happen, then, is a JavaScript script that calls an AppleScript script which in turn calls another script JavaScript that runs inside Acrobat. Phew! Talk about a script-reception! But I was actually able to make this work! However, I ran into a little snag.
You see, I need to pass a variable through each of the three layers of scripts so that it works. I'll post what I have so far.
First of all, the top-level script, which runs inside InDesign. This is just a test script to make sure that it all works before I integrate it with the real InDesign script:
var fName = "testfile2.pdf"; var aFName = new Array; aFName.push(fName); scriptFile = new File ("/apache HD/Users/apache/Documents/unlockCover.applescript"); app.doScript(scriptFile, ScriptLanguage.APPLESCRIPT_LANGUAGE, aFName);
Now, the AppleScript file (the middle layer), you can see being referred to above:
on run argv set unlockedFile to item 1 of argv as text tell application "Adobe Acrobat Pro" do script ("unlockCover(" & unlockedFile & ");") end tell end run
This should, in theory, finally call the last script (low level), which is a JavaScript file saved inside the box at the level of the files for Acrobat, so that it runs automatically as soon as the launch of Acrobat and the function remains in memory to be called at any time:
var unlockCover = app.trustedFunction(function (fName) { app.beginPriv(); var myDoc = app.openDoc("/g/ ArtDept/Product Templates/ ProofCover/proof_cover.pdf"); myDoc.replacePages(0, "/apache HD/Users/apache/Desktop/Old samples/407471 Folder/407471_cover.pdf", 0, 0); myDoc.saveAs("/apache HD/Users/apache/Desktop/" + fName); myDoc.closeDoc(true); app.endPriv(); });
There are the real meat of it. These four lines between "app.beginPriv ();" and "app.endPriv ();" are those that this is all about. However, I get an error message when I try to run the script at a higher level:
End of line but found consistent application or review.
If I send a call to each of you scripting gurus out there, how can I put the last nail in the coffin of this monster and call it a day. I'm pretty sure 100% that the problem lies in trying to pass the argument ("aFName' in the top-level script) for the intermediate level AppleScript script. Any ideas?
Problem solved.
I played with it a bit more and discovered that it was, indeed, passing the variable of AppleScript script that was the problem. I used 'on run argv', I read on some site earlier today as the way AppleScript handles the arguments given. More recently, however, I discovered that JavaScript uses a table defined as 'arguments' whenever AppleScript him passes a variable. So, on a lark, I decided to try to use 'arguments' the other way ' round (I also had to add an extra set of quotes in the line "do script" AppleScript seems to save strings to variables without them):
set unlockedFile to item 1 of arguments tell application "Adobe Acrobat Pro" do script ("unlockCover(\"" & unlockedFile & "\");") end tell
And who did! I can now pass a variable all the way from code JavaScript/ExtendScript InDesign JavaScript Acrobat low-level code top-level! YAY!
Tags: Acrobat
Similar Questions
-
BlackBerry smartphones cannot put ringtone for calls from a contact
Hello
I'm BB deprived and update android to 6.0.1.
I can set the ringtone for calls from a contact form but does not work.
Please help me what should I do?
BR
Hi @rmoldershaw & @farhood
This is a known issue that is fixed AAF518
Thank you!
-
How to configure margins for printing from InDesign books?
Good evening
Please, I need help to solve this problem.
I have created a book (made many documents - INDD files) InDesign. So far so good... I would like to print this book (he has 9 chapters, which means, 9 INDD added to this topic). However, I set each document as 'facing pages', but the margins of each page are different.
It has:
RIGHT - 1 centimeter
LEFT - 1.4 cm
INTERIOR - 2 centimeter
OUTSIDE - 1 centimeter
The problem is that some documents end with a right-hand page, and the following document begins with a right-hand page too (so margins become a problem because I have to send to the printer shop and margins must be accordingly). Some chapters have only a single page, so that it follows a unique page template, but I need to deal with pages...
In order to set the margins, I created two master pages and margins applied to them.
Then, I applied these master pages to the membership of all documents (INDD) of this book.
Please, I need your help to solve. Thanks in advance!
If you allow your page numbers in the book to be "continue from previous document" file, your pages will take the correct position.
Like this:
-
Do a WSClientException for calls from WLP in ODSI
Hi ODSI gurus.
We have developed a WLP application that calls using Web Services mediator ODSI data services Client JAR.
The application generally works very well, but sometimes during the tests this error pops up: com.bea.dsp.das.exception.DASException: com.bea.dsp.das.ws.WSClientException: cannot locate the corresponding response message in the SOAP body
If we try to perform the same operation again it works fine, and these operations normally works with the same parameter values. It seems WLP receives an invalid response to ODSI, not found errors in the ODSI server log.
When we turned on these indicators at WLP to check if ODSI returned a message no valid in the SOAP response, it seems that we get a response that contains an invalid content of debugging
-Dweblogic.StdoutDebugEnabled = true - Dweblogic.webservice.verbose = true - Dweblogic.wsee.verbose = *.
I put the error message for reference, can you please help us on how to get this resolved.
Kind regardsresult = das.getImovelArea (CompanyCode, CountryAcronym);
I suspect that you could share the object das between calls. Try (and destroy) create das object for each call and see if the problem goes away.
-
How to create a layout portrait vertical page for ipad from indesign
Kindly support me to create this page
Tell me how to create a lay out for the cover image and background text
Looking forward to hearing from you soon,
Thank you and best regards,
Ajwan AroujeI invented myself,
Thank you
-
HI -.
I'm pretty much a beginner to learn to use InDesign. I thought to start with a simple project to a Microsoft Word document, plain text, well formatted and lets learn how to make an iBook.
However, even if the text is nice in my InDesign document, when I export to ePub and then open in iBooks, all text formatting is lost.
Where can I learn about the export of my InDesign document with formatting intact?
Thanks in advance!
This is the last tutorial: http://www.lynda.com/InDesign-tutorials/InDesign-CC-2015-EPUB-Fundamentals/374187-2.html
-
I have a mac with el capitan on it. This computer is not going to used for the design, but I need Acrobat 9 put on. I have Acrobat 9 on a CD, I did drag the file in my folder of the application and double-click the Acrobat pro icon, nothing happens, I'm stuck.
You must install, copy... and 9 version does not work with El Capitan
Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)
-also a TEMPORARY security change https://forums.adobe.com/thread/2039319
-the guardian https://support.apple.com/en-au/HT202491
-
I want to transfer my Photoshop CS6 of Windows to Mac. My drive is a single Windows software. How to migrate from Windows to Mac. I don't see how to contact adobe to ask directly. Thank you, I do not want to subscribe to Photoshop CC cloud or buy a new Mac Photoshop CS6 disk.
You must ask for a swap of platform your PC CS6 cleaner and install CS6 on your Mac with the new Adobe series provide you. A product for another language or version of trading platform
You can also still buy perpetual CS6 700 $ $1000 Standard extended.
You can always buy CS6 products by calling a call center of Adobe, but why would you? Creative Cloud features will take your creativity further with more ways to create, collaborate and share. To purchase by phone, call the 800-585-0774.
-
I need to create a PDF from InDesign file that people can change in Reader or Acrobat
I need to create a PDF from InDesign file that people can change (for example, change a name of 'John' to 'Johnny') of Adobe Reader or Adobe Acrobat. I already looked at forms, but they do not keep your police, faces and sizes colors and just do everything is selected as a form of black text, 12pt, Times New Roman.
Can anyone here help me?
Vincent,
If you use Acrobat pro, build your .pdf file, and then save it as (french version):
... so that everyone using Acrobat Reader (or Pro, of course) can change the file .pdf (with restrictions), add comments...
If you want to try to 'protect' your .pdf file, you can try with this (in the menu 'Preferences' (french version)):
-
I can receive but cannot make calls from Mac
Hello
I try to have calls using my iPhone connected to my MacBook Air, but I have this message "your iPhone should use the same iCloud and FaceTime account.". This is something that surprises me because I can receive calls from my MacBook, but I can't make calls from my MacBook. There's someone who have / had the same problem?
Thank you
CO
OS X El Capitan: use your Mac to make and receive phone calls
Make calls
FaceTime: Enter a phone number in the search field and then click the Audio button or click on Audio to see your recent calls.
-
We can make calls from mac, mac is on ethernet and iphone in wifi (with the same network).
I tested it and it works. What I did:
First of all, I activated the WiFi and ensured that it connected to the same segment as the iPhone. Tested a certain number, and it worked.
Later, I turned off the WiFi and checked that we are always on the same subnet as the iPhone.
Tested the number and it worked again.
Leo
-
My browser is blocked for security reasons. Code error-QFR5000RT11C. My incoming connections in open State distance. Then I got the call from the United States 1 (866)986-3669, I picked up the phone, but they put the phone down. No matter what? Help, please.
It's probably a SCAM. Do not call these numbers. Force Quit Safari and reopen it by holding down the SHIFT key.
Ciao.
-
I received a phone call from microsoft technology who wanted to go on my computer & difficulty a Trojan horse, which is on my computers (more than one computer in my house). If I don't get this fixed right away, I could lose my computers & will not work to full capascity as before the Trojan horse was built-in on my computers in the last 10 days. I was very leary about it wanted to check into that first. He said he could remember at an agreed time. So I set up to 22/05/12 at 4:30 pm p.t.. Is it a scam? This should be an international alert to all users of mircosoft for msn & email clients. They would come by phone now. SO WHAT IS GOING ON HERE? !!!
Hello
It's a SCAM!
Avoid scams to phone for tech support
http://www.Microsoft.com/security/online-privacy/avoid-phone-scams.aspxIn the United States, you can contact the FBI, Attorney general, the police authorities and consumer
Watch groups. Arm yourself with knowledge.The Internet Crime Complaint Center (IC3) is a partnership between the Federal Bureau of Investigation
(FBI) and the National White Collar Crime Center (NW3C), funded in part by the Bureau of Justice Assistance
(BJA).
http://www.ic3.gov/complaint/default.aspxNo, Microsoft wouldn't you not solicited. Or they would know if errors exist on your
computer. So that's the fraud or scams to get your money or worse to steal your identity.Avoid scams that use the Microsoft name fraudulently - Microsoft is not unsolicited
phone calls to help you fix your computer
http://www.Microsoft.com/protect/fraud/phishing/msName.aspxScams and hoaxes
http://support.Microsoft.com/contactus/cu_sc_virsec_master?ws=support#tab3Microsoft Support Center consumer
https://consumersecuritysupport.Microsoft.com/default.aspx?altbrand=true&SD=GN&ln=en-us&St=1&wfxredirect=1&gssnb=1Microsoft technical support
http://support.Microsoft.com/contactus/?ws=support#TAB0Microsoft - contact technical support
http://Windows.Microsoft.com/en-us/Windows/help/contact-supportI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">->
-
Received a phone call from someone who has not been named (call from a blocked telephone number) saying that Microsoft would block my computer within 24 hours due to virus, we have been forward to microsoft. He said we had a laptop and gave us a serial number. We do not have a laptop. Was it a scam call or this person really used by microsoft? He wanted me to enter an address to give him access to my computer. I refused. Any information you can provide would be appreciated.
Hello
Yes, it's a SCAM!
Avoid scams to phone for tech support
http://www.Microsoft.com/security/online-privacy/avoid-phone-scams.aspxIn the United States, you can contact the local police to the FBI, Attorney general, and
consumer watch groups. Arm yourself with knowledge.The Internet Crime Complaint Center (IC3) is a partnership between the
Federal Bureau of Investigation (FBI) and the National White Collar Crime Center
(NW3C), funded in part by the Bureau of Justice Assistance (BJA).
http://www.ic3.gov/complaint/default.aspxNo, Microsoft wouldn't you not solicited. Nor would they know if any errors
It exists on your computer. So those are the frauds or scams to get your money or
worse to steal your identity.Avoid scams that use the Microsoft name fraudulently: Microsoft has no
for you unsolicited telephone calls help fix your computer
http://www.Microsoft.com/protect/fraud/phishing/msName.aspxScams and hoaxes
http://support.Microsoft.com/contactus/cu_sc_virsec_master?ws=support#tab3Microsoft Support Center consumer
https://consumersecuritysupport.Microsoft.com/default.aspx?altbrand=true&SD=GN&ln=en-us&St=1&wfxredirect=1&gssnb=1Microsoft technical support
http://support.Microsoft.com/contactus/?ws=support#TAB0Microsoft - contact technical support
http://Windows.Microsoft.com/en-us/Windows/help/contact-supportI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
I got a phone call from someone who said they were from microsoft and my computer was in danger, unless I paid 130 pounds for a new warranty, is it a scam?
Hi Debra,
It's a SCAM! Microsoft does not make that neither have they partners that do and don't they hire contractors or individuals or even to find volunteers to do. There are probably thousands of these companies out there do every day - we get two or three posts like this (or more) each day ask about it. You are lucky who have recognized the scam enough not to be sucked in and eventually identify theft, infections, hacking your computer, convince you to buy software or services you either did not need or that do not really exist at all and all sorts of nefarious stuff. You'd be surprised how much contact us AFTER THAT that they realized they had been duped asking what to do. Don't waste time talking to these people, not give them any personal information it is, don't be fooled by what they can get allows you to see on the computer - in fact, not do anything they suggest on your computer or even to visit Web sites they recommend and for the love of God don't give them access to your computer.
Microsoft knows this is happening, but with these companies popping up like dandelions, or closing and changing names when discovered and operating mainly from abroad, it would take an army of lawyers to sue each other. They do the best they can, but they are just too many and more added every day. People need to pay attention to these things. They occur not only by telephone, but also by e-mail, instant messaging, mail and all the ways imaginable. Forget not that Microsoft doesn't this and hang up or remove the emails or messages or mail from someone claiming that they do because they know the information on your computer or that you want to get information from you to confirm your account so that it will not be closed and asking you your name of user and password and all sorts of other personal information. Microsoft DO NOT!
See below for additional information on this topic and what to do and how Microsoft works:
http://www.Microsoft.com/security/online-privacy/msName.aspx
http://www.Microsoft.com/security/online-privacy/phishing-scams.aspx
I'm glad you don't get captured by these crooks and save yourself a big headache. Continue to use the same caution and you should do fine.
Good luck and best wishes!
Maybe you are looking for
-
Re: Satellite L505 - webcam driver installation may not be completed
SATELLITE L505-10V The webcam did not work at all, so I uninstalled, in order to re - install. Apparently, the driver is the http://se.computers.toshiba-europe.com/innovation/jsp/supportMyProduct.do?LNG=28&service=SE#tab3; an appropriate Unfortunatel
-
HP Photosmart 5520: printer wireless disconects
my printer keeps disconecting from my wireless modem, I get a message "scan of the computer is currently unavailable" can you please help
-
SQL Server Services could not be installed
I did everything I could think of to get this installed successfully. Anyone out there have any suggestions for my delima? I asked around and PERSON DO seem to be able to help with the installation. I'm installting SQL server 2005 on a BONE in 200
-
Try to load software PhoneTree and I continue receiving ADODC error code. What should I do to install the software? How can ADODC error be corrected? I have Windows VISTA
-
Hello, many times when I want to close my computer, he hung in the message "Waiting for shut down ', and after about 10 min, it restarts and displays this error: More information about the problem:BCCode: 9fBCP1: 0000000000000004BCP2: 000000000000025