MaxMelcher / AzureDevOps.WikiPDFExport

Export Azure DevOps Wiki to PDF
MIT License
186 stars 62 forks source link

Base64 image gives error "path too long" #113

Closed weha closed 1 year ago

weha commented 1 year ago

I tried to convert our wiki but it contains I get an error when it tries to import (?) an image. The image it's talking about is 840x316px

  ERR: File Development\Permissions.md specified in the order file was not found and will be skipped!
  WARN: File Apps.md is empty and will be skipped!
  WARN: File Apps\Get-Started.md is empty and will be skipped!
ERR: Something bad happend.
System.IO.PathTooLongException: The path 'Apps\Get-Started/data:image/.png;base64,iVBORw0KGgoAAAANSUhEUgAAA0gAAAE8CAYAA...................g==' is too long, or a component of the specified path is too long.
   at System.IO.PathHelper.GetFullPathName(ReadOnlySpan`1 path, ValueStringBuilder& builder)
   at System.IO.PathHelper.Normalize(String path)
   at System.IO.Path.GetFullPath(String path)
   at azuredevops_export_wiki.WikiPDFExporter.CorrectLinksAndImages(MarkdownObject document, FileInfo file, MarkdownFile mf)
   at azuredevops_export_wiki.WikiPDFExporter.ConvertMarkdownToHTML(List`1 files)
   at azuredevops_export_wiki.WikiPDFExporter.Export()
MaxMelcher commented 1 year ago

is that image rendering correctly in Azure DevOps? Is it base64 there too?

gcerik commented 1 year ago

just saw same issue - yes the image works fine in Azure Devops

gcerik commented 1 year ago

@MaxMelcher fixed - see https://github.com/MaxMelcher/AzureDevOps.WikiPDFExport/pull/116

MaxMelcher commented 1 year ago

merged