LEADTOOLS Support
Document
Document SDK Questions
What is the different between Document and Raster Format?
#1
Posted
:
Tuesday, July 21, 2020 12:40:53 AM(UTC)
Groups: Registered
Posts: 60
I'm exporting my documents using RasPdfLzw format. This format against any document or pdf itself is ending up with more than 15 times big file size with annotation. But in the viewer Export Document Dialog, I can see a Document Format along with Raster Format. What is Document Format? Does that help in size reduction?
Code:
var outputStream = new MemoryStream();
using var codecs = new RasterCodecs();
codecs.Options.Pdf.InitialPath = $@"{Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)}{Path.DirectorySeparatorChar}LeadTools CDLL";
codecs.Options.Load.Name = $"anything.{documentExtension}";
codecs.Options.Load.AllPages = true;
var originalImage = codecs.Load(documentPath);
codecs.Save(originalImage, outputStream, RasterImageFormat.RasPdfLzw, 0, 1, originalImage.PageCount, firstPageNumber, CodecsSavePageMode.Append);
Do we have anything like
RasterImageFormat.Document ? Please Assist. Attached the export dialog image for your reference.
#2
Posted
:
Wednesday, July 22, 2020 8:05:57 AM(UTC)
Groups: Manager, Tech Support, Administrators
Posts: 218
Was thanked: 12 time(s) in 12 post(s)
Abdul,
The DocumentFormat is a vector based format which means there are no images or anything inside the PDF - only text, which is why it is so much smaller.
If you don't want any images in the output, then use the DocumentFormat.PDF which will generate the smallest possible PDF file with text only:
https://www.leadtools.co...iter-documentformat.htmlThanks,
Hadi
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.
LEADTOOLS Support
Document
Document SDK Questions
What is the different between Document and Raster Format?
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.