Free Support Forum - groupdocs.com

GroupdocsViewer (3.2.2) is failing to get pages using InputStream

GroupdocsViewer (3.2.2) is failing to get pages of the documents during the development phase intermittently. Below is the code snippet to get the pages in html format and we are passing InputStream object in getPages method.

List htmlPages = null;
try {
ResourceResolver rr = resolverFactory.getAdministrativeResourceResolver(null);
Resource resource = rr.getResource("/content/dam/docviewerassets/"+filename);
Asset asset = resource.adaptTo(Asset.class);
htmlPages = ViewerUtils.getViewerHtmlHandler().getPages(asset.getOriginal().getStream(), htmlOptions);
} catch (Exception x) {
throw new ServletException(x);
}

pageHtml is blank in the ViewDocument servlet response.

{"success":true,"path":"TestViewer.pdf","docType":"Pdf","fileType":"Pdf","url":"http://localhost:4502/services/GetFile?path=TestViewer.pdf&getPdf=false&useHtmlBasedEngine=false&supportPageRotation=false","pdfDownloadUrl":"http://localhost:4502/services/GetFile?path=TestViewer.pdf&getPdf=true&useHtmlBasedEngine=true&supportPageRotation=false","name":"TestViewer.pdf","imageUrls":null,"lic":true,"pdfPrintUrl":"http://localhost:4502/services/GetPdfWithPrintDialog?path=TestViewer.pdf&useHtmlBasedEngine=true&supportPageRotation=false","pageHtml":[],"pageCss":[""],"documentDescription":"{\"maxPageHeight\":792,\"widthForMaxHeight\":792,\"pages\":[{\"w\":612,\"h\":792,\"number\":0},{\"w\":612,\"h\":792,\"number\":1}]}","urlForResourcesInHtml":null,"sharedCss":null}

Issue is reproducible in 3.7.0 wherein it is unable to get pages if we refer InputStream,

Docview support team, please assist.

Hi Girisankar,


Sorry for the inconvenience you are facing.
We shall investigate your issue and let you know about the outcomes.

Have a nice weekend.
Best regards

Hi Again,


We are not able to reproduce this issue using GroupDocs.Viewer for Java 3.2.2. Did you explore our Servlets based showcase project?
Can you please provide us the problematic file?

Best regards

Yes, we are using the Groupdocs viewer showcase for Servlet to view the document. Is there a secured way that I can use to share code?

Can you join a webex call in the future, so that we can share the code with you and determine the root cause for these issues? We will like to resolve these issues as soon as possible.

Hi Chetan,


Can you join a webex call in the future
Please note that we facilitate our customers via calls but only for the issues that are raised in priority or enterprise support forums.
Or you can share your code in a new private thread.

Many Thanks
package com.viewer.servlets;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;

import javax.servlet.ServletException;

import org.apache.commons.io.IOUtils;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.LoginException;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.day.cq.dam.api.Asset;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.groupdocs.viewer.converter.options.ConvertImageFileType;
import com.groupdocs.viewer.converter.options.FileDataOptions;
import com.groupdocs.viewer.converter.options.HtmlOptions;
import com.groupdocs.viewer.domain.FileData;
import com.groupdocs.viewer.domain.PageData;
import com.groupdocs.viewer.domain.containers.DocumentInfoContainer;
import com.groupdocs.viewer.domain.html.HtmlResource;
import com.groupdocs.viewer.domain.html.HtmlResourceType;
import com.groupdocs.viewer.domain.html.PageHtml;
import com.groupdocs.viewer.domain.options.DocumentInfoOptions;
import com.viewer.model.FileDataJsonSerializer;
import com.viewer.model.Utils;
import com.viewer.model.ViewDocumentParameters;
import com.viewer.model.ViewDocumentResponse;
import com.viewer.model.WatermarkPosition;
import com.viewer.model.helper.DotNetToJavaStringHelper;
import com.viewer.model.helper.ImageUrlHelper;
import com.viewer.model.helper.RefObject;
import com.viewer.utils.ViewerUtils;


