Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External links are not preserved #162

Closed
wq9578 opened this issue Jan 12, 2023 · 11 comments
Closed

External links are not preserved #162

wq9578 opened this issue Jan 12, 2023 · 11 comments

Comments

@wq9578
Copy link

wq9578 commented Jan 12, 2023

It looks like that the FPDI library doesn't preserve external links, see: atgp/factur-x#12 (comment)
In this case a PDF/A document is generated.
Is there any working solution implemented?

@JanSlabon
Copy link
Member

Yep, this is currently the normal behavior.

Anyhow, we plan to add support for external links in the first quater of 2023.

The implementation of mPDF is a good start but it's not feature complete and we know situations where it will fail.

@ww-ysg
Copy link

ww-ysg commented Jun 15, 2023

Hi Jan,

hope you had a good week so far!
Can you give an update regarding this issue?

Best Regards,
Yasin

@JanSlabon
Copy link
Member

Thanks for the reminder and sorry for the delay. Can you please provide test files, which we can add to the test-suite?

@ww-ysg
Copy link

ww-ysg commented Jun 23, 2023

Hi Jan,

thanks for your quick response. Since the documents are part of an intranet they are confidential.
However we created test PDF files and were able to reproduce the error with them.

first_file.pdf
second_file.pdf
merged_file.pdf

The first and second file have the same content. The Links in question are "typo3.org" wich links to "https://typo3.org/typo3-cms/" and "TYPO3-Lizenz (GNU/GPL)" which links to "https://typo3.org/typo3-cms/overview/licenses/".

In the merged file the link stylings are still present, but the links are gone. The text "typo3.org" is a domain and the PDF still recognize it as a link, but instead of directing to "https://typo3.org/typo3-cms/" it links to "http://typo3.org".

Also as a side note our customer noticed a black line at the end of the merged file.

Thanks,
Yasin

@JanSlabon
Copy link
Member

We're already working on it and will push a branch in the next week. We're currently writing tests and we're still open for foreign test documents.

Yours is working without a problem. This is an example of several (more special) documents merged + yours: concatenate.pdf

I cannot see any black line in your merged_file.pdf? I can only guess that you are using TCPDF which adds empty headers and footers. To disable them, just call:

$pdf->SetPrintHeader(false);
$pdf->setPrintFooter(false);

@ww-ysg
Copy link

ww-ysg commented Jun 23, 2023

Thanks!

$pdf->SetPrintHeader(false);
$pdf->setPrintFooter(false);

Setting the values worked!

@JanSlabon
Copy link
Member

We just prepared PR #174 which will allow you to import external links with FPDI but I would like to get some tests and feedback before merging this.

Thanks! @ww-ysg @wq9578 @JesusLopezMadrid @pionl

@ww-ysg
Copy link

ww-ysg commented Jun 30, 2023

Thanks Jan!

I've tested the fix in our development environment and my tests were successfull.
We now added the fix to the testing system of the customer and await their feedback.

@ww-ysg
Copy link

ww-ysg commented Jul 3, 2023

Hi Jan,

we got Feedback from our customer. So far everything worked great.

Best Regards,
Yasin

@JanSlabon
Copy link
Member

PR is merged and a new release will follow in the next days.

@JanSlabon
Copy link
Member

FPDI 2.4.0 with support for import of external links is released ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants