Viewin multipage Tiff as PDF

Hi
For some reason we are required to view multipaged .tiff or .tif files as pdf.

Is there any advice you can give us?

We have Total license, so we also tried conversion method.But this did not go well.
Tried giving pdfViewoptions to viewer.That also didn’t work.

We have latest .Net Nugets and sample .Net+Angular sample from your github.
Local device is Windows11

@Kuropetti

You can use GroupDocs.Viewer. It renders each TIFF frame as a separate page.
See this viewernet-sample.zip (210.7 KB) that includes TIFF with two frames and output PDF with two pages. No special options required:

using (Viewer viewer = new Viewer("33266.tif"))
{
    PdfViewOptions viewOptions = new PdfViewOptions();
    viewer.View(viewOptions);
}

Yes we can view tiff files that way.
But it renders it with Htlm view, each page as png.

After zoom in and out , there are some blank pages appear at the bottom of the document.
This error led forced us to find an alternative.

We think , we need to view them as Pdf .

Here is the problem.
example document is 7 pages tiff file. Scroll is normal.
image.png (13.6 KB)

after zoom out
image.png (20.4 KB)

Even we are at the last page, scroll looks like there is thousands of pages. So we cant navigate with scroll.

Thanks

@Kuropetti

Can you please send the file for investigation?

To view the file as PDF you can try pdf.js. You can use Viewer or Conversion to convert a file to PDF and then View it using pdf.js.

Here is a sample document.

Bimser Synergy
Go to the latest page and press the zoom-out button, You will see it creates a gap under pages.

Conversion did not work for us because there are multiple types of servers and file restrictions on our side.
I tried conversion with caching but it is incompatible with our caching mechanisms.

Thanks

@Kuropetti

Thank you for sharing the link to your application. This issue is related to the incorrect pages container height calculation at this line:

Quick fix: you can locate this.height=o/i-s/i+"px" in the main.js file and replace it with this.height="0px". This fixes the empty space on zoom but does not resolves the root cause of this issue.

For the further analysis of this issue we would need the Angular application that you’re using.

Applying that solution on browser solves the problem only on that browser.
But we cant change main.js on the server side, it is going through a build process and creates its own main.js.

The problem does not happen on your latest sample. It doesn’t happen on our local either.

Tried to view sample I provided on your online viewer but there is a size limit I guess

I am sorry but I am not allowed to share our code at the moment.

Thanks

This is the link to view document, you can also view related code from browser.
https://trunk.bimser.net/#/_redirect/cFzykI2P5WfU4tw0dnge8v

@vladimir.litvinchik
Hello again,
During my research I found these two Commits of your old product.

Is that related to our problem. I it possible we are facing same or similar error at new product?
Thanks.

@Kuropetti

After checking the commits I don’t think that they are related to the issue you shared. Since you can’t share the code I can point you to the possible places in the source code that is causing the issue:

I tested other types as well. This problem is not TIFF-specific; it also happens in pdf files.

When I looked at the code at browser,you previously mentioned,
image.png (15.6 KB)

I saw that the parent element’s height is the problem and, as you can see in the image, it refers to "#document. doocument.

I forgot to mention , I am using iframe to show viewer.and using this simple code:

image.png (4.0 KB)

and it creates an element structure like this :
image.png (8.0 KB)

I hope this could help us .

Thanks for all your patience and help.

@Kuropetti

It may be related to iframe specifics. We’ll take a look.

Hello again,

Could problem be related to these elements?
image.png (7.2 KB)

Because When I add this property to this elemnts css at the browser it fixes problem.
image.png (19.0 KB)

I guess its related to this .less file on your project.

GroupDocs.Total-Angular/libs/common-components/src/lib/document/document.component.less at 0f1ca90d01dd3574c23b862f40ccf7fc1d19ce5c · groupdocs-total/GroupDocs.Total-Angular · GitHub

Could adding “height: 100%” property be a solution in .document tag here?

Thanks

@Kuropetti

Thank you for sharing your findings, we’ll take a look and update you.

Hi ,
Did you have an opportunity to check?

@Kuropetti

Unfortunately, we haven’t looked into this issue yet. I have planned the investigation for the next week.

hello, is there any update about that issue?

@mtiryaki

Unfortunately, we do not have any updates at the moment. As soon as we have new new information we’ll let you know.

@Kuropetti

The issue with multipage TIFF and PDF files was fixed in the latest version of GroupDocs.Viewer.UI package.

Please let us know if you have any questions or you need any help in integrating new package version.