Custom front-end with uEdit-like capabilities : how to link to uProduce?

267 views
Skip to first unread message

Robin Marx

unread,
May 15, 2015, 5:05:26 AM5/15/15
to xmpie...@googlegroups.com
Hello everyone,

We have recently started integrating XMPie and especially uProduce, uPlan and uCreate into our workflow to start supporting some web2print services.
For a first pilot project, we envision the following setup:

custom front-end (functionality similar to uEdit)  ---->  custom back-end (functionality similar to uStore server)    ----->  uProduce 

The project owner is adamant to not use default uStore and uEdit for this project, but he does want similar functionalities (esp. custom placement of elements, adjusting text color, maybe even image rotation, etc.)
We know how to develop a store and a front-end HTML5 editor etc. but my main question is how to couple the editor output / user customizations to uProduce and generate the print-ready files from that.


As far as I understand, you cannot change the position / text color etc. when working with plain InDesign templates through ADOR objects (limited to pre-defined styles in InDesign). 
I started looking into how uEdit does manage to do this, and think this is only supported through the XLIM file format? Am I right about this?


It's not a problem really to use XLIM, but I am at a loss of how to practically send the customization data to uProduce. 
I cannot find any API endpoint in the uProduce WSAPI documentation that gives me a clue of how to do this and other posts in this User Group also don't seem to dig very deeply into this. 

What I did find in the github repo https://github.com/XMPieLab/uEdit-SDK  is that the uEdit sdk has LoadXLIM and SaveXLIM functionality.
This would lead me to believe the workflow would look like this:
- Load pre-setup XLIM into custom editor from server
- User makes edits
- Save completely new XLIM as new Document to uProduce (for example through Document.CreateNewFromFile?)
- Create JobTicket to print/proof this new document 

However, using the uStore testing setup (default business card provided by XMPie), it doesn't seem like new Documents are being generated per order...
This method would also seem to generate a lot of overhead and go against the parallel setup of ADORs.


I already opened a support ticket with XMPie but I was hoping some people with experience here might offer even more insight in the best way to tackle this. 
So, TLDR;

How can I couple a custom uEdit-like editor to uProduce? What is the workflow / API calls? Can it only be done with XLIM or are there other options?
(can I even go directly to uProduce or do I have to pass through uStore first?)

Thank you in advance for your help.
With best regards,
Robin







Robin Marx

unread,
May 21, 2015, 12:19:28 PM5/21/15
to xmpie...@googlegroups.com
I have been in touch with XMPie about this.

Basically, the only option is XLIM if you want to reposition / dynamically change color etc. of items.
The way uEdit works is:
- Read xlim from the server (uploaded to uProduce as campaign document)
- User makes changes
- Write an updated xlim (updated xml text) as a new physical document to the server
- Print this in uProduce by specifying the document by folder + filename, instead of adding it as a real campaign document (so this is possible)

This means that if you want to bypass uEdit, you have to read and adjust the XLIM files yourself (luckily they are in readable, UTF-16 XML format). 
You can then use the WSAPI:
 - JobTicket->CreateNewTicket() // no parameters
 - JobTicket->SetTicketDefaultsForPlan( yourCampaignPlanID )
 - JobTicket->SetDocument( folderName, fileName, "XLIM" ) // ex. "D:\TempTest\", "MyXLIM.xlim", "XLIM");
( you do have to copy the Resources/ folder for the xlim file next to your custom file (so D:\TempTest\Resources\ in my example) for it to find background images etc. unless you change the paths in the xml yourself of course )

Then use ->setRI to couple the ADORs to a data source of your choice and submit the job. I have tested this and it works ok. 

The XLIM controls the positioning and styling of elements, but the ADOR data is still coupled from the data sources in the campaign.
However, you should also be able to just insert the ADOR data directly if you want, by just removing the ADOR-attributes in the xml elements. But I haven't tested this and I'm not sure if it would still validate with the .plan this way. 
I also haven't tested adding extra elements to the xlim (ex. extra text boxes) programmatically, but in theory it should also work.

Note that this does open some questions for backwards compatibility, since XLIM is a proprietary format and XMPie doesn't release documentation / doesn't guarantee the format won't change. 
So you're on your own, unless you use uEdit. But currently, this is the only way to achieve this functionality (this is what XMPie also recommends doing). 

I hope this can help someone down the line :)
With best regards,
Robin



Reply all
Reply to author
Forward
0 new messages