PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Dec 16, 2017 7:22 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Nov 01, 2017 6:05 am 
Offline

Joined: Wed Nov 01, 2017 5:35 am
Posts: 3
Hi, all!
I want to split many pdf documents to many pdf, but merge them by page size.
and i have a problem with fonts. in my screan pdf documet looks good, but when i print it some of font looks bad on paper (look attach).
how can i copy from input documents all fonts? Or what i can do, to solve this problem?
I try different printers and different computers. from the original file this paper printed ok.
Code:
  foreach (string file in FileList)
            {
               PdfDocument doc = PdfReader.Open(file, PdfDocumentOpenMode.Import);
               for (int i = 0; i < doc.Pages.Count; i++)
                {
                    var page = doc.Pages[i];
                    int height = (int)page.Height.Millimeter;
                    int width = (int)page.Width.Millimeter;
                    string fName = height + "x" + width;
                    string fullFilePath = path + "\\" + textBox1.Text + "\\" + fName + ".pdf";
                    PdfDocument ndoc;
                    try
                    {
                         ndoc = PdfReader.Open(fullFilePath, PdfDocumentOpenMode.Modify);
                    }
                    catch
                    {
                        ndoc = new PdfDocument();
                    }

                    PdfPage inpage = ndoc.AddPage(page);
                    ndoc.Save(fullFilePath);
                    }
             }
}
PdfPage inpage = ndoc.AddPage(page);
ndoc.Save(fullFilePath);

when I try attach pdf file "forum" tell me :"its a invalid image" (((
Please, Help. name of font: "G OldStyle TType A".
this problem where with other fonts, but not all.


Attachments:
File comment: after print
AfterSplitPrint.jpg
AfterSplitPrint.jpg [ 116.91 KiB | Viewed 243 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 01, 2017 7:46 am 
Offline
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 308
Location: CCAA
BadBoy wrote:
when I try attach pdf file "forum" tell me :"its a invalid image" (((
You did read this, didn't you:
viewtopic.php?f=2&t=832

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 01, 2017 10:31 am 
Offline

Joined: Wed Nov 01, 2017 5:35 am
Posts: 3
PDFsharp.1.50.4619-beta4c, windows Forms, NuGet Package


Attachments:
File comment: after my program. printing bad
AfterSplit.zip [109.9 KiB]
Downloaded 9 times
File comment: Original pdf with font. printing good.
Original.zip [111.24 KiB]
Downloaded 9 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 21, 2017 7:57 am 
Offline

Joined: Wed Nov 01, 2017 5:35 am
Posts: 3
Please, help. I still dont find an answer. :oops:


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 7 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:  
Powered by phpBB® Forum Software © phpBB Group