Invoice to PDF and Email to Pdf error

Hello,

I never had this issue beofre and have been using manager for a good year now, today I tried to print my invoices as PDF and received this error:

Apitron.PDF.Kit.ErrorHandling.DocumentSaveException: Apitron.PDF.Kit.ErrorHandling.DocumentSaveException: Exception of type ‘Apitron.PDF.Kit.ErrorHandling.DocumentSaveException’ was thrown.
at Apitron.PDF.Kit.FlowDocument.Write(Stream outputStream, ResourceManager resourceManager, PageBoundary boundary, PdfStandard pdfStandard)
at ManagerServer.PdfConverter.ConvertHtmlToPdf(String input, Stream output, PageBoundary pageBoundary)
at ManagerServer.HttpHandlers.Businesses.Business.Email.Post()

Any idea what I should do please?

I am using windows 10 pro 64 bit.

Thank you.

Ben

are you using any theme which you recently customized?
are you using the Print button or PDF button in Manager?

Hi SharpDriveTek,

No i did not touch the theme at all and haven’t been using manager.io for 2.5 months.
I m going to downoad these 3 to see if this helps
Apitron - Downloads

Thanks,

Ben

oups just realised it is not free…

Whether you recently touched the theme or not, are you using a custom theme? Or are you using the default Plain theme?

Does the problem happen only on one invoice, or does it happen on all?

Have you updated your software since you last used Manager?

your error is related to your pdf software and not Manager which is beyond the scope of this forum. if you are receiving any error when using the PDF button in Manager you can get help in the forum.

Yes, this is happening when the manager buttons for email and pdf are clicked. Otherwise I would not have posted the error in the manager forum:-)

