Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Add successive header or watermark with document with headers

Avatar

Former Community Member
Hello, <br /><br />I've currently a problem when adding "Header" objects successively at least two times:<br /><br />- I have a word document with header and footers<br />- I render it to a PDF (v1.6, with PDF Generator)<br /><br />- With this PDF I use LiveCycle Assembler to add a "Header" object on the first page of the document<br />- The PDF is correctly stamped with the Header object<br />- I stamp again the new document with the same header object <br />- The new PDF is corrupted: I've got the error "Too many operands" when opening the PDF document, and the header of the first page cannot be read (the rest of the document is readable however)<br /><br />If I use a PDF document that was created from a word document that doesn't contain any header or footer, I haven't got the problem and I can create successively new PDF documents from previously stamped documents.<br /><br />As the assembler version I use is still the beta and that it seems to be an assembler bug, I'd like to know if the problem is still present in the final version or if this is a bug that haven't been reported yet.<br /><br />Thanks in advance,<br />Yohann<br /><br />###<br /><br />The DDX I used:<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><DDX xmlns="http://ns.adobe.com/DDX/1.0/"><br /><PDF result="ForReview" save="FastWebView"><br /> <PDF source="doc1" pages = "1"><br /> <PageMargins top="0.25in" bottom="0.25in" /><br /> <Header padding="0.5in" ><br /> <Center><br /> <StyledText color="red" font="Arial" font-size="18pt" font-weight="bold"><p>For review</p></StyledText><br /> </Center><br /> </Header><br /> </PDF><br /> <PDF source="doc1" pages="2 - last"><br /> </PDF><br /> <br /></PDF>
8 Replies

Avatar

Former Community Member
That particular DDX doesn't validate with the release version of Assembler, so I'm hopeful its just a beta bug. With the release version, there should be a <Left> <Center> or <Right> element defining which header the <StyledText> is for. Also, there needs to be a <p> element inside of the <StyledText>.<br /><br />I started with a blank Word document, typed "This is a test document" in the body, made a single header "Test Header" left justified, and then ran it through PDFG to get a 1.6 PDF. I then ran that PDF though assembler with this DDX:<br /><PDF result="ForReview.pdf" save="FastWebView"><br /> <PDF source="doc1" ><br /> <PageMargins top="0.25in" bottom="0.25in" /> <br /> <Header padding="0.5in" > <Center><br /> <StyledText color="red" font="Arial" font-size="18pt" font-weight="bold"><br /> <p>For review</p><br /> </StyledText> </Center><br /> </Header> <br /> </PDF><br /></PDF><br /><br />I opened the result in Acrobat 7.0.8 and it rendered properly.<br /><br />I hope that helps.<br />Don

Avatar

Former Community Member
aww... it would appear that the forums software took out my &lt;Center&gt; element that was supposed to be right after <Left> in the above message.

Avatar

Former Community Member
Try this DDX (but I'm not sure it'll validate with the beta):




<Center>

For review



</Center>


Avatar

Former Community Member
One more time... sigh... sorry





<Center>

<p>For review</p>

</Center>


Avatar

Former Community Member
Thank you for your answer, Don.

In fact the center and paragraph markers didn't pass through the forum on my example. The only difference between my ddx and yours is the name of result and source, right? (with .pdf extension)



You also say that you ran the assembler once and you opened successfully the resulting pdf. So I can, but did you try to run a second time the assembler with the newly stamped document? I have no problem on the first assembler run but on the second, as if there was a conflict between the two added headers. In addition, the pdf document becomes bigger and bigger at each assembler run, it seems to contain all the added headers despite it only should display the last one.

Avatar

Former Community Member
Ah, yes, I see that your DDX is likely identical to mine since the <Center> and <p> tags were stripped.



With the released version of Assembler, I am able to rename the assembled2Output.pdf to result3.pdf and re-run it through Assmebler to re-apply the header or apply a new header. I do not get the "Too many operands" message when I open the document from the second, third or fourth pass in Acrobat. However, I do get a slightly larger file each time, even when the save is specified as "Full". This seems like a bug, but I'm not familiar with the internals of PDF to know for sure. I'll ask around...



Don

Avatar

Former Community Member
Hello there!



I am trying to set up a footer in a form that someone can put "auto text" or the file name in path like you can in Word. Is this possible!!



Please Help...



Thanks!

Avatar

Former Community Member
Did you inquire over in the Designer forum? There may be more knowledge on forms there...

Don