Could not handle plus-minus-sign

Sample Code as following:

 Resolution resolution = new Resolution((int)162);
 JpegDevice jpegDevice = new JpegDevice(resolution, (int)162);
 OutputStream output = new FileOutputStream("C:\\temp\\output.png");
 Document doc2 = new Document("C:\\temp\\plus-minus.pdf");
 Page pageForAsposePdf = doc2.getPages().get_Item(1);
 jpegDevice.process(pageForAsposePdf, output);
 output.close();

Result: plus/minus sign missing in “output.png”.

Thanks for helpplus-minus-sign.zip (170.2 KB)

@ruhongcai

We were able to replicate the issue in our environment using following code snippet with Aspose.PDF for .NET 19.8.

Document pdfDocument = new Document(dataDir + "plus-minus.pdf");
for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
{
 string tmpImgToInsert = pageCount + "_" + DateTime.Now.Ticks + ".png";
 using (FileStream imageStream = new FileStream(dataDir + tmpImgToInsert, FileMode.Create))
 {
  // Create Resolution object
  Resolution resolution = new Resolution(162);
  PngDevice pngDevice = new PngDevice(resolution);
  pngDevice.Process(pdfDocument.Pages[pageCount], imageStream);
  imageStream.Close();
 }
}

We have logged an issue as PDFNET-46792 in our issue tracking system for further investigation. We will look into details of it and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hello,

we are experiencing the same issue with Aspose.Pdf.dll version 21.4.0.0. Printing a PDF file containing a plus-minus-sign prints a blank character instead.

Could we expect a fix for this issue?

Thanks

@mszardsap

Could you please try with 21.12 version of the API which is the latest one. In case the issue still persists, please share your sample PDF along with the code snippet that you are using. We will test the scenario in our environment and address it accordingly.