//@WebServlet("/ViewDocument")
@Component(immediate = true, description = "Doc viewer servlet")
@Service(value = javax.servlet.Servlet.class)
@Properties(value = {
@Property(name = "sling.servlet.extensions", value = {"html", "json"}),
@Property(name = "sling.servlet.methods", value = {"GET", "POST"}),
@Property(name = "sling.servlet.paths", value = {"/services/ViewDocument"})
})
public class ViewDocument extends SlingAllMethodsServlet {
private static final long serialVersionUID = 1L;
private static final Logger LOG = LoggerFactory.getLogger(ViewDocument.class);
//private static String _locales = (System.getProperty("user.dir") + "\\src\\main\\webapp\\storage\\temp\\").replace("\\", "/");
final ReentrantLock lock = new ReentrantLock();
private final ConvertImageFileType _convertImageFileType = ConvertImageFileType.JPG;
public String _licensePath = "D:\\GroupDocs.Total.Java.lic";
List temp_cssList;
@Reference
private ResourceResolverFactory resolverFactory;

@Override
protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
throws ServletException, IOException {

response.addHeader("Content-Type", "application/json");
ViewDocumentParameters params = new ObjectMapper().readValue(request.getInputStream(), ViewDocumentParameters.class);

ViewDocumentResponse result = new ViewDocumentResponse();
/*InputStream stream = this.getClass().getClassLoader()
.getResourceAsStream(params.getPath());
Path temp =Files.createTempFile("tmp","."+getFileExtension(params.getPath()));
Files.copy(stream, temp, StandardCopyOption.REPLACE_EXISTING);*/
ResourceResolver rr;
try {
rr = resolverFactory.getAdministrativeResourceResolver(null);
} catch (LoginException x) {
throw new ServletException(x);
}
Resource resource = rr.getResource("/content/dam/docviewerassets/"+params.getPath());
Asset asset = resource.adaptTo(Asset.class);
Path temp = null;
try {
temp = Files.createTempFile("tmp","."+getFileExtension(params.getPath()));
Files.copy(asset.getOriginal().getStream(), temp, StandardCopyOption.REPLACE_EXISTING);
} catch (Exception x) {
throw new ServletException(x);
}
FileData fileData = ViewerUtils.factoryFileData(temp.toAbsolutePath().toString());
LOG.error("Check pageCount"+fileData.getPageCount());
//FileData fileData = ViewerUtils.factoryFileData(asset.getOriginal().getStream());
DocumentInfoContainer docInfo = null;

try {
result.setDocumentDescription((new FileDataJsonSerializer(fileData, new FileDataOptions())).Serialize(false));
} catch (ParseException x) {
throw new ServletException(x);
}

if (params.getUseHtmlBasedEngine()) {
try {
//DocumentInfoOptions options = new DocumentInfoOptions();
//docInfo = ViewerUtils.getViewerHtmlHandler().getDocumentInfo(asset.getOriginal().getStream());
docInfo = ViewerUtils.getViewerHtmlHandler().getDocumentInfo(new DocumentInfoOptions(temp.toAbsolutePath().toString()));
LOG.error("Check2 documentType=="+docInfo.getDocumentType()+"docinfo" +docInfo.getName());
//Files.deleteIfExists(temp);
//stream.close();
} catch (Exception x) {
throw new ServletException(x);
}
result.setPageCss(new String[0]);
result.setLic(true);
result.setPdfDownloadUrl(GetPdfDownloadUrl(params));
result.setPdfPrintUrl(GetPdfPrintUrl(params));
result.setUrl(GetFileUrl(params));
result.setPath(params.getPath());
result.setName(params.getPath());
result.setDocType(docInfo.getDocumentType());
result.setFileType(docInfo.getFileType());

HtmlOptions htmlOptions = new HtmlOptions();
htmlOptions.setResourcesEmbedded(true);
htmlOptions.setHtmlResourcePrefix("/GetResourceForHtml?documentPath=" + params.getPath() + "&pageNumber={page-number}&resourceName=");

if (!DotNetToJavaStringHelper.isNullOrEmpty(params.getPreloadPagesCount().toString())
&& params.getPreloadPagesCount().intValue() > 0) {
htmlOptions.setPageNumber(1);
htmlOptions.setCountPagesToConvert(params.getPreloadPagesCount().intValue());
} else {
htmlOptions.setPageNumber(1);
htmlOptions.setCountPagesToConvert(1);
}

String[] cssList = null;

RefObject<ArrayList> tempRef_cssList = new RefObject<ArrayList>(cssList);

//List htmlPages = GetHtmlPages(params.getPath(), htmlOptions);
//-------------
/* InputStream streamin = this.getClass().getClassLoader()
.getResourceAsStream("TestViewer.pdf");*/
List htmlPages = GetHtmlPages(temp.toAbsolutePath().toString(),params.getPath(), htmlOptions);
//streamin.close();
//-------------
cssList = tempRef_cssList.argValue;

ArrayList pagesContent = new ArrayList();
for (PageHtml page : htmlPages) {
pagesContent.add(page.getHtmlContent());
}
String[] htmlContent = pagesContent.toArray(new String[0]);
LOG.error("Check3 htmlContent=="+htmlContent);
result.setPageHtml(htmlContent);
result.setPageCss(new String[]{String.join(" ", temp_cssList)});
LOG.error("Check5 setPageHtml=="+result.getPageHtml().length);
for (int i = 0; i < result.getPageHtml().length; i++) {
String html = result.getPageHtml()[i];
LOG.error("Check6 result.getPageHtml()[i]=="+result.getPageHtml()[i]);
int indexOfScript = html.indexOf("script");
if (indexOfScript > 0) {
result.getPageHtml()[i] = html.substring(0, indexOfScript);
LOG.error("Check7 html.substring(0, indexOfScript)=="+html.substring(0, indexOfScript));
}
}

} else {


try {
docInfo = ViewerUtils.getViewerImageHandler().getDocumentInfo(new DocumentInfoOptions(params.getPath()));
} catch (Exception x) {
throw new ServletException(x);
}

int maxWidth = 0;
int maxHeight = 0;
for (PageData pageData : docInfo.getPages()) {
if (pageData.getHeight() > maxHeight) {
maxHeight = pageData.getHeight();
maxWidth = pageData.getWidth();
}
}

/*fileData.setDateCreated(new Date());
fileData.setDateModified(docInfo.getLastModificationDate());
fileData.setPageCount(docInfo.getPages().size());
fileData.setPages(docInfo.getPages());
fileData.setMaxWidth(maxWidth);
fileData.setMaxHeight(maxHeight);*/

result.setPageCss(new String[0]);
result.setLic(true);
result.setPdfDownloadUrl(GetPdfDownloadUrl(params));
result.setPdfPrintUrl(GetPdfPrintUrl(params));
result.setUrl(GetFileUrl(params.getPath(), true, false, params.getFileDisplayName(),
params.getWatermarkText(), params.getWatermarkColor(), params.getWatermarkPostion(),
params.getWatermarkWidth(), params.getIgnoreDocumentAbsence(), params.getUseHtmlBasedEngine(),
params.getSupportPageRotation()));
result.setPath(params.getPath());
result.setName(params.getPath());

result.setDocType(docInfo.getDocumentType());
result.setFileType(docInfo.getFileType());

int[] pageNumbers = new int[docInfo.getPages().size()];
int count = 0;
for (PageData page : docInfo.getPages()) {

pageNumbers[count] = page.getNumber();
count++;
}
String applicationHost = request.getScheme() + "://" + request.getServerName() + ":"
+ request.getServerPort();
String[] imageUrls = ImageUrlHelper.GetImageUrls(applicationHost, pageNumbers, params);
LOG.error("Check4 imageUrls=="+imageUrls);
result.setImageUrls(imageUrls);

}


new ObjectMapper().writeValue(response.getOutputStream(), result);

}

private String getFileNameWithoutExtension(String fileName) {
try {

return fileName.replaceFirst("[.][^.]+$", "");

} catch (Exception exp) {
System.out.println("Exception: " + exp.getMessage());
exp.printStackTrace();
return null;
}

}
private String getFileExtension(String name) {
try {
return name.substring(name.lastIndexOf(".") + 1);
} catch (Exception e) {
return "";
}
}

////////////////////////////////////////////////////////////////////////////////////////////////////

public final String GetFileUrl(String path, boolean getPdf, boolean isPrintable, String fileDisplayName,

String watermarkText, Integer watermarkColor, WatermarkPosition watermarkPosition, Float watermarkWidth,
boolean ignoreDocumentAbsence, boolean useHtmlBasedEngine, boolean supportPageRotation) {
Map queryString = new LinkedHashMap();
String myUrl = "path=" + path;

queryString.put("path", path);

if (!isPrintable) {
queryString.put("getPdf", String.valueOf(getPdf).toLowerCase());
myUrl = myUrl + "&getPdf=" + String.valueOf(getPdf).toLowerCase();

if (fileDisplayName != null) {
queryString.put("displayName", fileDisplayName);
}
}

if (watermarkText != null) {
queryString.put("watermarkText", watermarkText);
queryString.put("watermarkColor", watermarkColor.toString());

if (watermarkPosition != null) {
queryString.put("watermarkPosition", watermarkPosition.toString());
}

if (watermarkWidth != null) {
queryString.put("watermarkWidth", (new Float((float) watermarkWidth)).toString());
}
}

if (ignoreDocumentAbsence) {
queryString.put("ignoreDocumentAbsence", String.valueOf(ignoreDocumentAbsence).toLowerCase());
}

queryString.put("useHtmlBasedEngine", String.valueOf(useHtmlBasedEngine).toLowerCase());
myUrl = myUrl + "&useHtmlBasedEngine=" + String.valueOf(useHtmlBasedEngine).toLowerCase();
queryString.put("supportPageRotation", String.valueOf(supportPageRotation).toLowerCase());
myUrl = myUrl + "&supportPageRotation=" + String.valueOf(supportPageRotation).toLowerCase();
String handlerName = isPrintable ? "GetPdfWithPrintDialog" : "GetFile";
String baseUrl = "http://localhost:4502/services/" + handlerName + "?" + myUrl;
String fileUrl = baseUrl + handlerName + queryString;
return baseUrl;
}

public String GetPdfDownloadUrl(ViewDocumentParameters parameters) {
return GetFileUrl(parameters.getPath(), true, false, parameters.getFileDisplayName(),
parameters.getWatermarkText(), parameters.getWatermarkColor(), parameters.getWatermarkPostion(),
parameters.getWatermarkWidth(), parameters.getIgnoreDocumentAbsence(),
parameters.getUseHtmlBasedEngine(), parameters.getSupportPageRotation());

}

private String GetPdfPrintUrl(ViewDocumentParameters request) {
return GetFileUrl(request.getPath(), true, true, request.getFileDisplayName(), request.getWatermarkText(),
request.getWatermarkColor(), request.getWatermarkPostion(), request.getWatermarkWidth(),
request.getIgnoreDocumentAbsence(), request.getUseHtmlBasedEngine(), request.getSupportPageRotation());
}

private String GetFileUrl(ViewDocumentParameters request) {
return GetFileUrl(request.getPath(), false, false, request.getFileDisplayName(), null, null, null, null, false,
false, false);
}
private List GetHtmlPages(String absolutePath, String filePath,HtmlOptions htmlOptions) throws ServletException, IOException {

List htmlPages = null;
try {
ResourceResolver rr = resolverFactory.getAdministrativeResourceResolver(null);
Resource resource = rr.getResource("/content/dam/docviewerassets/"+filePath);
Asset asset = resource.adaptTo(Asset.class);
//String url="http://localhost:4502/content/dam/docviewerassets/TestViewer.pdf";
//URI uri = new URI(url);
htmlPages = ViewerUtils.getViewerHtmlHandler().getPages(asset.getOriginal().getStream(), htmlOptions);
/*FileInputStream stream = new FileInputStream(absolutePath);
htmlPages = ViewerUtils.getViewerHtmlHandler().getPages(stream, htmlOptions);
stream.close();*/
} catch (Exception x) {
throw new ServletException(x);
}
temp_cssList = new ArrayList();

for (PageHtml page : htmlPages) {

int indexOfBodyOpenTag = page.getHtmlContent().indexOf("");

if (indexOfBodyOpenTag > 0) {
page.setHtmlContent(page.getHtmlContent().substring(indexOfBodyOpenTag + "".length()));
}

int indexOfBodyCloseTag = page.getHtmlContent().indexOf("");

if (indexOfBodyCloseTag > 0) {
page.setHtmlContent(page.getHtmlContent().substring(0, indexOfBodyCloseTag));
}

/////////////////////////

List test = page.getHtmlResources();

for (HtmlResource resource : page.getHtmlResources()) {

if (resource.getResourceType() == HtmlResourceType.Style) {
InputStream cssStream = null;
try {
cssStream = ViewerUtils.getViewerHtmlHandler().getResource(filePath, resource);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String text = IOUtils.toString(cssStream, "UTF-8");

boolean needResave = false;
if (text.indexOf("url(\"") >= 0 && text.indexOf("url(\"/GetResourceForHtml?documentPath=") < 0) {
needResave = true;
text = text.replace("url(\"", "url(\"/GetResourceForHtml?documentPath=" + filePath
+ "&pageNumber=" + resource.getDocumentPageNumber() + "&resourceName=");
}

if (text.indexOf("url('") >= 0 && text.indexOf("url('/GetResourceForHtml?documentPath=") < 0) {
needResave = true;
text = text.replace("url('", String.format("url(\'/GetResourceForHtml?documentPath=" + filePath
+ "&pageNumber=" + resource.getDocumentPageNumber() + "&resourceName="));
}

temp_cssList.add(text);

if (needResave) {

String fullPath = ViewerUtils.TEMP_PATH + filePath + "/" + "html" + "/" + "resources" + "/" + "page"
+ page.getPageNumber() + "/" + resource.getResourceName();
File file = new File(fullPath);

// if file doesnt exists, then create it
if (!file.exists()) {
file.getParentFile().mkdirs();
file.createNewFile();
}

FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write(text);
bw.close();

}
}
/////////////////////////
}
ArrayList cssClasses = Utils.GetCssClasses(page.getHtmlContent());
for (String cssClass : cssClasses) {
String newCssClass = "page-" + page.getPageNumber() + "-" + cssClass;

page.setHtmlContent(page.getHtmlContent().replace(cssClass, newCssClass));
for (int i = 0; i < temp_cssList.size(); i++) {
temp_cssList.set(i, temp_cssList.get(i).replace(cssClass, newCssClass));
}
}
}
return htmlPages;

}

/*private List GetHtmlPages(String filePath, HtmlOptions htmlOptions) throws ServletException, IOException {

List htmlPages = null;
try {
htmlPages = ViewerUtils.getViewerHtmlHandler().getPages(filePath, htmlOptions);
} catch (Exception x) {
throw new ServletException(x);
}
temp_cssList = new ArrayList();

for (PageHtml page : htmlPages) {

int indexOfBodyOpenTag = page.getHtmlContent().indexOf("");

if (indexOfBodyOpenTag > 0) {
page.setHtmlContent(page.getHtmlContent().substring(indexOfBodyOpenTag + "".length()));
}

int indexOfBodyCloseTag = page.getHtmlContent().indexOf("");

if (indexOfBodyCloseTag > 0) {
page.setHtmlContent(page.getHtmlContent().substring(0, indexOfBodyCloseTag));
}

/////////////////////////

List test = page.getHtmlResources();

for (HtmlResource resource : page.getHtmlResources()) {

if (resource.getResourceType() == HtmlResourceType.Style) {
InputStream cssStream = ViewerUtils.getViewerHtmlHandler().getResource(filePath, resource);
String text = IOUtils.toString(cssStream, "UTF-8");

boolean needResave = false;
if (text.indexOf("url(\"") >= 0 && text.indexOf("url(\"/GetResourceForHtml?documentPath=") < 0) {
needResave = true;
text = text.replace("url(\"", "url(\"/GetResourceForHtml?documentPath=" + filePath
+ "&pageNumber=" + resource.getDocumentPageNumber() + "&resourceName=");
}

if (text.indexOf("url('") >= 0 && text.indexOf("url('/GetResourceForHtml?documentPath=") < 0) {
needResave = true;
text = text.replace("url('", String.format("url(\'/GetResourceForHtml?documentPath=" + filePath
+ "&pageNumber=" + resource.getDocumentPageNumber() + "&resourceName="));
}

temp_cssList.add(text);

if (needResave) {

String fullPath = ViewerUtils.TEMP_PATH + filePath + "/" + "html" + "/" + "resources" + "/" + "page"
+ page.getPageNumber() + "/" + resource.getResourceName();
File file = new File(fullPath);

// if file doesnt exists, then create it
if (!file.exists()) {
file.getParentFile().mkdirs();
file.createNewFile();
}

FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write(text);
bw.close();

}
}
/////////////////////////
}
ArrayList cssClasses = Utils.GetCssClasses(page.getHtmlContent());
for (String cssClass : cssClasses) {
String newCssClass = "page-" + page.getPageNumber() + "-" + cssClass;

page.setHtmlContent(page.getHtmlContent().replace(cssClass, newCssClass));
for (int i = 0; i < temp_cssList.size(); i++) {
temp_cssList.set(i, temp_cssList.get(i).replace(cssClass, newCssClass));
}
}
}
return htmlPages;

}*/
}

Hi Again,


Thanks for sharing the code.
htmlPages = ViewerUtils.getViewerHtmlHandler().getPages(stream, htmlOptions);
Please try passing input file extension along with stream and htmlOptions to the getPages(). Like this, htmlPages = ViewerUtils.getViewerHtmlHandler().getPages(Stream, “.docx”, htmlOptions);
Considering that you are rendering a word document. Please try this way out and share your experience.

Many Thanks

I got the below error when I tried the option that you had suggested

Caused by: com.groupdocs.viewer.internal.c.a.ms.a.c: Please provide file name with extension e.g. document.doc

After providing the document name and type as parameter, I am able to see the document but the same content is present for all the pages.

Hi Chetan,


I am able to see the document but the same content is present for all the pages.
We are not able to reproduce your issue at our end. Let us share how we investigated your scenario and attached are the output files.

// Get document stream
FileInputStream stream = new FileInputStream("./Data/Storage/" + “demo.docx”);
HtmlOptions options = new HtmlOptions();
options.setResourcesEmbedded(true);
List pages = htmlHandler.getPages(stream, “.docx”, options);
System.out.println(pages.size());
for (PageHtml page : pages) {
Utilities.saveAsHtml(page.getPageNumber() + “_” + “demo”, page.getHtmlContent());
}
Please make sure you are accessing/iterating the List precisely. We evaluated this scenario using a word document with 8 pages and it rendered 8 html output pages successfully.

Have a nice weekend ahead.
Best regards

Since we are passing the file as an input stream and converting that input stream into a temp file, we are unable to get html output many times. As of now, I don’t see any html output for the document. This is the reason why I want to have the call with your team so that we can resolve these issues. We have already shared the code with your team and will like your team’s input to go further.

Hi Chetan,


Thank you for your explanation.

We are really sorry for inconvenience. The support time was trying to provide you the quick and accurate solutions but the things are being ambiguous. Even this thread is showing many issues like:

1) Using input stream, the html output missing many times .
2) Failing to get pages using InputStream.
3) Pages found but same content for all Pages.

