Docx4j - Copy all the contents of a page into another document in place of a Place Holder - ms-word

Is it possible to copy all the contents (elements) of a page into another document in place of a Place Holder.
I am using Text Place Holders in template, and i am able to add images, text, paragraphs, tables, on those place holders. I have a requirement, where i have to copy all the pages of a word document (different document) and paste those pages in place of a place holder in template.
I am using Docx4j for this..

I had a similar requirement. I used the code in the blog post.
http://www.docx4java.org/forums/docx-java-f6/html-altchunk-t933.html
hope this helps you.

Related

TYPO3 News Extension - How can i copy and paste content elements of a news entry?

If i created a content elements (f.e. text, image, plugins etc.) in a single news, i cannot copy and paste this content element again. Have I missed something or is it not working (yet)?
Thxs for support
Holger*
It is just not supported, only thing you can do is creating copy of such News record in WEB > List module.
It will create copy of the News itself and copies of all content elements in it. Then you can edit these records to have quite other News and/or CEs. Also if you'll make any change to copied CE it will not reflect the original one(s).

add page headers to roxygen2 docs

I'm using roxygen2 to document the objects in my R package, as described in the book R packages. I want to insert some text at the top (and bottom) of the doc page for every object, saying for example, "Confidential - Do Not Release". For the HTML doc pages I could do that with a CSS content property, or by inserting some HTML of course.
So how can I modify the page headings of the doc pages rendered from roxygen2? For now I'm only interested in the HTML doc pages, not PDF, so it might be enough to insert some arbitrary CSS or HTML into every doc page with roxygen2, or Rd. Is that possible?
Ideally I'd like to find an option that I can set once globally for the whole package, since if I have to add it separately to each object's documentation, I may miss some. But if I have to add it to each object, I can live with it.

Creating PDF from HTML using iTextSharp with TextField and editing the same later

I have a requirement to create a PDF file from HTML. The resulting PDF needs to have iTextSharp TextField or something similar. I need to update the PDF document with appropriate text in the text field.
Points to note:
1. The PDF length (page numbers) may vary.
2. Due to this, I may have to only know the name of the field to set value to.
OR
I could create a PDF from HTML. As the content of the PDF may vary, I do not know the exact location of a block that I need to edit. I need to stamp text exactly over the block irrespective of the location of the block (i.e. the block may exist in any page).
Example Scenario:
Create a PDF from HTML.
It is sent for approval process. Once it is approved, the name of the approver is printed at a specific place (however the signature area, mentioned as block above, may come at any page, as it depends on the content of the HTML).
Two resources which may help you:
This article details how to use asp.net & itextsharp to create a pdf.
The whole article is pretty useful for a beginner like me, but the section detailing how to create a pdf from HTML may be useful for you as a start on your problem.
https://web.archive.org/web/20211020001758/https://www.4guysfromrolla.com/articles/030911-1.aspx
I would especially pay attention to how he replaces placeholders in the HTML template he is loading. As it seems you may want to head in that direction.
Now to answer your question more directly, have you thought about using a fillable form?
Here is a related Stack Overflow post.
Creating a fillable PDF form with ITextSharp
As I said I am a beginner, so I can't do much to help you from here. But with any luck you can put those together and accomplish what you are looking for.
Let me know if that helps Good luck!

File attached in a word document

I am creating a Word document template, I would like users who use this form to also be able to manage an attached file. The template is written with Microsoft Word 2000. Is there a way to create a part of the template that can be used to manage such an attachment?
I solved the problem by dragging the file I wanted to attach directly into the Word document.

how do I add bookmark into a pdfpcell

I am doing a report which contains more 1000 records by using pdfptable of itext. it is not easy to seek a particular record, so i am wondering if there is any way to add bookmark in a pdfpcell.
To add bookmarks into a pdf using iTextSharp, you have to use the Chapter and/or Section objects. While technically, you can make this work, the Chapter and Section objects have some limitations and some pretty large overhead, especially for 1000's of items. Also, I have never been able to stop the chapter and section numbers from being displayed in my document, which is probably an issue for you if your content is in pdfpcells.
This link provides a good introduction to adding Bookmarks to a pdf. Scroll down to almost the end of the article for the Bookmark section.
Also in this article, is information about setting LocalDestinations in a pdf. These don't show up as Bookmarks, and they require both a 'Goto' link and a 'Destination'. So, if you were willing or able to create an index page in your pdf, this might be a better solution. Your index page would contain all of the 'Goto' links, and the content in your pdfpcells would be the LocalDestinations.