7zip - How to compress PDF file using sevenzipsharper in c#? -


i can compress directory using following code:

string dll = @"d:\7z.dll"; string source = @"d:\sample"; string output = @"d:\my7zipped.7z"; sevenzipbase.setlibrarypath(dll); sevenzipcompressor compressor = new sevenzipcompressor(); compressor.zipencryptionmethod = zipencryptionmethod.aes256; compressor.compressionmethod = compressionmethod.lzma2; compressor.compressionlevel = compressionlevel.normal; compressor.compressdirectory(source, output); 

but want compress single pdf file. how can compress single pdf file?

use sevenzipcompressor.compressfiles method instead of sevenzipcompressor.compressdirectory.

please try find out basics (like this) yourself. supposed work on own before asking here.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -