PDF Compression (Stream)

Discussions about PDF management.
Post Reply
Evgeniy
Posts: 3
Joined: Sun Nov 25, 2018 10:48 am

PDF Compression (Stream)

Post by Evgeniy » Tue Apr 02, 2019 5:30 pm

Hi, tried
PDF Compression from official documentation
http://guides.gdpicture.com/content/web ... ments.html

Not Working Good.....
If need file i can send in private....

We implement in this way:
GdPicturePDF oGdPicturePDF = new GdPicturePDF();
GdPictureStatus status = default(GdPictureStatus);

status = oGdPicturePDF.LoadFromStream(new MemoryStream(Convert.FromBase64String(base64)));
if(status != GdPictureStatus.OK)
{
return base64;
}
oGdPicturePDF.EnableCompression(true);
oGdPicturePDF.SetCompressionForBitonalImage
MemoryStream stream = new MemoryStream();
status = oGdPicturePDF.SaveToStream(stream);
if(status == GdPictureStatus.OK)
{
string result = Convert.ToBase64String(stream.ToArray());
if(result != null && result.Length > 0)
{
return result;
}
}

Gabriela
Posts: 378
Joined: Wed Nov 22, 2017 9:52 am

Re: PDF Compression (Stream)

Post by Gabriela » Wed Apr 03, 2019 9:53 am

Hi,

Try to use this method for saving:
SaveToStream(Stream,Boolean) Method

You can also try our end-user software to compress your PDF documents:
ORPALIS PDF Reducer
Kind regards,

Gabriela
GdPicture Team

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest