Blue Cielo ECM Solutions

60 views
Skip to first unread message

Андрей Коновалов

unread,
Oct 6, 2017, 2:18:41 PM10/6/17
to PDFTron WebViewer

Hi, we have a problem with performance for some XOD files. When we view some XOD file (which was converted from a PDF file (which in turn was created from a DWG file)) then viewer works very slowly on Zoom In\Zoom Out operations (about 15 seconds on each action). Is there a way to optimize XOD conversion/ viewing process to improve behavior?
Regards,
Andrey Konovalov.

Justin Jung

unread,
Oct 6, 2017, 6:33:48 PM10/6/17
to PDFTron WebViewer
Hello,

Hmm. That sounds strange. Can you send us the xod and the original pdf so that we can have a closer look?

Justin Jung
Software Developer
PDFTron Systems Inc.

Андрей Коновалов

unread,
Oct 10, 2017, 11:51:31 AM10/10/17
to PDFTron WebViewer
Hi here the files you requested:
Fließschema Wasserinstall-101994-Modell.pdf
Fließschema Wasserinstall-101994-Modell.xod

Андрей Коновалов

unread,
Oct 10, 2017, 11:51:33 AM10/10/17
to PDFTron WebViewer
Hi,
here the sample file you are asking for
Regards,
Andrey Konovalov.


On Saturday, October 7, 2017 at 1:33:48 AM UTC+3, Justin Jung wrote:
SR-5127.zip

Justin Jung

unread,
Oct 12, 2017, 1:26:22 PM10/12/17
to PDFTron WebViewer on behalf of Андрей Коновалов
Thanks for sending us the documents.
We were able to experience the slowness (though it was more like 2-3 seconds on our end).
We will investigate further to see if there is any better conversion options that can improve the performance!

Андрей Коновалов

unread,
Nov 9, 2017, 12:20:03 PM11/9/17
to PDFTron WebViewer
Hi gens, are there any updates on this issue? Our customer asks for help.
Regards.
Andrey Konovalov.

Justin Jung

unread,
Nov 9, 2017, 12:55:21 PM11/9/17
to PDFTron WebViewer on behalf of Андрей Коновалов
Hello,

Sorry for the delay. It looks like your file contains thousands of link annotations, which is the major cause of this issue.
They seem to be pointing to local files that WebViewer isn't able to access.
Before converting to xod, you could delete these file link annotations using PDFNet, and that greatly improved performance on our end.
Let us know if this works for you!

Андрей Коновалов

unread,
Dec 28, 2017, 1:19:22 PM12/28/17
to PDFTron WebViewer
Hi,
thanks, your advise helped. My reply was late because we tried to check if customer will be satisfied by such approach - removing link annotations from XOD file.
But we have another customer with similar problem - they create PDF renditions of DWG files with thousands rectangle annotations. And viewer works with such files very slowly... May be there is a way to convert such PDF file into XOD with annotations embedded into document (Like other elements of PDF document - text, lines and others, not as annotations)?
Regards,
Andrey Konovalov.

Matt Parizeau

unread,
Dec 28, 2017, 1:47:23 PM12/28/17
to PDFTron WebViewer
Hi Andrey,

Yes you could flatten the annotations so that they're treated as a part of the document so I expect it would render faster. You can use the setAnnotationOutput function on the XOD output options (https://www.pdftron.com/pdfnet/docs/PDFNet/?topic=html/M_pdftron_PDF_Convert_XODOutputOptions_SetAnnotationOutput.htm) and pass in e_flatten (https://www.pdftron.com/pdfnet/docs/PDFNet/html/T_pdftron_PDF_Convert_XODOutputOptions_AnnotationOutputFlag.htm).

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Андрей Коновалов

unread,
Jan 11, 2018, 12:46:43 PM1/11/18
to PDFTron WebViewer
Hello,
Thank you - this approach is exactly what we need and this option resolves the problem. But working on this issue we found one problem with PDFTron Viewer. In attached file there are rectangle annotations which have zero width lines, but PDFTron shows them (if PDF was converted to XOD without flatten flag).
Regards,
Andrey Konovalov.
ABB-10-0020_1.pdf

Matt Parizeau

unread,
Jan 12, 2018, 5:07:20 PM1/12/18
to pdfnet-w...@googlegroups.com
Hi Andrey,

It looks like there are a couple things going wrong here. In the attached PDF the rectangles have zero width and a transparent stroke color. The XOD conversion is not specifying the annotation width in the XFDF so WebViewer uses the default value of 1. We'll investigate and resolve this issue in the conversion.

Since the color is not specified in the XFDF, WebViewer should display it as transparent, however it's incorrectly setting the default color value to black. We'll fix this on the WebViewer side so that it's handled correctly.

What you could do for now is update the annotation deserializing code so that if color isn't specified it will be set to transparent. This is the change we'll be making inside WebViewer for future versions. You can add the following to your config file:

var deserialize = Annotations.Annotation.prototype.deserialize;
Annotations.Annotation.prototype.deserialize = function(element) {
  deserialize
.apply(this, arguments);
 
if (element.getAttribute('color') === null) {
   
this.StrokeColor = new Annotations.Color(0, 0, 0, 0);
 
}
};

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Reply all
Reply to author
Forward
0 new messages