Search code examples
pdfgeneratorabcpdf

ABCPDF.NET not rendering image


I am using ABCPDF.net to generate my PDFs from HTML files. There are 3 images on the HTML page which; of which 2 images are generated but the third is one is not on the PDF. I have tried to move the logo around but without any luck. This is my first time using this product which I am impressed with but this one problem is throwing me off.


Solution

  • From memory there could be one or two things causing this.

    1) If your image happens to cross over the boundary of the page even by 1 pixel it will not be rendered.

    2) You have to make sure that all of your elements are loaded in a procedural fashion by which I mean that whatever you want to be displayed on the top must be added to the page last. If you don't do this you may find that a rectangle you declared to contain some text for example will be displayed over the top of your image which will obscure it.

    3) Sounds daft but just double check all syntax and the images location and ensure that you have referenced it correctly.

    If all else fails could you provide some source code or a more in depth explanation.

    EDIT: Also double check that you have set the correct size on the image when importing it as you may find it reverts back to the actual dimensions that it is on the disk which could make it too big for the page thus not rendering it.