it happens on all and this is the latest manager version(just downloaded it 1 hour ago.

You did not answer my question about whether you are using a custom theme. Errors like this are often related to a problem with a custom theme. Sometimes, there is a character the PDF generator cannot handle. Sometimes there are variable attributes the program does not support.

If you are using a custom theme, try with the default theme and see if the problem persists.

i am using latest version 17.9.17 and i cannot reproduce your problem. the PDF button and Email button works perfectly.
like i said the error message you receive clearly says Apitron.PDF.Kit.ErrorHandling which is an error caused by the Apitron software.
post screenshots of the steps you are following if you are getting the error when using the PDF and Email buttons. also, post a screenshot of your email settings.

Strange, I did reply but it is not posted.

No I have never touched the themes.

Could you please let me know how manager produces the PDF, I thought it was using the Apriton .net library. If not then what software shall I download to get the pdf to print properly(as you said this is a pdf problem and not a manager problem).

Here are the screenshots:
https://www.screencast.com/t/W15r5e1dg

https://www.screencast.com/t/UuJYEVSWer

Thank you.

My version is also
Manager 17.9.17

you do not need any 3rd party pdf generator. Manager has in-built pdf generator.

Yes this is what I thought and the Apitron.PDF.Kit must be the library used in manager to generate the PDF.
Apart from a custom theme, what else could cause this library to fail generating a PDF, any idea please?

Thank you.

I am a php developer, not .net unfortunately.
Would manager.io creates some kind of error log anywhere? Or WOuld this .net library post a log in windows when failing?

Here is the theme area, as you can see, no themes:
https://www.screencast.com/t/zHQgF4ICWhb

The only software I have installed the last 3 months was a logo design software that added new fonts, could this cause the problem?

Thank you.

what was the previous version of Manager you upgraded from? was the internal pdf generator working on your old version?
try installing Manager again, choose the repair option from the installer and check if the problem persists.
check any registry errors and clear the windows cache.

Ok, I did what you told me to do, restarted the computer and now get this when I start manager.io

An empty browser that shows this:
Error: Secret token in cookies invalid (xxxxxx-4df3-41d2-xxxxx-bb61axxxxxx99),

Then a microsoft.net error showing this:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ObjectDisposedException: Cannot access a disposed object.
Object name: ‘System.Net.HttpListener’.
at System.Net.HttpListener.CheckDisposed()
at System.Net.HttpListener.Stop()
at ManagerDesktop.Form.<>c__DisplayClass1_0.b__13(Object , EventArgs )
at System.EventHandler1.Invoke(Object sender, TEventArgs e) at Eto.PropertyStore.TriggerEvent[T](Object key, Object sender, T args) at Eto.Forms.Window.OnClosed(EventArgs e) at Eto.Platform.Invoke(Action action) at Eto.WinForms.Forms.WindowHandler3.b__8(Object sender, FormClosedEventArgs e)
at System.Windows.Forms.Form.OnFormClosed(FormClosedEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

ManagerDesktop
Assembly Version: 17.9.17.0
Win32 Version: 17.9.17.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/ManagerDesktop.exe

Apitron.PDF.Kit
Assembly Version: 1.0.67.0
Win32 Version: 1.0.67.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/Apitron.PDF.Kit.DLL

Eto
Assembly Version: 2.2.0.0
Win32 Version: 2.2.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/Eto.DLL

System.Runtime
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.dll

System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2103.2 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2103.2 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Linq.Expressions
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Linq.Expressions/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Linq.Expressions.dll

System.Reflection
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Reflection/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Reflection.dll

System.ComponentModel
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ComponentModel.dll

System.Collections
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Collections/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Collections.dll

System.Threading
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Threading/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Threading.dll

System.Globalization
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Globalization/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Globalization.dll

System.Runtime.Extensions
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Extensions/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Extensions.dll

System.Reflection.Extensions
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Reflection.Extensions/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Reflection.Extensions.dll

Windows.ApplicationModel
Assembly Version: 255.255.255.255
Win32 Version: 10.0.10011.16384
CodeBase: file:///C:/WINDOWS/system32/WinMetadata/Windows.ApplicationModel.winmd

PresentationFramework
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll

WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll

PresentationCore
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll

Eto.WinForms
Assembly Version: 2.2.0.0
Win32 Version: 2.2.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/Eto.WinForms.DLL

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2104.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Linq/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Linq.dll

ManagerServer
Assembly Version: 17.9.17.0
Win32 Version: 17.9.17.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/ManagerServer.EXE

HttpFramework
Assembly Version: 17.9.17.0
Win32 Version: 17.9.17.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/HttpFramework.DLL

Manager
Assembly Version: 17.9.17.0
Win32 Version: 17.9.17.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/Manager.DLL

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.IO
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.IO/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.IO.dll

Newtonsoft.Json
Assembly Version: 10.0.0.0
Win32 Version: 10.0.3.21018
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/Newtonsoft.Json.DLL

DotLiquid
Assembly Version: 2.0.145.0
Win32 Version: 2.0.145
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/DotLiquid.DLL

SQLite-net
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/SQLite-net.DLL

SQLitePCLRaw.batteries_green
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/SQLitePCLRaw.batteries_green.DLL

SQLitePCLRaw.provider.e_sqlite3
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/SQLitePCLRaw.provider.e_sqlite3.DLL

SQLitePCLRaw.core
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/SQLitePCLRaw.core.DLL

protobuf-net
Assembly Version: 2.2.1.0
Win32 Version: 2.2.1.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/protobuf-net.DLL

Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 2.2.0.0
CodeBase: file:///C:/Users/Ben/AppData/Roaming/Manager/Eto.WinForms.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

I will check online to check what this System.Net.HttpListener does.

As I said in my earlier post, the error you are seeing has previously been related to non-standard characters and font attributes the PDF generator cannot handle. These have sometimes been related to language preference. What language are you operating in? If not English, does the problem persist if you switch to English?

Thanks for the reply.
I use English UK as the OS language.

I tried to remove the latest .net framework + the 3.5 and reinstalled them, repaired manager.io and then uninstalled it(took backups of course), same problem.

Now I am going to see if there is a way to revert the original windows fonts as my design software imported some. This is a bit of a pain because it will be either I use the design software or manager.io, but need both…ouch, will let you know if I can come back to the original windows 10 fonts to see if this solve the error.