PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Links in PDFs have boxes around them - viewed in Adobe X
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2124
Page 1 of 1

Author:  mleghorn [ Thu Aug 30, 2012 9:19 pm ]
Post subject:  Links in PDFs have boxes around them - viewed in Adobe X

Background information:
We have an application that uses PDFSharp to generate PDF documents. We've been using the application for a few years. We recently upgraded our Adobe Reader to version X (10.1.4). The PDFSharp dll is marked as version 1.2.1269.0, and dated 2/11/2009.

The bug:
When viewing the generated PDFs using Adobe Reader X, the hyperlinks have boxes around them.

Does the PDFSharp dev team know about this problem? Is there a status on it, or plans to resolve?

Thanks,
Mike

Author:  () => true [ Fri Aug 31, 2012 8:17 am ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

We use Adobe Reader X - and the links in our documents have no boxes around them.

Status: not a known problem.

Can you provide sample PDF and sample code? If we see the boxes on our computers, we'll investigate this.

Author:  mleghorn [ Fri Aug 31, 2012 3:01 pm ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

() => true wrote:
We use Adobe Reader X - and the links in our documents have no boxes around them.

Status: not a known problem.

Can you provide sample PDF and sample code? If we see the boxes on our computers, we'll investigate this.


Can you tell me how to send you the PDF and sample code? Should I email it to you? If so can you give me an email address?

Thanks,
Mike

Author:  Thomas Hoevel [ Mon Sep 03, 2012 7:42 am ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

You can upload small ZIP files to this forum (IIRC the limit is 256 kiB).

I sent you a PM with our e-mail address (for larger or confidential files).

Author:  Thomas Hoevel [ Wed Sep 12, 2012 1:45 pm ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

I upgraded from Adobe Reader 10.1.0 to Adobe Reader 10.1.4. Now I see the boxes around hyperlinks.

The facts are:
  • There is a bug in PDFsharp; it is correct that Adobe Reader 10.1.4 draws frames around the hyperlinks
  • But Adobe Reader 10.1.0, Adobe Reader 8, Adobe Reader 6, Adobe Reader 5 did not draw the frame (though they should have), so we didn't notice this bug in PDFsharp

To fix this problem, search for
Code:
new PdfLiteral("<</Type/Border>>");
and replace this (there should be only 1 hit) with
Code:
new PdfLiteral("<</Type/Border/W 0>>");
and there should be no more boxes around links for newly created PDF files.

We are very sorry for the inconvenience.

Adobe Reader 9.5 is still available for download - it shows PDF files without boxes. But Adobe Reader 9.5 will be removed when you install Adobe Reader X (I found no way to have both versions side by side on my computer).

Author:  Bucher [ Tue Apr 02, 2013 3:04 pm ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

As I'm new to PdfSharp plz excuse me if if this is a stupid question

I have just imported the PdfSharp.dll to my VB project and everything is working fine except for that box around my web links.

Where should I search for that line?
I assume that would be in the source code for the DLL, if so could someone send me a updated dll as I'm not sure how to change and compile a new DLL

Plz :mrgreen:

Author:  PavlinII [ Sun Jul 07, 2013 10:04 am ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

This line of code could do the fix externally as well. No PdfSharp rebuild is needed.

Code:
Dim A As PdfLinkAnnotation = pg.AddWebLink(...)
A.Elements(PdfSharp.Pdf.Annotations.PdfLinkAnnotation.Keys.BS) = New PdfSharp.Pdf.PdfLiteral("<</Type/Border/W 0>>")

Author:  Glassbox [ Tue Jul 23, 2013 2:02 pm ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

I have this problem as well.

Manually changing the source code and recompiling works, but that means I need to remember to do this for any updates in the future.

Is the fix going to be incorporated in the code/binaries so that we don't have to worry about this? And it that case, when?

Thanks.

Author:  Thomas Hoevel [ Tue Jul 23, 2013 2:15 pm ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

Glassbox wrote:
Is the fix going to be incorporated in the code/binaries so that we don't have to worry about this?
Yes. But I don't know when the next version will come.

Author:  sara.nessaei [ Thu Nov 12, 2015 1:11 am ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

Does it work on migradoc?
because this line is only in pdfSharp.



Thomas Hoevel wrote:
I upgraded from Adobe Reader 10.1.0 to Adobe Reader 10.1.4. Now I see the boxes around hyperlinks.

The facts are:
  • There is a bug in PDFsharp; it is correct that Adobe Reader 10.1.4 draws frames around the hyperlinks
  • But Adobe Reader 10.1.0, Adobe Reader 8, Adobe Reader 6, Adobe Reader 5 did not draw the frame (though they should have), so we didn't notice this bug in PDFsharp

To fix this problem, search for
Code:
new PdfLiteral("<</Type/Border>>");
and replace this (there should be only 1 hit) with
Code:
new PdfLiteral("<</Type/Border/W 0>>");
and there should be no more boxes around links for newly created PDF files.

We are very sorry for the inconvenience.

Adobe Reader 9.5 is still available for download - it shows PDF files without boxes. But Adobe Reader 9.5 will be removed when you install Adobe Reader X (I found no way to have both versions side by side on my computer).

Author:  Thomas Hoevel [ Thu Nov 12, 2015 9:27 am ]
Post subject:  Re: Links in PDFs have boxes around them - viewed in Adobe X

MigraDoc uses PDFsharp to generate PDF files, so files generated via MigraDoc are also affected.

With the latest version, PDFsharp 1.50 beta 2, the bug is fixed. I do not remember which version of PDFsharp/MigraDoc was the first that had the fix built-in.
I think there are no regressions with the latest version.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/