XObject WPToolsJIF_1 not found

  • When encrypting a PDF document with a user password and the option to prevent text from being copied, the Adobe Acrobat Reader version 7.0.8 reports an error (but continues to run). The error is:

    Could not find the XObject name "WPToolsJIF_1".

    Note, the _1 varies, for example, it came up as "WPToolsJIF_73" once.

    If I allow text to be copied from the PDF, I don't get this error.

    WPTools 5.20.6
    wPDF 2.6.5
    Delphi 7

  • I think I see why I get the error about XObject name 'WPToolsJIF_1" not found... this only occurs on the 2nd export to PDF from the same WPRichText that have linked images.

    Seems that the first time I export to PDF, the images are in the PDF, but if I turn around and export it a 2nd time, the images are all missing from the PDF (file size confirms it as well, down from about 1MB to about 200KB)... plus Acrobat warns about not being able to find the XObject.

    Why do the linked images not show up in the 2nd attempt to export to PDF, and what do I need to do to prevent this?? Seems to me I had this issue way back with WPTools 4, but not sure what I did to fix the problem. I quick scan of that older source of mine didn't reveal anything obvious.

    A print preview of the WPRichText after exporting the 2nd time still shows the images, yet the PDF doesn't have them.

    I Updated to 5.20.8 and wPDF 2.75, and it made no difference. (was running with 5.20.6 and 2.65)

    I think this problem has been ongoing for a while as I've received a few emails about their report not having images, but if they do it again, it does. I thought they had a few too many beers because we couldn't repro at the time, so now all I can think of is that they must have done an export twice when they noticed the report was missing images, and then went back again to export it, and it worked (since they only exported it once that time).

    • Offizieller Beitrag

    Hi,

    WPTools is reusing the images after they were embedded. To do so it identifies the copy using a state integer.

    Please do this before your export code:

    inc(EditBox.RTFData._WPPDFRun);

    This is the complete export code used by the PDF export from which is part of wptools:

    Julian

  • Thanks, but I must have done something wrong or it doesn't apply to PrintPages. Here is my code (DocSource is the WPRichText being exported, and CreateOutline uses WPPDFExport1.SetOutline):

    FWIW, in the old code of mine, I found where I forced it to rebuild the report again if it was exported to PDF. Not the best fix, but it worked. :)