Page 1 of 1

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

Posted: 14 Apr 2016 11:24
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

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

Posted: 14 Apr 2016 11:28
by highend
Yeah, I can confirm that this doesn't work :/

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

Posted: 14 Apr 2016 15:57
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?

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

Posted: 14 Apr 2016 16:14
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.

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

Posted: 14 Apr 2016 17:11
by admin
OK, installed it and could reproduce the issue. Alas, I could not fix it. :evil:

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

Posted: 14 Apr 2016 18:48
by admin
PS: Looks like I fixed it now. :)

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

Posted: 14 Apr 2016 18:51
by highend
:tup: :biggrin:

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

Posted: 14 Apr 2016 18:57
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.

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

Posted: 14 Apr 2016 19:12
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:

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

Posted: 14 Apr 2016 19:29
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.

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

Posted: 14 Apr 2016 19:37
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).

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

Posted: 14 Apr 2016 19:43
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.

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

Posted: 12 Dec 2023 21:28
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?

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

Posted: 13 Dec 2023 11:09
by admin
XY just waits for the preview handler to return.