How to improve the resolution of the image?
Hi! I have tested the library and it works very well. I would like to know if you can improve the resolution of the image. Thank you very much.
Did you find any solution for this?
Sorry pretty busy recently with my works, did not have a chance to look at how to resolve this. One way that you may try is to change the Pdf2Image.PrintQuality = 100. If not working, I will look into this issue during weekend.
Hello Friend, Thank you very much for your answer. Is it possible that the lack of quality is due to the type of font used in the PDF? Can I send you my PDF for you to try it on? Thank you very much
@davinchi7 thanks for the demo.pdf, i think you are right about the font. i was tuning the fonts for the pdf convert, still working on it. below are some of the config i was experimenting:
`/*
cs_pdf_to_image.Pdf2Image.Config.DisablePrecompiledFonts = true;
cs_pdf_to_image.Pdf2Image.Config.DisablePlatformFonts = true;
cs_pdf_to_image.Pdf2Image.Config.DisableFontMap = true;*/
cs_pdf_to_image.Pdf2Image.Config.FontPath.Add(cs_pdf_to_image.Pdf2Image.GetProgramFilePath("arial.ttf"));
cs_pdf_to_image.Pdf2Image.Config.SubstitutionFont = "arial";
`
The result is still not good. I will do more test and tuning to see if can get this fixed. if you have some suggestion, pls also share :)
In Pdf2Image need set ResolutionX and ResolutionY for PDFConvert. This will increase resolution of the image. I think need to provide additional properties for this in Pdf2Image.
Yes I know my reply is just toooooo late but it works for me like this so I said to my self why mot posting.
In the Pdf2Image file you should find those lines.
converter.FitPage = true;
converter.JPEGQuality = mPrintQuality; //80
converter.OutputFormat = "tifflzw";
// here you add for a rez of 1700x2200
converter.ResolutionX = 200;
converter.ResolutionY = 200;
That it. hope it helps someone.
Yes I know my reply is just toooooo late but it works for me like this so I said to my self why mot posting.
In the Pdf2Image file you should find those lines.
converter.FitPage = true;converter.JPEGQuality = mPrintQuality; //80converter.OutputFormat = "tifflzw";// here you add for a rez of 1700x2200converter.ResolutionX = 200;converter.ResolutionY = 200;That it. hope it helps someone.
Where do you see these options?
According to my experiment, the following codes helps:
// dpi
converter.ResolutionX = 200;
converter.ResolutionY = 200;
// bit depths - 32bits
converter.OutputFormat = "pngalpha";
// poor effect to modify this
converter.TextAlphaBit = 4;
converter.GraphicsAlphaBit = 4;
// correct location of image
converter.FitPage = false;