Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, April 6, 2017 1:15:39 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 42


blank.png
File Attachment(s):
pages.png (1,040kb) downloaded 214 time(s).
Multiple input documents can be consolidated into a single PDF by using a LEADTOOLS virtual document. This can be useful when needing to assemble input documents from multiple sources and formats. Once these virtual documents are created, they exist in memory opposed to needing to be generated as a temporary file on disk. This alleviates the overhead of monitoring the temporary file and discarding it when no longer necessary.

Once assembled, the virtual documents can either be written to a file on disk using the Document Writer, displayed in a viewer, or both. This code snippet shows how to create a virtual document and add several pages to it.

Code:

   using (Document document = DocumentFactory.Create(createOptions)) 
   { 
   	document.Name = "Virtual"; 
   	LoadDocumentOptions loadOptions = new LoadDocumentOptions(); 
        loadOptions.Cache = cache; 
   	Document childDocument = DocumentFactory.LoadFromFile(Path.Combine(ImagesPath.Path, "Leadtools.pdf"), loadOptions); 
   	
	document.Pages.Add(childDocument.Pages[0]); 
	document.Pages.Add(childDocument.Pages[1]);    	
   }


For more information on this feature and more in-depth example code, see our documentation page on DocumentFactory.Create()
https://www.leadtools.com/help/leadtools/v19m/dh/dox/documentfactory-create(createdocumentoptions).html

In addition, we have an online demo which showcases this new functionality.
https://demo.leadtools.com/JavaScript/DocumentComposer/index.html

This provides a drag-and-drop UI where images and documents are loaded from multiple sources. The individual pages from each of these can be dragged into the virtual document, rearranged as necessary, then saved to disk as a new file. Here are a few screenshots of the demo in action.

blank.png
File Attachment(s):
pages.png (1,040kb) downloaded 214 time(s).
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
nick@leadtools.com
www.LEADTOOLS.com
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.121 seconds.