Change bars or vertical lines are not appearing correctly when viewing PDF document with different PDF viewers

Hello Aspose Team,

We are using Aspose.PDF C#.Net Core 6 library in one of our application to edit some PDF documents.
With the help of PdfContentEditor class we are drawing one vertical line/bar on different pages based on the changes that we done in the document by using CreatePolyLine function, but we have found couple of issues which are reproduces with different cases and are listed below:

Case 1: For X PdfViewer the line/bar shows correctly for document A, where for same X PdfViewer, the line does not show correctly for document B.

Case 2: For X PdfViewer the line/bar shows correctly for document A, where for same document A, the line does not show correctly for Y PdfViewer.

Case 3: For X PdfViewer the line/bar does not show at all for document A, where another Y PdfViewer shows the line for same document A.

Case 4: For X PdfViewer the line/bar shows when we zoom-in or zoom-out for document A, where another Y PdfViewer shows the line for same document A.

Case 5: For X PdfViewer the line/bar shows with thin light color for document A, where another Y PdfViewer shows thin dark color line for same document A.

We are drawing this line either in left side near to starting of left margin or near ending right margin of the PDF page.

Sample code used for above cases:

private static void AddChangeBar(PdfContentEditor editor, float lineStart, float lineEnd, int pageNumber, float position)
{
    LineInfo lineInfo = new LineInfo
    {
        VerticeCoordinate = new[] {position, lineEnd, position, lineStart},
        Visibility = true,
        LineColor = Color.Black,
        LineWidth = 3
    };
    editor.CreatePolyLine(lineInfo, pageNumber, new System.Drawing.Rectangle(1, 1, 3, 1), "");
}

The PDFViewers that are used to see the changes in PDF documents are:

  • Acrobat Reader DC
  • FireFox
  • Foxit Reader
  • Google Chrome
  • Microsoft Edge
  • pdfDocs (Internal Application)

Operating System Information:

  • Windows Server 2019
  • Windows 10

Attaching sample documents in Zip file to verify above problem.
PDF Test document Aspose.zip (3.1 MB)

Please feel free to comment on the details required further.

@rajesh.domadia

Is there any document that is not able to render the lines while opening in Adobe Reader? Can you please share one sample source PDF along with respective output PDF for such case? We will further proceed accordingly.