Dieses Blog durchsuchen

Samstag, 29. April 2017

c# Adobe InDesign server relink images

In C# connected to INdd Server via COM there ist NO posibility to set links to images with string paths like "C:/tmp/test.eps"

Instead you have to use a VB ScriptingFileSystemObject in C#. C# doesnt have it by default. So you have to add the Microsoft VisualBasic.dll to your references in your c# project.

After that you can relink your Indesign graphics like this:

view raw relink.cs hosted with ❤ by GitHub
Thats all. This does the trick after 3 hours of searching

Samstag, 22. April 2017

connect to IndesignServer API with c# in Visual studio

Its deadeasy to use in Visual studio:


Install InDesign Server on one machine with Visual Studio.

Go to InDesign Server installation folder (e.g. C:\Program Files\Adobe\Adobe InDesign CS5.5 Server) and copy *.dll from folder \omniorb to system32 folder (e.g. C:\Windows\System32 ).

Run InDesignServer.exe as Administrator (e.g. C:\Program Files\Adobe\Adobe InDesign CS5.5 Server\InDesignServerService.exe).

In your test project in Visual Studio add reference (COM tab) named Adobe InDesign Server CS5.5 Type Library - you should see 2 versions, one pointing to IDS installation folder and one to your profile dir.

Montag, 17. April 2017

Nginx with php-fpm site config sample

If you are running nginx with php-fpm you will need a specific site configuration,

Here is a sample of a /etc/nginx/sites-enabled/<my-site>.conf to pass all requests on php files tp php-fpm on port 9000


upstream php70 {
server php70:9000;
}
server {
listen 80 default_server;
server_name _ localhost php70.dev www.php70.dev;
index index.php index.html;
root /var/www;
charset utf-8;
access_log /var/log/nginx/default-php70-access.log;
error_log /var/log/nginx/default-php70-error.log error;
location / {
autoindex on;
try_files $uri =404;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_pass php70;
}
}
view raw php70.dev.conf hosted with ❤ by GitHub
Note: the php-fpm is a seperate machine or container with php-fpm7.0 on it. On this machine port 9000 must be exposed.


Freitag, 14. April 2017

Nginx + docker set up a reverseproxy with dockers nameserver

If you loadbalance 2 or more nginx containers you will need to use dockers magic dns under 127.0.0.11

Here is a sample site conf of nginx which proxies every request to  a container "nginx" via proxy_pass


on your loadbalancing container edit /etc/nginx/sites-available/<your site>

server
{
  listen 80;
  resolver 127.0.0.11;
  set $upstream http://nginx;
  location /
  {
    proxy_pass $upstream;
  }
}

the variable $upstream causes, that the proxy "pings" the nameserver to respond the first answering webfrontend and routes the request to that server

Here is the complete docker-compose.yml

version: '2'
services:
proxy:
image: sameersbn/nginx:1.10.3
hostname: proxy
ports:
- "8080:80"
volumes:
- ./nginx/sites-enabled:/etc/nginx/sites-enabled
- ./logs/proxy/nginx/:/var/log/nginx
networks:
- internal
front1:
image: sameersbn/nginx:1.10.3
hostname: front1
volumes:
#- ./nginx_front1/sites-enabled:/etc/nginx/sites-enabled
- ./logs/front1/nginx/:/var/log/nginx
- ./nginx_front1/www:/usr/share/nginx/html
networks:
- internal
networks:
internal:
driver: bridge

Download the git repo here:
https://github.com/pboethig/loadbalancing