Import XObject, measuring text, line height

Help
anders
2011-01-28
2013-01-26
  • anders
    anders
    2011-01-28

    Hi, thanks for a great library. I have a few questions.

    - Is there a way to grab a XObject (a FormXObject) from one pdf file and use it in another file? I.e. Without importing an entire page as XObject and cropping it, but import the parts I need.

    - Are there a way to find the height (or the bounding box) of a text before placing it on the page with BlockFilter.ShowText? I could just write it to a temporary page and throw that away after reading the BoundingBox attribute, but it seems like a hack. And TextFitter is inaccessible.

    - When writing text using the BlockFilter.ShowText, what would be the right way to set the line height? It seems that SetLeading is ignored. It seems to be possible by adjusting Context.State.Size directly before and after ShowText, but it again feels like a hack.