Adobe InDesign Server examples - adobe-indesign

I'm new to Adobe InDesign Server and I'm having a hard time finding a good kitchen sink app. All the examples I got from the SDK seem to partially work. All I'm trying to do is use a master page from InDesign from the server side and edit certain text fields. For example placing first and last name in particular text fields. Does anyone know of a good place to get examples code that shows all the features or how I would approach this problem?

http://www.adobe.com/devnet/indesign/documentation.html#idserver Has a lot of resources that is useful when starting out. In particular http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/InDesignServer/ids-solutions.pdf includes a number of code examples for various common operations.
As to your specific example, the typical way to go about it is:
1. Get the page object from the master pages list.
2. Iterate over each text field on the page.
3. Somehow identify the fields, for example by setting the script label in the template document and checking the labels of each text field you iterate through.
4. Set the contents of the text field.

A lot of the official InDesign documentation is partial.
Jongware also hosts the complete reference documentation:
http://www.jongware.com/idjshelp.html

Probably the reason why teh IDS documentation isn't that exhaustive is that dealing with the server version is an extension of the classical indesign use. So the exception of some peculiarities detailed in the ids sdk docs, you will find most of the help with InDesign Scripting guides ;)

Related

Create Index page for ASCII doc

I have a lot of ASCII docs at different locations and I want to create an index page which should render these documents. But the condition here is that I want to list all the document link on the index page and if the user clicks on any link then only the document should be displayed. I don't want to display the documents below the table of content. I just want to display the table of content on the index page.
Is there any way to do this?
If I understand you correctly, you wish to generate a multi-document website, but you want an index page that displays just the TOC, with the other documents served elsewhere. I believe the best way to get this effect would be to generate chunked XHTML output using the DocBook toolchain. I believe this should be possible with Asciidoctor tools, but I have only implemented this particular post-rendering toolchain with the original (Python-based) AsciiDoc rendering tool, as documented here. This setup is configurable to generate a TOC index page that links to chunked output (you can configure the level of chunking).
As you have already figured out, AsciiDoc's automated TOC generation only works on the present document, which requires including the subordinate document to get their headings for the TOC. I can think of ways to sort of game this, such as to include just the heading of the included document (include::path/to/document.adoc[lines=1]) and then hiding even those headings with CSS or something. The problem is, the links in the TOC will be pointing internally, so you'd need to handle that somehow.
Another way is to use any of the static-site generators that support or can be readily extended to support AsciiDoc. What you're talking about is not an out-of-the-box feature that I'm aware of, but they all at least make it possible to generate an organized TOC-type navigation.

Pass an image get a list of URLs matching the image, HOW?

I'm essentially trying to do a reverse image search, i.e. I want to pass in an image and get back a results list of instances on the web where that image is found. I know Google's old API that did this is depreciated, I see some answers on SO (e.g. Google custom search for images only) that talk about doing an image search with Google's Custom Search API, but every time I dig into the code they are retrieving images from a string rather than what I'm trying to do. Is there currently any API that will help me with what I'm trying to do?
I'm sorry. I cannot write comments yet. How about this? https://github.com/tanaikech/goris
Recently, I found this. I don't know whether this is what you want.

How to edit numbers of Evernote notes, and make them sync?

I've been trying to format my Evernote notes (thousands of them) so that they are readable on any device.
I've accessed evernote storage on my Mac and saw folders of entries -- every folder contains a note.xhtml and a content.enml files, which directly stores note contents.
I can modify the *.xhtml file, and changes are reflected on Evernote client, but they just won't sync over to the server. Additionally, the *.enml file contains corresponding content to xthml file, but the change won't go there.
Is there any way I can neatly edit my notes, on the HTML level?
Thx!
In AppleScript, it's pretty easy to get and set the HTML. To actually manipulate the HTML you might want another language.
Here's how you read and write HTML content to a single selected Evernote note:
tell application "Evernote"
set noteList to selection
set n to item 1 of noteList
set extractedHtml to HTML content of n
set HTML content of n to "<p>Foo Bar</p><p>foo baz</P>"
end tell
Evernote provides some good examples of using AppleScript on their developer site. You can also use xsltproc for some more systematic manipulation. I have a read-only example of using xslt via AppleScript in a recent post of mine. This above little snippet might be enough of an example to tell you how to set the HTML content.
But, to give you a better answer, I'd need to know a little more about how you want to manipulate your notes. The above example just grabs the first item in your current selection and sets the content.

How to retrieve plain text from a formatted website to use in UIWebView

Not sure if what I want to do is possible, but what I am hoping to do is somehow gather certain pieces of text from a website, remove the header, footer, background, all formatting, and place it into my application in a scrollview or something similar...
I'll give you an example... Imagine I was making wikipedia's iPhone app, I want to download the information about the wiki on dogs, without the header, side bars etc, just the text. How would I go about doing this?
I understand that for this I have not provided any example code or what I've tried or started, but that's just because in this case I'm lost! That doesn't mean I want full chunks of code either. Any help will do. If this doesn't work, I will just have to make a 'mobile optimised' version of the webpages I want to include in my app.
Thanks
(Edit: the term I was trying to use was 'strip the web page of its HTML coding')
You may be going about this the wrong way, or perhaps even asking the wrong question.
Does the target website have an API or datafeed of some kind?
Can you get the information you need in JSON or XML format directly from the site?
I think you've misunderstood the technology. HTML is merely the framwork on which the formatting and data is hung.
Parsing the HTML page seems like an awfully big headache, I doubt you'll ever be able to get it to work, because almost all sites these days are partially or wholly generated on the server side, the page is only the result.
Some sites hide the information in memory and others get it dynamically through ajax for example, which means that simply trying to get the data by parsing the HTML will get zero data.
Another issue you should be aware of though, is that simply copying the data from generated websites may open yourself up to copyright issues.
You have to parse the html code and search for the part that you want and "throw" away the part that you do not need. This is more or less like bruteforcing and the code of the website should not change otherwise you are screwed. So you have to write the parser by hand with this method. But maybe there is a atom or rss feed and you can parse this one. This will be much more easier and you are not depending on the website layout because the rss/atom feed is just about the data. For parsing rss you could try out NSXMLParser.
And then you have to make a valid html page out of the data and present it in the UIWebView

Joomla: display of articles using RAXO All-mode PRO and JXtended labels

I'm currently working on a site that uses the 'RAXO All-mode PRO' module to display a list of articles on the home page, and the 'JXtended labels' component to display pages containing a list of articles associated with given labels. The front-end functionality in both is very similar - get a list of articles and display them.
Ideally, I'd like both lists to display articles in the same format. However, since each component/module has its own way of fetching the data, and its own template, they're currently inconsistent. What's the best way of going about resolving this?
I can envisage a common bit of code (a module? plugin? component?) that deals with the display of a list of articles, and has its own template for that purpose. I guess I'd then need to hack the existing module and component to hand over to this common piece. There's also the question of getting the same set of data - e.g. RAXO All-mode PRO currently gets an article's category; JXtended labels doesn't.
Has anyone come across this issue before?
The issue of the modules pulling different data sets can only be remedied by hacking the core to get the data that is missing.
Everything else can be accomplished by a simple override. You can modify the module template files then save the new version in JOOMLA/templates/YOUR TEMPLATE/html/MODULE NAME/default.php. You can make the override files match pretty much exactly so the display will be consistent across both modules.

Resources