So, let’s try to sort out the issues and start from the following questions:

As you stated in your earlier posts that you are using our Servlet based Showcase/UI Example. Please let us know that:
Did you tested the Showcase Example at your end (just before making any change into it)?
Was the UI example working at that time?


This is the reason why I want to have the call with your team so that we can resolve these issues. We have already shared the code with your team and will like your team’s input to go further.

Ultimately, I would like to suggest you to share the whole source code project with us. You can upload the project at gdrive or dropbox and share the link with us. The example team will identify and correct the issues. Even then, if further assistance would be required, we can manage to engage the example team developer with you via this forum thread.

Warm Regards.




Hey Muhammad,


We were able to resolve few of the issues with Groupdocs 3.7.0 version. However, there are times when the content doesn’t load on the page or the fomatting is messed up for the content. I am attaching a screenshot which shows the correct format in the thumbail view and the messed up html formating on the page. I checked the Network tab and I don’t see any error related to any file.

The challenge is our go live that is scheduled for end of next week and we are facing these issues. It will be great if you can resolve these issues for us.

Regards
Chetan Mahendru

Hello Chetan,


Thank you for your response.

Your attached screenshot is showing that the issue is related to the CSS/Javascript. Therefore, to counter this issue it is important for us to review your code. So can you share your code project with us? Also, can you provide us the problematic file/document which you are using to test in the screenshot?

Many Thanks

I have added the attachment in the previous comment.

Hi Chetan,


I probably couldn’t see the attachment properly in your last post. Sorry for it. However, we’ll investigate the issue and get back to you as we get any update.

Please stay tuned.

Hi,


Once we disabled the html engine the output mimicked the content. However, we noticed another issue in the viewer as it seems it doesn’t work for IE browser. We were able to replicate the issue with the showcase example as well.

Regards
Chetan Mahendru

Hi Chetan,


Yes, if useHtmlBasedEngine is set to false and image based rendering is applied, it works fine.
it doesn’t work for IE browser.
However, we are able to reproduce this issue at our end as well. Hence, we’ve logged this issue at GitHub, please follow this link in order to track this issue.

Best regards

Hey Atir,


This issue is going to impact our production go live. Can you provide a solution to this problem as soon as possible? I also need an ETA for the resolution of this problem.

Regards
Chetan Mahendru