Our healthcare customer reported that the PDF images transferred to html through your service became grainy that makes it difficult for them to identify the content (especially hand writing). Is there any way that we can increase the PDF resolution or sharpen the result.
Aspose verion: 23.5
@Yvonne_Lin
Does problem occur on latest version which is 24.7?
If it’s true please share code and files that reproduce your issue - maybe there’s some workaround or settings that can help
We bought the license with 23.5 though. Can we upgrade it directly to 23.7?
@Yvonne_Lin
As I know there shouldn’t be any issues - at least I never come across with any with upgrading
@ilyazhuykov , We are having problems upgrading to Aspose.pdf 24.7 as it does support .net 4.6.2. Could you provide us the version supporting .net 4.6.2?
34>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2401,5): warning MSB3274: The primary reference “Aspose.PDF, Version=23.5.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL” could not be resolved because it was built against the “.NETFramework,Version=v4.8.1” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.6.2”.
34>…: error CS0234: The type or namespace name ‘Pdf’ does not exist in the namespace ‘Aspose’ (are you missing an assembly reference?)
image.png (24.3 KB)
image.png (9.7 KB)
@Yvonne_Lin
You probably should check it here
There’s a version 24.7 for old version of .NET frameworks
Aspose.PDF for .NET Framework 4.0 24.7 (DLLs only)
@ilyazhuykov , we have upgraded it to the latest version but seems it’s not helping on our image compressing issue. Could you provide us some other work around that might help on this?
undefined.jpg (282.7 KB)
undefined (1).jpg (304.4 KB)
@Yvonne_Lin
Could you provide examples of input files and grainy image results so I can compare them to the investigation results, please ?
Hi There,
Here is the sample scanned doc pdf file we use :
scandoc_1.pdf (223.3 KB)
And here are the screenshot comparison of scanned doc displaying through Aspose (scandoc_on_IF.jpg) and not through Aspose (scanddoc_on_RR.jpg).
scandoc_on_IF.jpg (53.2 KB)
scanddoc_on_RR.jpg (126.0 KB)
Yvonne
@Yvonne_Lin
I checked the issue, it’s a bit vague for me how grainy result is obtained
I tried the bare minimum for PDF to HTML conversion:
Document pdfDocument = new Document(input);
HtmlSaveOptions options = new HtmlSaveOptions();
pdfDocument.Save(output, options);
The output is following
scandoc_output.zip (3.1 MB)
Could you check this output and confirm if image is indeed lost in quality and does your code contain any additional HTML save options?
When I check source pdf and output html side by side on 200% zoom they seem identical to me
source_pdf_z200%.jpg (127.0 KB)
html_output_z200%.jpg (124.8 KB)
We had a quick test and the resolution does improved with your suggested amendment. Thanks a lot!