RealTimeDesigner Support Network
Wiki Forums Libraries Docs Support RealTimeDesigner Home
Welcome! Log In Create A New Profile

Advanced

API To Return Hi Res File

Posted by kalexander 
API To Return Hi Res File
August 07, 2018 12:19PM
Is there a way to send in xml to an API and it return the hi res file?
Re: API To Return Hi Res File
August 07, 2018 06:04PM
Sorry but no.
Reason is pretty simple: hires is the most resource-intensive task in the RTD, and allowing that via API would expose us to the risk of slowdowns because of excessive use of resources (with API no one could forbid something like launching 100 gens in a single second, for example).

For this reason that's a feature that can be given only to customer with a dedicated install, and not part of the normals shared RTD system
cos
Re: API To Return Hi Res File
August 10, 2018 07:00AM
@kalexander I'm curious as to your needs. There is a special code for Email & Export Templates and External Notification on Submittal that will return the hires pdf file:[item_link_to_hires_pdf_gen] with description "ITEM: link to generate PDF hires from outside the RTD. This is very specific, and will be applied only in templates used for ORDER SUBMITTAL TO COMPANY in SYSTEM OPTION => Configure Emails.

Could be useful for your needs?
Re: API To Return Hi Res File
August 16, 2018 02:19PM
cos Wrote:
-------------------------------------------------------
> There is
> a special code for Email & Export Templates and
> External Notification on Submittal that will
> return the hires pdf file: with description "ITEM:
> link to generate PDF hires from outside the RTD.
> This is very specific, and will be applied only in
> templates used for ORDER SUBMITTAL TO COMPANY in
> SYSTEM OPTION => Configure Emails.
>
> Could be useful for your needs?


Do you have an example on how this works?


What we are trying to do is, we already have the specs of the signs we are trying to create. We want to send those specs to real time design and return the ready to print image. What we did in the past if I remember correctly, we used a software called AutoIt, which is a windows automation software that will click on objects on a desktop without user interaction. Whenever a real time design file was created, AutoIt was programmed to login to real time designer and download the hires.

I hope this makes sense.
cos
Re: API To Return Hi Res File
August 17, 2018 06:48AM
I apologize in advance if this is a long read and not exactly addressing your needs.

You want to send the specs to rtd and return the ready to print image? You mean without placing an order? In that case, I see why Alex's answer makes sense. You could quickly generate hi res files, bog down the system and melt the server! Something like this it seems you would want to do locally in your own graphics/production apps without rtd.

So, it looks like all you want to do is quickly get the hi res from RTD after an order is placed?

In the Configure General Emails for the Order Submittal to Company email settings which are made in the Manage Email & Export Templates you just need to add the special code [ITEM_DIRECT_HIRES_LINK] in the ITEMS TEMPLATE section and, optionally, any descriptive text for your needs so your employees know what it does. Such as this:

Download the Hires pdf print ready file: [ITEM_DIRECT_HIRES_LINK]

When you receive the company notification email for an rtd order, you can click the link and the normal pdf high res file will be downloaded onto your computer without any other messing around with logins and choices to be made into the rtd.

The only caveat is that you get what you get. You cannot check things out first to be sure you are getting what you need. If you are sure that all of the settings you made to the product and your customers have things properly entered into the designer, then this feature is quite nice. I believe this feature was added as a request in this forum. Good suggestion that Alex acted upon.

You can also use the the External Notification on Submittal feature if you have a backend programming to accept such things. That's quite a different thing all together but the results are the same. A download link for the hires pdf print file.

I hope that I described all that correctly. We don't use the emails but instead use a custom backend system. If you are thinking in an entirely different direction than the above, maybe it will help someone else.
Re: API To Return Hi Res File
August 17, 2018 11:26AM
Using AutoIt sounds like a pretty bad idea to me.
Main reason being it cannot take into account eventual slowdowns: if the "click" is perfrormed before the resource is technically able ot accept it, that would just go nowhere.

Cos is right about the need of placing an order: allowing hi-res generation for non-placed orders is a feature exclusive for enterprise companies with custom RTD install, cannot be allowed in the shared environment.

Right now, in that scenario, your best solution would be (as you already know all of your design's specs) to use the GenerateImportCode action of the API, which you already used in past. And then, the designer, place the order so that you can get back the link Cos mentioned in the email to you
Re: API To Return Hi Res File
August 21, 2018 12:26PM
Alex Wrote:
-------------------------------------------------------
> Using AutoIt sounds like a pretty bad idea to me.
> Main reason being it cannot take into account
> eventual slowdowns: if the "click" is perfrormed
> before the resource is technically able ot accept
> it, that would just go nowhere.
>
> Cos is right about the need of placing an order:
> allowing hi-res generation for non-placed orders
> is a feature exclusive for enterprise companies
> with custom RTD install, cannot be allowed in the
> shared environment.
>
> Right now, in that scenario, your best solution
> would be (as you already know all of your design's
> specs) to use the GenerateImportCode action of the
> API, which you already used in past. And then, the
> designer, place the order so that you can get back
> the link Cos mentioned in the email to you


Yes, bad idea but it got us thru for the time being. Everything worked on a timer and a folder watcher. We didn't have a huge volume of RTD files. Now that we are looking at pushing more automation at RTD AutoIT will not work.

I followed your instructions but, I'm not getting the link in the confirmation email. What am I doing wrong?

I created the template in Manage Email and Export Templates and named it Direct Hires Link Template.
The items template field is set to Download the Hires pdf print ready file: [ITEM_DIRECT_HIRES_LINK]

In Configure Generator Emails

The Order Submittal to company - I set the Use Order Export Template to Direct Hires Link Template.


When I saved the design , I get the email but there isn't a link to download the file. Attached are the screenshots. Please let me know what step I'm missing.
Attachments:
open | download - ConfigureGeneratorEmails.PNG (18.1 KB)
open | download - ManageEmailExportTemplates.PNG (23.4 KB)
open | download - email.png (17 KB)
Re: API To Return Hi Res File
August 21, 2018 12:59PM
You might find this useful:
http://support.realtimedesigner.com/forum/read.php?5,1536

You missed the "cascade" of sections, which is well described in the above link.
In short, in order section you need to place [ORD_ITEMSTEMPLATE] to show the items portion, or it will just not show at all.

Similarly, in item template you have to put [ITEM_SIDESTEMPLATE] to loop the sides block if you need that too.
Re: API To Return Hi Res File
August 21, 2018 03:11PM
Alex Wrote:
-------------------------------------------------------
> You might find this useful:
> http://support.realtimedesigner.com/forum/read.php
> ?5,1536
>
> You missed the "cascade" of sections, which is
> well described in the above link.
> In short, in order section you need to place to
> show the items portion, or it will just not show
> at all.
>
> Similarly, in item template you have to put to
> loop the sides block if you need that too.

That worked thanks.

Two more questions.

1. After calling GenerateCode and rtd is finish loading the xml, is there a way to run save design to create the order automatically?

2.In Manage Orders -> Hi Res Files Generation is there a system settings to set the vector output options defaults. We will like to set Include Items as Separate Layres to yes?
Re: API To Return Hi Res File
August 22, 2018 10:54AM
for #1 you could do some HEAVY javascript hacking, but not really recommended.
GenerateCode is an API tihng, so server to server. But placing an order is a browser thing, normally done in interactive interface by the user. So they're really 100% unrelatable things.
You'd need to create a JS hack that puts some loop that verifies not only when the XML is loaded, but also when all of the resources of the page are as well (including so the single items).
And at that point you would need to trigger the functions that normally fires the order placement process, by adding also something that ignores/skips all the steps normally takes.
This is far from being easy though, because if not everything is running as expected the final result would just be... nothing

For #2 sorry but no, there's not such an option.
cos
Re: API To Return Hi Res File
August 22, 2018 11:03AM
#2 is why I said this "If you are sure that all of the settings you made to the product and your customers have things properly entered into the designer, then this feature is quite nice."

You could rethink how you are setting up the product and possibly get everything you need in the download. Maybe. Possibly. Could be. I don't know.
Sorry, only registered users may post in this forum.

Click here to login