Re: New PDF features

Guillaume Ayoub <[email protected]> Thu, 16 Aug 2018 12:11:40 +0200
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Le sam. 4 août 2018 à 22:21, Guillaume Ayoub 
<[email protected]> a écrit :
> Hello,
> 
> […]
> 
> - I've tried to add internal hyperlinks using the "rect=[x x x x] 
> page=x pos=[x x]" syntax. It works when the target is on a previous 
> page or on the same page as the link, but it's broken when the target 
> is on a page that has not been created yet. Is it a known limitation, 
> a bug, or did I miss something about the way the feature works?

After reading the source, it's a bug (or a big undocumented 
limitation). I think that it should be fixed before 1.16.0.

Links are added to the PDF while the document is being created. When a 
link's target is on a page that's not been added yet, an explicit check 
on the page number discards the link creation (in 
cairo_pdf_interchange_write_explicit_dest).

A solution would be to add links at the end of the document creation, 
just as it's done for other objects in 
_cairo_pdf_interchange_write_document_objects.

I can try to provide a patch, but it would probably be better from 
people knowing cairo (and C :p).

> - All PDF metadata can now be changed except from "/Producer" that is 
> fixed to "cairo xxx (http://cairographics.org)". Would it be possible 
> to make this string editable, or at least let users add something 
> before/after this string? I can even provide a patch if needed :).

I've sent a patch, comments welcome!
-- 
Guillaume

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo