Running the DynaPDF examples (Xojo 2021r2.1)

I’ve been trying to work through some of the simple DynaPDF example projects and creating simple pdfs fail because SpecialFolder.Desktop.Child…isn’t resolving correctly whereas if I change Desktop to SharedDocuments (for example) they all run fine. I don’t have any restriction to creating files on my desktop as far as I’m aware. I’m just wondering if it’s a xojo issue or just me?

James

You could start by showing the code and what actually doesn’t work. Like error messages and some such. And perhaps you can tell us which OS you use.

on macOS an app can only access desktop folder if user grants permission. That may cause trouble.

So you may often change it to use GetFolderitem(filename) instead to target the debug application folder.

Yes. Sorry for the lack of info. This is xojo windows in demo mode.

It gets as far as the call to create a pdf then errors out

Screenshot - 10_09_2021 , 06_51_23
Screenshot - 10_09_2021 , 06_51_05

If I change the desktop to SharedDocuments it all works as expected.

James

For some strange reason, DynaPDF can’t create/overwrite the test.pdf file on your desktop.
Maybe there is a file with that name already?
And if that file is open in adobe Reader, you may not be able to overwrite it.

I made sure that wasn’t an issue by rebooting prior to running the app in case there was some orphaned process in memory which was causing it to misbehave. Very strange.

I also tried running it to the shared documents folder when the file already existed and it overwrote the file without issue. And if I then left the created file open in a pdf reader I got the cannot create msgbox. So your program is performing completely as expected except for something about my desktop folder which stops it even though I seemingly have all read/write permissions

James

A little bit of feedback for anyone interested. I tried to simulate the error by installing xojo on my laptop but I couldn’t do it. Everything worked as expected. So I guess there is a setting somewhere on the desktop that is creating a local problem for me. Thanks for the help.

James