Error when creating a file with drag'n'drop from an app.

Things you’d like to miss in the future...
Post Reply
lilivier
Posts: 25
Joined: 30 Mar 2016 11:49

Error when creating a file with drag'n'drop from an app.

Post by lilivier »

Hello,

I am using PDF-XChange Editor to extract pdf pages from pdf files.

PDF-XChange allows to select the pages to extract and to do a drag'n'drop in the explorer to create a new pdf from these selected pages.
It works well in Windows Explorer.

But it does not work with XYPlorer.
I get this error:

'Failed to get dropped contents of '.... :

Image

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Error when creating a file with drag'n'drop from an app.

Post by highend »

Yeah, I can confirm that this doesn't work :/
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60530
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Error when creating a file with drag'n'drop from an app.

Post by admin »

Strange, my PDF-XChange Viewer does not allow this operation (no dropping anywhere, also not to Explorer) . Maybe only the PDF-XChange Editor can do it?

lilivier
Posts: 25
Joined: 30 Mar 2016 11:49

Re: Error when creating a file with drag'n'drop from an app.

Post by lilivier »

admin wrote:Strange, my PDF-XChange Viewer does not allow this operation (no dropping anywhere, also not to Explorer) . Maybe only the PDF-XChange Editor can do it?
Indeed it is a feature of the PDF-XChange Editor (http://www.tracker-software.com/product ... nge-editor). The free version has replaced PDF-XChange Viewer.

admin
Site Admin
Posts: 60530
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Error when creating a file with drag'n'drop from an app.

Post by admin »

OK, installed it and could reproduce the issue. Alas, I could not fix it. :evil:

admin
Site Admin
Posts: 60530
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Error when creating a file with drag'n'drop from an app.

Post by admin »

PS: Looks like I fixed it now. :)

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Error when creating a file with drag'n'drop from an app.

Post by highend »

:tup: :biggrin:
One of my scripts helped you out? Please donate via Paypal

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Error when creating a file with drag'n'drop from an app.

Post by TheQwerty »

admin wrote:PS: Looks like I fixed it now. :)
You might want to also check if copying pages and pasting them into XY works with your fix.

admin
Site Admin
Posts: 60530
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Error when creating a file with drag'n'drop from an app.

Post by admin »

TheQwerty wrote:
admin wrote:PS: Looks like I fixed it now. :)
You might want to also check if copying pages and pasting them into XY works with your fix.
Haha, good point. Infact it does not work at all after (or before) the fix. They do some very exotic things at PDF-XChange... My only consolation: Explorer cannot handle this one either. :biggrin:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Error when creating a file with drag'n'drop from an app.

Post by TheQwerty »

Based on what I was seeing in Free Clipboard Viewer, it looked like if you found the PXCEditCbData format you could just write that to disk and it would be a valid PDF. Though there might be a small header prior to the actual start of the file, presumably at '%PDF-' - I'm not familiar enough with the format and am too lazy to check if that header contains size information like I suspect.

The drag and drop looked like it provided a FileDescriptorW and FileContents that you might be able to write out, but in my small tests I ran into ugly shortcomings in .NET that caused me to lose interest.

admin
Site Admin
Posts: 60530
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Error when creating a file with drag'n'drop from an app.

Post by admin »

TheQwerty wrote:Based on what I was seeing in Free Clipboard Viewer, it looked like if you found the PXCEditCbData format you could just write that to disk and it would be a valid PDF. Though there might be a small header prior to the actual start of the file, presumably at '%PDF-' - I'm not familiar enough with the format and am too lazy to check if that header contains size information like I suspect.

The drag and drop looked like it provided a FileDescriptorW and FileContents that you might be able to write out, but in my small tests I ran into ugly shortcomings in .NET that caused me to lose interest.
Yep, I saw all that, too.
1) PXCEditCbData is something totally unknown (to Google). I don't want to go so far to write custom code for PDF-XChange.
2) Yes, this works now in XY (as I wrote in an earlier post).

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Error when creating a file with drag'n'drop from an app.

Post by TheQwerty »

admin wrote:1) PXCEditCbData is something totally unknown (to Google). I don't want to go so far to write custom code for PDF-XChange.
2) Yes, this works now in XY (as I wrote in an earlier post).
1) I lazily confirmed my suspicion of there being a header in the copied data:
  1. Using clipboard viewer I saved the copied page(s) data to a file.
  2. I changed the extension to PDF.
  3. Opened it in PDF-XChange.
  4. PDF-XChange rendered it but complained about some XREF errors but allowed me to save it.
  5. Comparing the output showed the header was removed as well as some other changes.
  6. Opening the originally saved copied data file in a hex editor I removed everything before the '%PDF'.
  7. Saved it to a new file.
  8. Opened in PDF-XChange.
  9. No errors and it appears to render perfectly.
Just an FYI if you wanted to dabble. ;)

2) I misread your previous post - thinking you meant your fix was not successful for drops.

PlorerXY6
Posts: 56
Joined: 13 Oct 2022 19:51

Re: Error when creating a file with drag'n'drop from an app.

Post by PlorerXY6 »

In PDF Editor and current XYP beta, I seem to be getting this bug when I drop 6+ selected pages from the thumbnail pane to XYP.
However, copying a range of up to 5 pages does work.
Can more than 5 pages please be fixed in XYP? Works in File Explorer.
Maybe XYP just needs to wait a few moments longer to let the file drop when it's more than 5 pages?

admin
Site Admin
Posts: 60530
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Error when creating a file with drag'n'drop from an app.

Post by admin »

XY just waits for the preview handler to return.

Post Reply