PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Dec 07, 2022 7:47 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jul 14, 2022 1:39 pm 
Offline

Joined: Wed Jul 13, 2022 1:27 pm
Posts: 2
Hello!

Could you please help me with setting proper options to shrink document size?

I am trying to reduce file size of .pdf reports that are downloaded from SSRS, then sent to network printers and their copies are stored on a server.

The problem is, when the files are downloaded from SSRS without fonts embedded, they have small size but some HP printers fail to print them.
Installing needed fonts to those printers currently is inappropriate solution, unfortunately.

My intention is to download files in a standard .pdf (containing fonts) format and send them as they are to printers, and then reduce the file sizes using PdfSharp for saving them to a disk. The files are copied and in some cases combined, so new PdfDocuments are created, after that page copies of initial docs are added to them.

I tried methods like the following:
Code:
document.Options.FlateEncodeMode = PdfFlateEncodeMode.BestCompression;
document.Options.NoCompression = false;
document.Options.CompressContentStreams = true;

These options were applied to an empty document before pages were copied to it, but it didn't help. The documents contain text and tables only (no images that could be compressed).

Could you please advise on what approach should be chosen to shrink those files (in ideal world, how to unembed fonts, but maybe I should look for another methods)?

Sorry if my message is too complicated.
Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 14, 2022 8:04 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 750
Location: CCAA
Hi!

PDFsharp cannot unembed fonts. PDFsharp does not merge embedded fonts when combining documents.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 15, 2022 8:05 am 
Offline

Joined: Wed Jul 13, 2022 1:27 pm
Posts: 2
OK, clear.

Thanks for your answer!
And does PdfSharp allow embed fonts in an existing document?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group