PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Oct 19, 2019 9:11 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Jun 20, 2012 12:55 pm 
Offline

Joined: Mon Sep 12, 2011 1:09 pm
Posts: 23
Hi,

I have the printing issue in this pdf only for few users.

The printing issue is that the user can view the pdf information properly but when they take print out , the information on the pdf is misaligned.

Please find attached the file for the screenshot of the printing issue.
Attachment:
PrintingIssue.png
PrintingIssue.png [ 126.27 KiB | Viewed 3181 times ]


The users doubt on the font encoding used in this pdf.

I used the below code to define the font encoding.


XFont font = new XFont("Arial", 10, "Regular", new XPdfFontOptions(PdfSharp.Pdf.PdfFontEncoding.Unicode, PdfSharp.Pdf.PdfFontEmbedding.Always));

Please find attaced the screenshot for the pdf properties to show this encoding information.

Attachment:
DocumentProperties.png
DocumentProperties.png [ 43.63 KiB | Viewed 3181 times ]


I planned to change the above code like below.
XFont font = new XFont("Arial", 10, "Regular",new XPdfFontOptions(PdfSharp.Pdf.PdfFontEncoding.WinAnsi, PdfSharp.Pdf.PdfFontEmbedding.Always));

Please let me know whether the above code will work or any other suggestion.

And i assume that these users getting this issue when they taking print out through virtual printer which may have an issue with encoding.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 20, 2012 1:45 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2980
Location: Cologne, Germany
Hi!

I don't see Arial in the Document Properties on your screen shot.
Making changes to a font that is not use in the document probably will have no effect on the PDF file which is generated.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 21, 2012 12:30 pm 
Offline

Joined: Mon Sep 12, 2011 1:09 pm
Posts: 23
Hi,

I mentioned this font-"Arial" for an example.

Actually we are using CHSans (customized font) which needs to be installed (wint be available by default).

Actually we are not fully embedding this customized font.Instead, we are subseting this font.

I got a info. about these two embedding types.

Embedding Fonts
If you embed the whole font in the PDF, the person on the other end can make changes to it even if he didn't have your font, if he has the full version of Acrobat or another program with the capability of modifying PDFs. The file size of the PDF would also be bigger because you are embedding the entire font.

Subsetting Fonts
If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font. When you subset a font, you usually just embed the characters you are using (obviously it depends on how you are subsetting your font). That's why somebody on another computer would have to have your same font in order to make changes.


As of now , i have a solution to change the subset type to ANSI line below.

XFont font = new XFont("Arial", 10, "Regular",new XPdfFontOptions(PdfSharp.Pdf.PdfFontEncoding.WinAnsi, PdfSharp.Pdf.PdfFontEmbedding.Always));

But if it is not working then i planned to change the embedding type.

Please let me know how to embed the font instead of subset.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 22, 2012 3:57 pm 
Offline

Joined: Mon Sep 12, 2011 1:09 pm
Posts: 23
Hi,

Gentle Reminder.I am looking forward to your reply.

Please let me know if you are not clear with my explanation.

Thanks & regards
Vadivelan.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 23, 2012 4:14 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 317
Hi!

AFAIK you can only choose between no embedding or embedding of the required subset. Embedding of the complete fonts is IIRC not implemented.

I don't see a relation between font embedding and the printing problem shown in your first post.

_________________
Ă–hmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2018 2:11 pm 
Offline

Joined: Mon Jul 30, 2018 1:40 pm
Posts: 15
How can i choose to embed the required subset only?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2018 2:21 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2980
Location: Cologne, Germany
Thariama wrote:
How can i choose to embed the required subset only?
Subsetting or full embedding is done by PDFsharp automatically and AFAIK there is no control over it.

This thread is from 2012 and therefore it cannot be about PDFsharp 1.50.
The behavior could be different between the current version PDFsharp 1.50 RC2 and the version discussed here.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 208 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group