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



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


Groups: Registered, Tech Support, Administrators
Posts: 153

Was thanked: 9 time(s) in 9 post(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.


using (LEADDocument document = DocumentFactory.Create(createOptions)) 
    document.Name = "Virtual"; 
    LoadDocumentOptions loadOptions = new LoadDocumentOptions(); 
    loadOptions.Cache = cache; 
    LEADDocument childDocument = DocumentFactory.LoadFromFile(Path.Combine(ImagesPath.Path, "Leadtools.pdf"), loadOptions); 


For more information on this feature and more in-depth example code, see our documentation page on DocumentFactory.Create()

In addition, we have an online demo which showcases this new functionality.

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.

File Attachment(s):
pages.png (1,040kb) downloaded 655 time(s).

Edited by moderator Wednesday, March 21, 2018 9:51:49 AM(UTC)  | Reason: Updated links and code to v20

Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.

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-2023, Yet Another Forum.NET
This page was generated in 0.050 seconds.