I am using PdfFileEditor.Concatenate to concatenate PDFs.
Is there an option to linearize the result PDF as its PDF parts get concatenated?
The alternative of reloading the document (after Concatenate is completed) and
saving it as via Document.Optimize() is very time consuming for the large PDF
I am trying to handle.
You can Linearize a PDF document with IsLinearized property which is exposed by Document class. Please try using below code snippet in your environment and then share your kind feedback with us.
// Load source document
Document document = new Document("Test.pdf");
// Set IsLinearized to true
document.IsLinearized = true;
// Save the updated PDF document
document.Save("Linearized.pdf");
We hope this will be helpful. Please feel free to contact us if you need any further assistance.
My use case is given several thousand input PDF pages, I need to combine them into a single (very long) linearized PDF.
I currently used your PdfEditor Concatenate method to merge the pages (which may take several minutes
to run). I also tried adding one page at the time (via Pages.Add).
Adding an additional step to linearize the large concatenated PDF makes the processing even slower.
I was wondering if there was a way to obtain a linearized PDF as a result of the Concatenate function.
Also any alternative way to solve the problem would be appreciated.
Please note Concatenate method does not create linearized PDF document and you need to linearize it with additional step suggested previously. Moreover, you may also try to add all pages to other document, at once instead of one page at a time, as explained in Concatenate PDF Files.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.