Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,099
Thanks: 7 times Was thanked: 128 time(s) in 125 post(s)
|
Question:How to merge multiple pdf files through Pdfium.Net SDK then printing them. Answer:Merging documents is performed using the import pages operation Code:
public void MergeDocument()
{
//Initialize the SDK library
//You have to call this function before you can call any PDF processing functions.
PdfCommon.Initialize();
//Open and load a PDF document in which will be merged other files
using (var mainDoc = PdfDocument.Load(@"c:\test001.pdf"))
{
//Open one PDF document.
using (var doc = PdfDocument.Load(@"c:\doc1.pdf"))
{
//Import all pages from document
mainDoc.Pages.ImportPages(
doc,
string.Format("1-{0}", doc.Pages.Count),
mainDoc.Pages.Count
);
}
//Open another PDF document.
using (var doc = PdfDocument.Load(@"c:\doc2.pdf"))
{
//Import all pages from document
mainDoc.Pages.ImportPages(
doc,
string.Format("1-{0}", doc.Pages.Count),
mainDoc.Pages.Count
);
}
mainDoc.Save(@"c:\ResultDocument.pdf", SaveFlags.NoIncremental);
}
//Release all resources allocated by the SDK library
PdfCommon.Release();
}
How to print document you can see hereEdited by user Tuesday, January 5, 2016 6:19:10 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/23/2016(UTC) Posts: 2 Thanks: 1 times
|
I have questions regarding pdfium.net sdk
1)How to delete particular page from merged pdf?? 2)How to move particular page up or down?? 3) How to save newly merged pdf??
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,099
Thanks: 7 times Was thanked: 128 time(s) in 125 post(s)
|
Originally Posted by: Ajj 1)How to delete particular page from merged pdf?? 2)How to move particular page up or down?? 3) How to save newly merged pdf??
1. Pages.DeleteAt(...) 2. Insert into new position; Delete from old position. 3. doc.Save(..., SaveFlags.NoIncremental); Edited by user Wednesday, November 23, 2016 8:24:36 PM(UTC)
| Reason: Not specified
|
1 user thanked Paul Rayman for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/23/2016(UTC) Posts: 2 Thanks: 1 times
|
Thank you so much. Deleting page and Saving merged document functionality working good. But still getting problem with moving pdf page. i.e. selecting particular page and moving it other location in same pdf
|
|
|
|
Rank: Guest
Groups: Guests
Joined: 1/5/2016(UTC) Posts: 163
Was thanked: 5 time(s) in 5 post(s)
|
But still getting problem with moving pdf page i.e. selecting particular page and moving it other location in same pdf How to do that? in code
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/29/2023(UTC) Posts: 1
|
I've extracted 2 pages of a 15 page document and merged it to a new document like described. The size of the document (2 pages) is larger than original document (15 pages). How is this possible? Is there a possibilty to reduce the size of PDF document?
|
|
|
|
Forum Jump
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.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close