Copy link to clipboard
Copied
Is there a way to have a base template document and then import text and or pictures into the document from a SQL Server database? Or conversely, save the text that was entered into the file into the database? Thanks, I am new to inDesign and the APIs, any help is appreciated.
Copy link to clipboard
Copied
Straight up, no, there is no way.
There are a few third party plugins to help you do that.
Or you can hack your way by doing something like:
connect to the sql server either by using the Socket object or (better) by calling a outside tool
request the data you need preferably formatted as xml
process the xml and get the stuff you need into indesign.
If you do want to go that second route, please keep me posted on how is it going, as i am too scared even to attempt such a feat.
Copy link to clipboard
Copied
+ 1 to Vamitul. I built the system to populate templates from SQL Server 2005. Before I started, I came across some plugins what allow you to connect, but this did not work in my case. The first implementation of the system was build using socket, but I found a few problems with downloading large XML files, which I could not resolve, so eventually I used node.js server as a middleman to connect to sql server, request and display xml. The xml file was saved to local drive from ExtendScript using curl (I am on a mac) and then loaded as usual.
I have to say, it was quite a big project to get it off the ground, so plugin might be a better option. Just google and there are quite a few of them.
Finally, I came accross this thread Re: What is the most efficient way to import SQL-database data into InDesign CS6? suggesting usage of porky | JavaScript database interface & functions library for Adobe® InDesign®.
EDIT:
I started going through their source files just to see the approach and they do not support SQL Server, they do MYSQL and SQLight. They do have an interesting approach though, they use php ran locally to connect to database and get the data. If php is your thing it is probably worth to look into.
Copy link to clipboard
Copied
https://github.com/Adobe-CEP/Samples
Here is an example Extensions include DB access.
CEP engine with NODE.js and NPM provide easer way to access Database.
More Information is below:
https://medium.com/@HallgrimurTh/extending-adobe-cc-2014-apps-ba1d101e27da
Ten