Not all links produce an export
See original GitHub issueAs stated yesterday not all links produce an export when this happens i get put into break mode and gives me an error that states the following:
- An unhandled exception of type ‘System.NotImplementedException’ occurred in mscorlib.dll The method or operation is not implemented.
- I have noticed for each link a new chromium instance gets opened but never closed is there a way to do this with this code?
foreach (var list_item in sql_list)
{
string id = list_item.Item2.ToString();
string extension = ".pdf";
string exportname = id + extension;
var chromiumRevision = 526987;
Console.WriteLine("Downloading chromium");
await Downloader.CreateDefault().DownloadRevisionAsync(chromiumRevision);
Console.WriteLine("Navigating " + list_item.Item1);
var browser = await Puppeteer.LaunchAsync(new LaunchOptions
{
Headless = true
}, chromiumRevision);
var page = await browser.NewPageAsync();
await page.GoToAsync(list_item.Item1);
Console.WriteLine("Generating PNG");
await page.PdfAsync(Path.Combine(directory,exportname));
Console.WriteLine("Export " + exportname + " completed");
Console.WriteLine();
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Hyperlinks don't Export/Save-as when making PDF's on a ...
Text hyperlinks export correctly to PDF. Hyperlinks on shapes do not. Please convert your shape hyperlinks to text hyperlinks, then try again.
Read more >InDesign export error message
I am trying to export an InDesign file to PDF and am receiving two error messages. First - "This document contains links to...
Read more >PDF Export not attaching all links
Creating a one pager and need links to be exported with the PDF. For some reason only a few of the links are...
Read more >Hyperlinks not Clickable when Exported to excel
When I run a query, the results of it are exported to the Excel. This data has few hyperlinks which get displayed in...
Read more >Links Not Working/Not Clickable in Exported PDFs? FIXED!
Links Not Working/Not Clickable in Exported PDFs? FIXED! If you, like me, use Pages to create doc s and then export them to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your code should look something like this:
Console.WriteLine(“Downloading chromium”); await Downloader.CreateDefault().DownloadRevisionAsync(Downloader.DefaultRevision);
I took the URLs from the comment you made in one comment. We’re failing at creating PDFs for both. So it’s something we need to take a look at.
You should move the creation of the Browser into a using statement