We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

"woff" Extension Error

image.png (2.3 KB)

image.png (5.8 KB)

image.png (6.6 KB)

image.png (76.2 KB)

Hi

My .css link : http://localhost/BimserViewerUI/viewer/resources/e89d08b6-9077-43c1-817a-8d8859baf0e0_docx/p1_s.css

My .woff linl: http://localhost/BimserViewerUI/viewer/resources/e89d08b6-9077-43c1-817a-8d8859baf0e0_docx/p1_f.woff

Unable to load “.woff”. Because return link from groupdocs is false

wrong link: “.woff” link “http://localhost/BimserViewerUI/viewer/resources/e89d08b6-9077-43c1-817a-8d8859baf0e0_docx/viewer/resources/e89d08b6-9077-43c1-817a-8d8859baf0e0_docx/p1_f.woff

@Kkacar

The fourth screenshot shows the place where the resource URL is generated. It seems that the srting that is assigned to the urlPrefix variable should not start with the . (dot) character. Also, please make sure to remove previously generated cache files.

here we use “groupdocs viewer” in “iframe”. When we delete the point, the css is not loaded either. This is because “iframe” has no baseurl.

@Kkacar

There are a couple of possible solutions here that I can see:

  1. Generate different URLs for resources based on Resource object property bool Nested {get;} that indicates whether resource resides inside another resource, e.g. font resource that resides in CSS or SVG resource.
 public string CreateResourceUrl(int pageNumber, Resource resource) 
 {
    //TODO: decide on resource URL using `resource.FileName` and `resource.Nested` 
    Console.WriteLine($"Resource: {resource.FileName}, Nested: {resource.Nested} ");
 
    var url = $"./test/p_{pageNumber}_{resource.FileName}";
    return url;
 }
  1. Generate absolute URLs for resources

Thank you. I used this method for solution. It worked. :slight_smile:

1 Like

@Kkacar

You’re welcome! Thank you for the feedback!