Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Spliting and Merging |
Post Reply ![]() |
Author | |
pn_patel2002 ![]() Beginner ![]() Joined: 09 Mar 10 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() Posted: 09 Mar 10 at 9:48AM |
Hi,
I am trying to Split one multipage Pdf file into single pages and merge that splited pdfs' to a single PDF file using following methods. Original file details: Size=3.50MB, Pages:80 Extract/split Obeservation: process time: 2 sec, size of all 80 files=5.02MB Merge Obeservation: Process Time:1 Sec, Size =8.63MB Private sub Extract() Dim qp As New QuickPDFAX0718.PDFLibrary qp.UnlockKey(licenseKey) If qp.Unlocked = 1 Then Dim f As New OpenFileDialog f.Filter = "PDF Files|*.pdf" If f.ShowDialog = Windows.Forms.DialogResult.OK Then qp.LoadFromFile(f.FileName) For i As Int32 = 1 To qp.PageCount If qp.ExtractPages(i, 1) = 1 Then qp.SaveToFile(Application.StartupPath & "\Extracted\Extract_Sample" & i.ToString & ".pdf") End If qp.LoadFromFile(f.FileName) Next End If MsgBox("done") End If end sub Private sub Merge() Dim qp As New QuickPDFAX0718.PDFLibrary qp.UnlockKey(licenseKey) If qp.Unlocked = 1 Then Dim d As New DirectoryInfo(Application.StartupPath & "\Extracted") Dim f() As FileInfo f = d.GetFiles() Dim outputfilename As String outputfilename = f(0).FullName For i As Int32 = 1 To f.Count - 1 qp.MergeFiles(outputfilename, f(i).FullName, Application.StartupPath & "\Merge\test" & i & ".pdf") Application.DoEvents() outputfilename = Application.StartupPath & "\Merge\test" & i & ".pdf" Next MsgBox("Done") End If end sub Need assitance on: 1. Is it correct method for split/Merge? 2. If extracted pages total size is 5.02MB then why merged pdf file size increased? 3. How can I reproduce file after extracting to nearby its original size? Pranav |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Pranav!
1. There are more than one solution. If it works then it's okay ;-) 2. There are many attributes (the used font for example) in a document. If you make 80 documents out of one then these attributes will be in each (80!) document. After the final merge these attributes will be multiple senseless in the new document. 3. QuickPDF offers functions to compress fonts and images. There are functions to strip the single documents before the merge (remove the fonts for example). Have a look in the "general section"... I've inserted a post "the first steps...". Cheers and welcome here, Ingo |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() 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 |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store