Closed zb3 closed 7 months ago
Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/
Hi @zb3,
We created example for outlines usages https://github.com/unidoc/unipdf-examples/tree/master/outlines, and about the X=0 and Y=0 position being on bottom left, it is due the normally PDF begin from bottom to top, if you want position on top left, you need to get the page height first.
Hope this help, and you can re-open this issue if you still have problem with this issue.
Thanks
Let's say I'd need to create an outline. Initially, this is what I'd write:
(btw, unipdf-examples do not show how to create the outline from scratch even though the functionality exists - note the developer experience)
However, this doesn't work as expected. It ends up like this in the PDF file:
At first glance it'd make sense, however, the "XYZ" part is misleading, because with
X=0
andY=0
, this references the BOTTOM left corner of that page (see https://stackoverflow.com/questions/19360946/bookmark-to-specific-page-using-itextsharp-4-1-6), not the top one.The proper link would use
null
for at leastY
(ghostscript uses it for all these items), but this is impossible to achieve without modifying theOutlineDest.ToPdfObject
function. This means there appears to be no easy way to achieve such simple goal (btw note that theFit
mode is not the same as it changes the zoom).Maybe if the passed coordinate is negative, you could use the null object instead of a float value? Like this: