yuuvis® RAD Q&A

0 votes
by (1.9k points)

Hello OS Team,

I am trying to upload a DWG-File to redline. The upload works fine but the rendition-service fails to build the PDF for preview.

Rendition-Service Log:

2019-02-13 11:27:12,792 routestart                         (  72) [     http-nio-8090-exec-2] DEBUG - 20190213.112709.292-14-toPdf        start renditionPrepaireRoute
2019-02-13 11:27:12,797 routestart                         (  72) [text) thread #3 - execute] DEBUG - 20190213.112709.292-14-toPdf        start renditionStartRoute
2019-02-13 11:27:12,807 RenditionInfoProcessor             (  53) [text) thread #3 - execute] INFO  - 20190213.112709.292-14-toPdf        convert [1] file(s) to profile [toPdf]; file name(s): [data.dwg]
2019-02-13 11:27:12,808 route                              (  72) [text) thread #3 - execute] DEBUG - 20190213.112709.292-14-toPdf        source content type:[application/dwg]
2019-02-13 11:27:12,809 routestart                         (  72) [text) thread #3 - execute] DEBUG - 20190213.112709.292-14-toPdf        start renditionPdfRoute
2019-02-13 11:27:12,810 route                              (  72) [text) thread #3 - execute] DEBUG - 20190213.112709.292-14-toPdf        source content type:[application/dwg]
2019-02-13 11:27:12,818 ReloadableConverterService         (  96) [text) thread #3 - execute] WARN  - 20190213.112709.292-14-toPdf        Cannot convert document [Document [id=null] Rendition[toPdf]; Content[(data.dwg,application/dwg)]]. Caused by: [CannotConvertException: Cannot find converter for source type: [application/dwg], target: [toPdf]]
2019-02-13 11:27:12,819 route                              (  96) [text) thread #3 - execute] INFO  - 20190213.112709.292-14-toPdf        CannotConvertException was throw. Caused by: [com.os.rendition.core.CannotConvertException: Cannot find converter for source type: [application/dwg], target: [toPdf]]
2019-02-13 11:27:12,822 performance-request                (  65) [     http-nio-8090-exec-2] DEBUG -                                     request [25] is finished after [35.4 ms]|total 23.9 s, counter 25, max 5.82 s, min 29.6 ms, mean 955 ms|performance.request

In your online-documentation is declared that DWG-Files are supported.
The rendition itself is not that important (of course it would be nice) but the notifications that show up when you open the document are the problem.

Can you suggest a solution to this problem?

Thanks,
Mathias

1 Answer

0 votes
by (19.6k points)
selected by
 
Best answer

Hello Mathias,

support for dwg files is diabled per default because you need to buy a license of anydwg (http://anydwg.com/dwg2pdf/) before you (or better said rendition-plus) can convert this filetype.
We are already are working on a solution to not show the error toast if the rendition ist not available anymore. So if you can wait for one of the next releases it will be solved.

If you need a solution right now and don't want to buy anydwg you could build your own rendition-plus converter for dwg files and just always return an empty pdf if you want - of course that is not really a "clean" solution...

Regards
Nicolai

by (1.9k points)
Hello Nicolai

Thanks for the information. In this case I will wait for the next releases.

Regards Mathias
by (430 points)
Hello,
We are using version 9.16 HF 19 and do not get an error message when we upload a .dwg file, but we see the message in the preview window that this format cannot be displayed, but can be downloaded.
Is this the desired behavior?
I also ask this because enaio (blue line) can display the .dwg file-format.
If this is the desired behavior and if the anydwg program can solve this problem: What license of anydwg would need to be purchased? (as prices vary from $83 to $1000)
Is a server or command line version required (pro version)
Please provide instructions on how to set up Rendition-Plus for DWG format conversion
by (19.6k points)
Hello,

yes it is the desired behavior since the costly converter is required - this is the same in enaio.
Since the rendition can only start converters using the cmd-line the command-line license ($1000) is required.

Once the converter is installed on the rendition-plus server you can integrate it by following these steps:

- Create the file "<rendition-plus>\renditionplus\bin\custom\dwg2pdf.js" and write the following lines to it:

importPackage(java.io);
importPackage(com.os.renditionplus.scriptexecutor);

function process(scriptPathName, applicationBase, timeout, sourceFile, targetFile)
{
    var executor = new ScriptExecutor();
    executor.setTimeout(timeout);
    executor.setDebug(true);
   
    var outputPath = new File(targetFile);
    executor.setWorkingDirectory(outputPath.getParent());
   
    println("execute");       
    executor.execute("<path_to_dp.exe>", "/InFile", sourceFile, "/OutFile", targetFile);
}

(replace <path_to_dp.exe> with the path to the anydwg program .exe file)

- Create the file "<rendition-plus>\renditionplus\bin\custom\dwg2pdf.xml" and write the following lines to it:

<?xml version="1.0" encoding="utf-8"?>
<converter name="dwg2pdf-script" xmlns="http://schemas.optimal-systems.de/RenditionPlus/Converter/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <starter priority="201">
        <source>^(application/dwg)</source>
        <target>toPdf</target>
    </starter>

    <skip value="false" />

    <executor>
        <workingDirectory value="${config.application-base}/apps/java" />
        <command value="scriptexecutor-app.bat" />
        <timeout value="${bean.expression.secureTimeout}" />
               
        <arguments>
            <argument value="${config.application-base}/custom/dwg2pdf.js" />
            <argument value="${config.application-base}" />
            <argument value="${bean.expression.timeout}" />       
            <argument value="${bean.expression.firstContentLocation}" />           
            <argument value="${bean.expression.targetFilePath}/result.pdf" outParam="true" />
        </arguments>
       
        <target>
            <single>
                <targetMimeType value="application/pdf" />
                <targetFileName value="result.pdf" />
            </single>
        </target>
       
    </executor>

    <secureExecution>true</secureExecution>
    <cantConvertForward>true</cantConvertForward>

</converter>

- Restart rendition-plus
- If you want to retry already uploaded files you first need to delete the error marker for this rendition. This can be done by executing the following rest-ws call:
DELETE http://<gateway>/rest-ws/service/dms/<item-id>/content/rendition

Best regards
Nicolai

Related questions

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
asked Feb 28, 2019 by dennisschmidt (2.9k points)
+1 vote
1 answer
asked Nov 19, 2018 by Robert Freese (1.5k points)
...