LEADTOOLS Support
Document
Document SDK Questions
Save LeadDocument loaded DocumentViewer as vector/raster depending on input file?
#1
Posted
:
Saturday, September 19, 2020 6:36:42 AM(UTC)
Groups: Registered
Posts: 40
Thanks: 5 times
Hi,
i'm trying to save this file "C:\Users\Public\Documents\LEADTOOLS Images\leadtools.pdf" with LT20 winforms .net c# that is loaded as LeadDocument but the size is increased from 89KB to 123MB without changing anything because "LeadDocument.SaveToFile" save it as rasterimage using default settings
Is there an easy way to auto save the file keeping the same input file format for all pages that haven't been changed?
Example1.
input file has only vector pages but on DocumentViewer only 1st page is rasterized but the rest is unchanged.
the output should be an mixed file with 1st as raster and the rest as vector.
Example2.
input file has only vector pages but on DocumentViewer we have added annotations.
the output should be an file with only vector pages and annotations saved inside the file (if file is pdf or tiff)
#2
Posted
:
Monday, September 21, 2020 2:03:07 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 105
Was thanked: 3 time(s) in 3 post(s)
Hello,
From your inquiries, it appears that you may want to utilize the DocumentConverter class to export the LEADDocument you are using in the Document Viewer.
https://www.leadtools.co...c/documentconverter.htmlThe DocumentConverter will allow you to save the mixed PDF (raster & vector) to document format, which should retain the original mix of raster and vector pages.
https://www.leadtools.co...data-documentformat.htmlYou are currently using the SaveToFile() method which only allows you to save the file as a complete raster PDF. The DocumentConverter will also allow you to indicate how you want the drawn annotations to be saved in the AnnotationsMode property.
https://www.leadtools.co...ata-annotationsmode.htmlFor your use-case you will want to use DocumentConverterAnnotationsMode.Embed, to embed the annotations into the TIFF or PDF file. We do have a tutorial on how to use the DocumentConverter class located here:
https://www.leadtools.co...-document-converter.htmlIf you have any further questions regarding the process above please feel free to reach back out to us.
Thanks
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Document
Document SDK Questions
Save LeadDocument loaded DocumentViewer as vector/raster depending on input file?
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.