Introduction
The PDF specification defines an
incremental update in section “7.5.6 Incremental Updates” as an update to
document’s content that doesn’t overwrite the original data, leaving it
intact. It simply adds new content to
the end of the file, and updates its cross-reference table, making it aware
that the new version of content is available.
The main benefit is that small
changes to the large and weighty documents can be saved quickly, and it also
makes it possible to update remote files without pushing the entire contents.
The code
Apitron PDF Kit
.NET component fully supports incremental updates and makes you able to
save changes in a very convenient manner, see the code below:
public void PerformIncrementalUpdate()
{
// open
PDF file
using (Stream stream = File.Open("document.pdf", FileMode.Open))
{
//
create PDF document object based on stream
FixedDocument doc = new FixedDocument(stream);
// add
new page
doc.Pages.Add(new Page());
// save
as incremental update
doc.Save();
}
}
That’s it, and it’s important to note that the update
becomes written to the original stream.
Conclusion
Whenever you need to manipulate
PDF, you may count on Apitron PDF
Kit .NET component - it just works, has superior support and detailed
documentation (browse our blog, read the
free book
or check out the online
documentation section). If you have questions or need any help with the
API, just let us know and we’ll provide you with a detailed reply including
code samples if needed.
Downloadable version of this article can be found by the following link [PDF].
Downloadable version of this article can be found by the following link [PDF].
No comments:
Post a Comment