abcpdf

Printing landscape html->pdf using abcPDF

家住魔仙堡 提交于 2019-12-06 11:22:11
问题 I am trying to get a PDF generated by abcPDF from html output to print the first three pages in portrait and then switch the fourth page to landscape. I have been able to get the html to switch into landscape for the fourth page by applying this class to a div that is the 4th page: .PageLandscape { width="100%"; height="100%"; filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=3); size:landscape; } When abcPDF converts the html to pdf though, the 4th page is still portait. Any

Every now and then, ABCpdf runs out of memory

允我心安 提交于 2019-12-06 09:57:01
问题 The project I'm on is using a 3rd party component to build dynamic PDFs in a VB.Net web system called ABCpdf.Net. (not a terrible tool, but not a great one either.) Every now and then, for reasons I can't fathom, the document object throws a SEHException. Digging futher, it turns out this is caused by a custom exception in the document object of the type WebSupergoo.ABCpdf6.Internal.PDFException. The contents contains only the not -terribly-helpful title "Unable to get image data. Out Of

Detect orientation of every page in a PDF using ABCPDF

自闭症网瘾萝莉.ら 提交于 2019-12-06 07:45:36
Is there a way to detect the orientation of every page in a pdf file? I am creating an application that adds watermarks(text) to pdf files. These files can have pages portrait, landscape or a combination of both. Using the doc.MediaBox property, I use the following logic below: portrait = box.Height > box.Width My problem is that, it is always returning a true value even on a landscape documents. A Doc can have a different MediaBox on every single page. To inspect the Mediabox for page N: doc.PageNumber = n portrait = doc.Mediabox.Height > doc.Mediabox.Width Landscape pages can be created in 2

Why did ABCPdf code start generating a Window Error 5

ぐ巨炮叔叔 提交于 2019-12-05 21:30:26
I have had some long standing code which has worked fine for quite some time. Recently it began generating the following error. 1st on a asp site and later on a .Net MVC site. Neither of which have changed. I really curious as to why the this error now is rising. I am hoping this post will be of use to someone in the future since the solution was difficult to find searching the error itself. Error: ABCpdf error '80070000' Unable to render HTML. Unable to get printer device-mode size. Microsoft XPS Document Writer Windows error 5. Access is denied. Some research suggest that it is because the

ABCPDF: Split PDF files into single page PDF files

馋奶兔 提交于 2019-12-05 17:50:33
I am using ABCpdf tool and I am trying to split 1TB of PDF files (so efficiency is a concern) into single page PDF files. I have tried the following: Doc theSrc = new Doc(); theSrc.Read("C://development//pdfSplitter//Bxdfbc91ca-fc05-4315-8c40-798a77431ee0xP.pdf"); for (int i = 1; i <= theSrc.PageCount; i++) { Doc singlePagePdf = new Doc(); singlePagePdf.Rect.String = singlePagePdf.MediaBox.String = theSrc.MediaBox.String; singlePagePdf.AddPage(); singlePagePdf.AddImageDoc(theSrc, i, null); singlePagePdf.FrameRect(); singlePagePdf.Save("C://development//pdfSplitter//singlePDF//singlePage"+i+"

How do I get past “Gecko engine crashed.;Gecko engine crashed.;Gecko engine crashed.;” error after upgrading abcPDF

痞子三分冷 提交于 2019-12-05 04:18:04
问题 I recently upgraded abcPDF from v8.1.0.7 to v8.1.1.1 (and then later from v8.1.1.1 to v8.1.1.2). After the upgrades, I got errors similar to the following whenever I tried to generate a PDF: "Gecko engine failed to render the page: Gecko engine crashed.; Gecko engine crashed...;" "Failed to add HTML:Gecko engine crashed.; Gecko engine crashed.; Gecko engine crashed..." We're using the Gecko engine (instead of the default MSHTML engine) to render PDFs. We didn't get the error message until

Printing landscape html->pdf using abcPDF

社会主义新天地 提交于 2019-12-04 15:12:37
I am trying to get a PDF generated by abcPDF from html output to print the first three pages in portrait and then switch the fourth page to landscape. I have been able to get the html to switch into landscape for the fourth page by applying this class to a div that is the 4th page: .PageLandscape { width="100%"; height="100%"; filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=3); size:landscape; } When abcPDF converts the html to pdf though, the 4th page is still portait. Any thoughts or hints? thanks! Not sure if you've found the answer, but here's how I did it. Found it from

Every now and then, ABCpdf runs out of memory

こ雲淡風輕ζ 提交于 2019-12-04 15:01:48
The project I'm on is using a 3rd party component to build dynamic PDFs in a VB.Net web system called ABCpdf.Net. (not a terrible tool, but not a great one either.) Every now and then, for reasons I can't fathom, the document object throws a SEHException. Digging futher, it turns out this is caused by a custom exception in the document object of the type WebSupergoo.ABCpdf6.Internal.PDFException. The contents contains only the not -terribly-helpful title "Unable to get image data. Out Of Memory" Usually this happens when trying to add an image to the PDF. Since these images are PNGs of less

Letting the Javascript finish before rendering pdf in ABC pdf

寵の児 提交于 2019-12-03 21:33:45
I'm trying to make a pdf of a web page that is displaying locations on Google Maps. The only problem is that the Javascript isn't quite completing by the time that ABCpdf renders the pdf. It's incomplete. How can I make ABDpdf wait until the javascript is 100% complete before the pdf is rendered. Here is what I've tried so far. Doc theDoc = new Doc(); string theURL = url; // Set HTML options theDoc.HtmlOptions.AddLinks = true; theDoc.HtmlOptions.UseScript = true; theDoc.HtmlOptions.PageCacheEnabled = false; //theDoc.HtmlOptions.Engine = EngineType.Gecko; // JavaScript is used to extract all

ABCpdf converting html anchors to jump to another page in the same PDF

三世轮回 提交于 2019-12-03 13:55:23
问题 I'm dynamically generating a PDF using ABCpdf which contains a table of contents that would link to other pages within the same PDF. The problem is that the path of the anchor tags in the HTML get changed to an absolute path to a temporary file. For example, ABCpdf would render the link's href: <a href="#elementId">Link</a> in the PDF as: file:///C:/Users/Aaron/AppData/Local/Temp/ABCpdf/pdfCMMYPSF.htm#elementId This is how I generate the PDF: Doc pdf = new Doc(); pdf.HtmlOptions.AddLinks =