Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Saturday, September 19, 2020 6:36:42 AM(UTC)
username77

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)
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, September 21, 2020 2:03:07 PM(UTC)
Matthew Bresson

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.html

The 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.html
You 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.html
For 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.html

If 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
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.104 seconds.