Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Mar 13, 2019 9:58 am

Hi team

I need to convert exist pdf to image
this exist pdf has three pages
but after convert to JPEG
there have some display promblems in the third JPEG
the Chinese Traditional word display have problems in the third JPEG
but first,second page display Chinese Traditional word is good

How do I solve it???

I try to change the font
below is my code

Spire.Pdf.PdfDocument pdfsrc = new PdfDocument(fileInfo.FullName);
PdfUsedFont[] fonts = pdfsrc.UsedFonts;
Font font1 = new Font("Arial Unicode MS", 11f);
PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font1, true);
foreach (PdfUsedFont font in fonts)
{
font.Replace(trueTypeFont);
}

for (int i = 0; i < pdfsrc.Pages.Count; i++)
{
sDestFilePathTemp = string.Format("{0}_{1}.jpg", fileInfoOut.FullName, i + 1);
Image img = pdfsrc.SaveAsImage(i);
img.Save(sDestFilePathTemp, System.Drawing.Imaging.ImageFormat.Jpeg);
}

I get exception
The font being replaced is not a standard font of Type 1 font or a non-embeded TrueType font

I find it happend to change MingLiU font

I use spire.pdf 5.3.2 from Nuget
(packages\Spire.PDF.5.3.2\lib\net46\Spire.Pdf.dll)

Spire.Pdf.dll version is 5.3.2.2046

How do I solve it??

I already upload the exist PDF file

kyotsai
 
Posts: 9
Joined: Mon Mar 07, 2016 9:05 am

Thu Mar 14, 2019 6:48 am

Hello,

Thank you for contacting us.
I did notice the display problems in the third generated JPEG and have submitted it to our Dev team for further investigating and fixing, if there is any update, we will let you know. Sorry for the inconvenience caused. Besides, after the analysis of your PDF, we found there is an embeded font like the attached screenshot shows. Please kindly note that the embeded font can not be replaced. Thus, you got the exception.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Mar 14, 2019 7:07 am

Hello.

so your team will fix the problems of convert PDF to JPEG function??

I can just convert it without replace font??

kyotsai
 
Posts: 9
Joined: Mon Mar 07, 2016 9:05 am

Thu Mar 14, 2019 7:28 am

Hello,

Thanks for your quick responce.
Yes, our Dev team will do a further investigation about converting to JPEG function and fix it, and we will keep you informed if there is any progress.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Mar 20, 2019 8:01 am

Hi team

Is there any update??

kyotsai
 
Posts: 9
Joined: Mon Mar 07, 2016 9:05 am

Wed Mar 20, 2019 9:10 am

Hello,

Sorry there is no significant progress so far due to the complexity of the case. Our dev team is still doing some investigations about this issue. Once there’s any update, I will let you know immediately. Thanks for your patience.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Mon Apr 15, 2019 4:19 am

Hi team

Any update??

kyotsai
 
Posts: 9
Joined: Mon Mar 07, 2016 9:05 am

Mon Apr 15, 2019 10:55 am

Hello,

Thank you for following up.
Sorry there is no good news yet, our Dev team is still working on this issue. I have urgent them and added a high priority to the issue. Once there is any update, I will inform you immediately.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Dec 18, 2019 11:24 am

Hi team

any update?

kyotsai
 
Posts: 9
Joined: Mon Mar 07, 2016 9:05 am

Thu Dec 19, 2019 6:21 am

Hello,

Thanks for your reply.
Sorry the issue hasn't been resolved yet. I learned from our Dev team that this issue is related the glyphs recognition. When converting PDF to images, it needs to determine which characters exist on the PDF page. This is achieved by recognizing the glyphs. However, when recognizing the glyphs of your PDF file, some characters were recognized incorrectly. This caused the issue. Our Dev team would keep looking for solutions. Once there is any good news, we will keep you informed. Thanks for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Jun 17, 2020 10:06 am

Hello,

Thanks for your patience.
Glad to inform you that the reported issue has been resolved with our asian version. We prepared a temporary version (spire.pdf-asian_6.6.2.zip) for you. Please download and refer to the following sample code to test it firstly.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"AML_SPF_Daily_20190104163229.pdf");
List<Image> ListImage = new List<Image>();
for (int i = 0; i < doc.Pages.Count; i++)
//set true for Asia font
{ ListImage.Add(doc.SaveAsImage(i,true)); }
if (ListImage.Count > 0)
{
    for (int i = 0; i < ListImage.Count; i++)

    { Image image = ListImage[i]; image.Save(@"image" + (i + 1).ToString() + ".png", System.Drawing.Imaging.ImageFormat.Png); }
}

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Tue Jul 21, 2020 6:48 am

Hello,

Greetings from E-iceblue.
Did the asian version work for you? Thanks in advance for your feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF