Martin Osieka

'Portable Document Format' FileType Plugin (.PDF)

Recommended Posts

midora    201

Excellent!

Thank you Martin for the plugin and thank you midora for letting us know.

I'll play with this one over the next few days.

Some feedback is welcome :-)

Share this post


Link to post
Share on other sites
KnightTim    0

I'm trying to use the Im(age)PDF plugin with a portable verison of Paint.net v3.5.6, and I have placed both the exe and the dll, in the FileTypes directory, but when I choose PDF as the file type it says it that the exe is n/a

The Save Configuration screen displays:

Settings -

ImPDF FileType Plugin v1.3

ImPDF Command Executable: n/a

Install the ImPDF executable in the FileTypes folder of Paint.NET

Move Paint.NET tools

Preview, file size: (error) -

It is obviously reconizing that the DLL is there, why isn't it reconizing that the EXE is also there.

Is there any enviromental varibles that I need to set or, any directories I would need to create.

(FYI, I do not have admin rights on the computer I am using, which is why I am using a portable version.)

post-91159-0-81481900-1343398583_thumb.p

Edited by KnightTim

Share this post


Link to post
Share on other sites
midora    201

It is obviously reconizing that the DLL is there, why isn't it reconizing that the EXE is also there.

No idea. The code does the following:

string startDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string exeFileName = Path.Combine(startDir, "ImPDF.Command.exe");

So it asks the dll for the start location and appends the name of the executable.

Do you or someone else know if the portable version fakes the location of the dll?

Share this post


Link to post
Share on other sites
Ego Eram Reputo    1,688
I'm trying to use the Im(age)PDF plugin with a portable verison of Paint.net v3.5.6...

Support is limited to the latest version of Paint.NET - so you should upgrade to 3.5.10. Why would you continue to use 3.5.6?

Share this post


Link to post
Share on other sites
Djisves    60

In the last month or so, I had a lot of use for the PDF filetype plugin and it never failed me. Again, thank you.

 

Then I remembered that I had promised feedback, so here it is: All is well, I had use for most of the options in the save dialogue and everything worked like it should.

Share this post


Link to post
Share on other sites

In the last month or so, I had a lot of use for the PDF filetype plugin and it never failed me. Again, thank you.

 

Then I remembered that I had promised feedback, so here it is: All is well, I had use for most of the options in the save dialogue and everything worked like it should.

 

Thanks for taking the time to write some feedback for a filetype plugin :smile:

Share this post


Link to post
Share on other sites
barbieq25    667

Many thanks Martin for your hard work on this. I now have it downloaded & installed. I know this will be very useful to me in the future.  :D 

Share this post


Link to post
Share on other sites

Many thanks Martin for your hard work on this. I now have it downloaded & installed. I know this will be very useful to me in the future.   :D

 

Same for me ;-)

 

Still the real layered PDF feature (which allows to switch on/off individual layers in a PDF viewer) is missing. Rick would say: No ETA ;-) Too many other things to finish...

  • Upvote 1

Share this post


Link to post
Share on other sites

New versions: ImPDF.Open.FileType v1.0, ImPDF.Save.FileType v1.4.

 

Open 1.0 (15.3.2014)
- Removed one conflict with the PDF-Export pugin ImPDF.
- Individual filter entry for each file extensions in OpenFileSelector dialog

Save 1.4 (15.3.2014)
- Renamed dll from ImPDF.FileType.dll to ImPDF.Save.FileType.dll
- Changes to avoid conflicts with ImPDF.Open.FileType
 

Edited by Martin Osieka
  • Upvote 1

Share this post


Link to post
Share on other sites
sashwilko    358

In PDN V4 (build 5284) I opened Custom Brushes mini and got this error message concerning ImPDF. Any idea why it would give me this error ? Custom Brushes mini opens now that I have removed this file type plug in.

Error:

Exception details:
System.TypeInitializationException: The type initializer for 'ImPDFPlugin.ImPDFFileType' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ImPDFPlugin.ImPDFFileType..cctor()
   --- End of inner exception stack trace ---
   at ImPDFPlugin.ImPDFFileType.Debug(String message)
   at ImPDFPlugin.ImPDFSaveConfigWidget.Finalize()
 
Thank you. 

Share this post


Link to post
Share on other sites
sashwilko    358

Sorry to "Bump" up this thread, but I posted above here, relating to a conflict between this file type plugin and Custom brushes mini. Upon removal of this file type plugin, Custom brushes worked again, but if I re install this file type plugin in custom brushes won't work (PDN V4) The Dev has been online since I posted and so far no feedback.

Will this issue be fixed please. :)

Share this post


Link to post
Share on other sites

Sorry to "Bump" up this thread, but I posted above here, relating to a conflict between this file type plugin and Custom brushes mini. Upon removal of this file type plugin, Custom brushes worked again, but if I re install this file type plugin in custom brushes won't work (PDN V4) The Dev has been online since I posted and so far no feedback.

Will this issue be fixed please. :)

 

No issue to bump after a while. It just means you are interested.

 

I installed the current PDN4 version of the SB pack in the meantime. And I can reproduce that there is an issue. In my case a reference exception but from ImSVG filetype. After confirming the message the ImSVG open dialog opens. After aborting the OnLoad action of ImSVG CBM worked as expected.

 

I really have not a good idea what CBM is trying to do there. Maybe it tries to collect all available filetype plugins. Only SB can answer this.

 

Maybe post a screenshot of the exception to see if its a PDN one or one of the plugin.

Share this post


Link to post
Share on other sites
BoltBait    1,226

Are you guys staying out of each other's namespaces?

Share this post


Link to post
Share on other sites

Are you guys staying out of each other's namespaces?

 

I'm pretty sure because all my filetype plugins are implemented in OptionBasedFileTypes namespace.

And then there is additionally the class name encapsulating the code.

Share this post


Link to post
Share on other sites
BoltBait    1,226

I really have not a good idea what CBM is trying to do there. Maybe it tries to collect all available filetype plugins. Only SB can answer this.

*You* may be able to figure it out by using ILSpy. ;)

Share this post


Link to post
Share on other sites
sashwilko    358

CBM uses the filetype plugins installed to load brushes.

But when I have the pdf file type plugin installed, paint.net crashes when I open CBM, I remove the file type plugin and CBM works. All of my custom brushes are of .png file format and are stored in Documents / Paint.Net User Files / Custom Brushes.  I never had this issue with pdn 3.5.11. 

Share this post


Link to post
Share on other sites
sashwilko    358

No issue to bump after a while. It just means you are interested.

 

I installed the current PDN4 version of the SB pack in the meantime. And I can reproduce that there is an issue. In my case a reference exception but from ImSVG filetype. After confirming the message the ImSVG open dialog opens. After aborting the OnLoad action of ImSVG CBM worked as expected.

 

I really have not a good idea what CBM is trying to do there. Maybe it tries to collect all available filetype plugins. Only SB can answer this.

 

Maybe post a screenshot of the exception to see if its a PDN one or one of the plugin.

I posted the exception information @ post #35 here. All my brushes are .png (I have no Idea what an SVG is anyway) I didn't get the chance to take a screenshot. pdn 4.0 crashed, so when I read the above posted exception details and noticed it was in conflict with this file type plugin, I then removed your file type plugin from pdn Custom brushes then works fine. 

Share this post


Link to post
Share on other sites

In case of my error the Onload method of ImSVG is called. ImSVG registers for .svg.

Does CBM tries out all registered filetypes to see if a file loads?

 

ImPdf has to different dlls. One for open and one for save (ImPDF.Open.FileType.dll, ImPDF.Save.FileType.dll.

Which one are you using Sascha? Or in case of the older ImPDF.FileType.dll you should update.

Share this post


Link to post
Share on other sites

I posted the exception information @ post #35 here. All my brushes are .png (I have no Idea what an SVG is anyway) I didn't get the chance to take a screenshot. pdn 4.0 crashed, so when I read the above posted exception details and noticed it was in conflict with this file type plugin, I then removed your file type plugin from pdn Custom brushes then works fine. 

 

But if you can read it, you should also be able to take a screenshot of the dialog.

Share this post


Link to post
Share on other sites
sashwilko    358

But if you can read it, you should also be able to take a screenshot of the dialog.

The dialog is here.

 

Error:

Exception details:
System.TypeInitializationException: The type initializer for 'ImPDFPlugin.ImPDFFileType' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ImPDFPlugin.ImPDFFileType..cctor()
   --- End of inner exception stack trace ---
   at ImPDFPlugin.ImPDFFileType.Debug(String message)
   at ImPDFPlugin.ImPDFSaveConfigWidget.Finalize()
 
I made sure I downloaded all the latest plugins (both file type and effects) when I upgraded to V4. I also have the most recent CBM from Simon Brown installed.
 
I also had both recent versions of the pdf file type plugin's installed.   I really can't answer about an ImSVG or .svg file because I do not know what an svg is. :(

Share this post


Link to post
Share on other sites

Sasha, I didn't ask you about ImSVG. I just told that in MY case there is an issue with ImSVG and not with InPDF.

I asked for a screenshot because a dialog is more than just text content. If you are more techi experienced you can get more information out of a picture.

I would expect that in your case it is enough to disable the Open one in the moment.. But I have no idea how CBM enumerates the filetypes. And if Simon is active then there is no reason to reassemble CBM.

Share this post


Link to post
Share on other sites
sashwilko    358

Sasha, I didn't ask you about ImSVG. I just told that in MY case there is an issue with ImSVG and not with InPDF.

I asked for a screenshot because a dialog is more than just text content. If you are more techi experienced you can get more information out of a picture.

I would expect that in your case it is enough to disable the Open one in the moment.. But I have no idea how CBM enumerates the filetypes. And if Simon is active then there is no reason to reassemble CBM.

I am not tech experienced and I cant take a screenshot if pdn crashes before I have the chance to press Prt Scr. All I can report is both save and import pdf file types will crash pdn when I use CBM. I have (sadly) had to remove your file type plugin, because I use CBM more than pdf.  I also installed the ghostscript and followed all the instructions on page #1 of this thread. As I said, this crash problem has only happened since in upgraded to pdn V4.

I can't be the only person having this issue with ImPDF and Custom brushes. :/

Share this post


Link to post
Share on other sites

Sasha please check your 'Paint.NET User Files/Custom Brushes' folder.

If there is a .pdf file then delete it.

From my understanding of CBM this should be the reason why the tool tries to call ImPDF to load this pdf brush.

 

I can not reproduce it with a crash on my side. But at least if there is a pdf then it will be loaded as a brush.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now