Xojo Conferences
XDCMay2019MiamiUSA

[MBS] DynaPDF and removing page items (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] 17.2pr4
Next thread: [MBS] PDF printing on Mac


[MBS] MBS 7.5 with RB2010r4.1   -   Garth Hjelte
  [MBS] DynaPDF and removing page items   -   Steve Upton
   Re: [MBS] DynaPDF and removing page items   -   Christian Schmitz
    Re: [MBS] DynaPDF and removing page items   -   Steve Upton
     Re: [MBS] DynaPDF and removing page items   -   Christian Schmitz

[MBS] DynaPDF and removing page items
Date: 25.04.17 18:43 (Tue, 25 Apr 2017 10:43:53 -0700)
From: Steve Upton

DynaPDF seems quite good at creating new PDFs, adding items to PDFs and opening and inspecting existing PDFs.

It is very tough to determine, however, how to remove items from existing PDFs.

If I want to replace items on a PDF I can't see how to remove rectangles or other page elements (though I think I see how to remove text and perhaps images)

I see that the DynaPDFParseInterfaceMBS allows handling of events when data types are seen in the data stream but the handle returned in the event is almost always 0 and I don't see how I'd remove the item even if it weren't. In some elements (templates, I think) I can return "1" to have it skipped (left out of the page) but it seems unreliable and rather course...

am I missing something?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] DynaPDF and removing page items
Date: 25.04.17 19:17 (Tue, 25 Apr 2017 20:17:11 +0200)
From: Christian Schmitz

>
> If I want to replace items on a PDF I can't see how to remove rectangles or other page elements (though I think I see how to remove text and perhaps images)

Such editor features are on the wish list and Jens may work on this right now.

We’ll see how soon he can provide an update on this.

For the time being you can query the content stream for current page (GetContent function), modify it and put it back.
I used that before to remove rectangles where I knew the size, so I changed size to zero/zero.

Sincerely
Christian

Re: [MBS] DynaPDF and removing page items
Date: 25.04.17 19:56 (Tue, 25 Apr 2017 11:56:07 -0700)
From: Steve Upton

> On Apr 25, 2017, at 11:17 AM, Christian Schmitz <<email address removed>> wrote:
>
>
>>
>> If I want to replace items on a PDF I can't see how to remove rectangles or other page elements (though I think I see how to remove text and perhaps images)
>
> Such editor features are on the wish list and Jens may work on this right now.
>
> We’ll see how soon he can provide an update on this.
>
> For the time being you can query the content stream for current page (GetContent function), modify it and put it back.
> I used that before to remove rectangles where I knew the size, so I changed size to zero/zero.

I'm ok with that kind of hack in the short term. or moving the item way off page, etc.

But I don't see an example of how to do that in a manner that allows me to recognize the rectangle and then be able to modify it....

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] DynaPDF and removing page items
Date: 25.04.17 20:04 (Tue, 25 Apr 2017 21:04:01 +0200)
From: Christian Schmitz
>
> But I don't see an example of how to do that in a manner that allows me to recognize the rectangle and then be able to modify it....

There is no example.

Look in the content stream.

Somewhere you find coordinates followed by "re" for the rectangle.

I just changed the coordinates to 1/1 or 0/0, not sure.
The rectangle is than tiny and no longer annoys me.

Sincerely
Christian