Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Disassembling documents:

Avatar

Former Community Member

Hi,

  I'm trying to disassemble documents. My Assembler input is a map document with ddx:

<PDFsFromBookmarks prefix="stmt">
     <PDF source="doc1.pdf"/>
</PDFsFromBookmarks>
What should be the output give for this service in Assembler process? I tried to give the output a variable
of type Assemblerresult. (error: Cannot create a map entry without a key specified)

What should be the key entry we need to provide? I also tried using a variable of type map in the output
parameter with subtype AssemblerResult. Still I see the same output. I think I'm missing something in doing
this for the output parameter.

Please help. I was struggling all the weekend trying different combinations for the output. Unfortunately,
i could not find any sample that shows disassembling documents.

Thanks,
Chaitanya

1 Accepted Solution

Avatar

Correct answer by
Level 8
11 Replies

Avatar

Level 8

You should be able to use an AssemblerResult object.  Inside that result object is a documents object which is a Map of Documents.  The resulting keys will be based on the prefix attribute.  That is in your case it will be something like stmt.000001.{first bookmark name}

You may try record/playback and have a look at the AssemblerResult immediately after the Invoke DDX is executed

See the attached LCA for an example.

Avatar

Former Community Member

Hello Hodmi,

  Thanks for the response. I gave the output as Assembler result type. But it's erroring out when executing the DDX itself.

I tried importing your attached archive file and it's erroring out (please find the attached screen shot). Can you please send your lca again? That should be helping me on the configuration.

Thanks,

Chaitanya

Avatar

Level 8

Sorry.  My process was for an ES2 server.  Let me see if I can dig up an

8.2 example


Avatar

Former Community Member

Hodmi,

It will be great if you can send me the 8.2 example. I will wait for that.

Thanks

Avatar

Correct answer by
Level 8

Here is a working 8.2 sample

Avatar

Level 4

Hi,

I need help to save the result documents I get in the dis-assembly.

I have no problem saving the pdf result when it is a single result, but how is it done when you split a pdf by bookmarks like

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDFsFromBookmarks prefix="Animal">
    <PDF source="doc1"/>
  </PDFsFromBookmarks>
</DDX>


1) Please give an example that can work for a document with a variable number of bookmarks

2) I would like to save each result pdf to the file system to a folder - how can this be done?? I use the "File:///c:/temp/output/xxxx.pdf" to load my PDF source, but how is it done for saving multiple documents?


Thanks

Thomas Groenbaek

Avatar

Level 10

How are you invoking Assembler. You should get a map back with all the documents.

Jasmin

Avatar

Level 4

Hi,

I found a solution to put the result from the dis-assembly into a list and then looped through the list and save the files to file system.

I works but if you have a better/simpler solution, out there, bring it on

I there is a way to get the filenames from the list = bookmark names that would be great

thanks
Thomas

Avatar

Level 10

I'm assuming you have a list documents.


Can't you use the documentvar.getAttribute("filename")?

Jasmin

Avatar

Level 1

I am searching for Splitting document, I found this thread is useful.

But very old thread, I am not sure, this thread is active.

I have download the .lca files attached in the discussion.

There were output document variable, in the workbench process and also not able to create watch folder in the endpoint section,  "invoke" is unavailable.

Can someone post .lca file for reference.

Shaji