An Error Exists On This Page Acrobat Itextsharp
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
An Error Exists On This Page Acrobat May Not Display Correctly
this site About Us Learn more about Stack Overflow the company Business Learn an error exists on this page acrobat may not display the page correctly please contact more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
An Error Exists On This Page Acrobat Powerpoint
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PDFs generated using itextsharp giving error at the time of first print command up vote 1 down vote favorite I am getting below for the first time giving print command. "An error exists on this page. Acrobat may not display the page correctly. please contact the person who created the pdf document to correct the problem". Print out is comming very fine. and Second time print out command not giving any error. Please help me why this error is comming for the first time print. This is part of my code to create PDF PdfContentByte cb = writer.DirectContent; cb.BeginText(); Font NormalFont = FontFactory.GetFont("Arial", 12, Font.NORMAL, Color.BLACK); // Add an image to a fixed position iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(Server.MapPath("~/images/images/banner.tiff")); img.SetAbsolutePosition(35, 760); img.ScalePercent(50); cb.AddImage(img); // Draw a line by setting the line width and position cb.SetLineWidth(2); cb.MoveTo(20, 740); cb.LineTo(570, 740); cb.Stroke(); //Header Details cb.BeginText(); writeText(cb, drHead["EmpName"].ToString(), 25, 745, f_cb, 14); writeText(cb, "Employee ID:", 450, 745, f_cn, 12); writeText(cb, drHead["EmployeeID"].ToString(), 515, 745, f_cb, 12); cb.EndText(); cb.BeginText(); writeText(cb, "XXXX:", 25, 725, f_cb, 8); cb.EndText(); cb.SetLineWidth(2); cb.MoveTo(20, 675); cb.LineTo(570, 675); cb.Stroke(); cb.EndText(); // Acknowledgement section cb.BeginText(); writeText(cb, "XXXXXXXXXXXXXXXX", 20, 140, f_cb, 12); cb.EndText(); cb.EndText(); Please help me to know what is the issue. pdf adobe pdf-generation itextsharp share|improve this question edited Dec 2 '14 at 9:10 Bruno Lowagie 44k73869 asked Jan 23 '14 at 7:02 Vandana 446 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted You have nested text blocks. That's illegal PDF syntax. I think recent versions of iTextSha
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up iTextSharp AddText causing 'An error exists http://stackoverflow.com/questions/21301497/pdfs-generated-using-itextsharp-giving-error-at-the-time-of-first-print-command on this page' up vote 0 down vote favorite The resulting PDF document gets 'An error exists on this page.' when opened in Acrobat Adobe Reader. Any ideas as to why this occurs? It was happening in both an older version of iTextSharp and the 5.1.1 version that I tried today. Test code: static void PDFErrorOnPage() { Document document = new Document(PageSize.LETTER); float fMarginLeft = 15.822f; http://stackoverflow.com/questions/6670405/itextsharp-addtext-causing-an-error-exists-on-this-page // 0.21975 inch float fMarginRight = 15.822f; // 0.21975 inch float fMarginTop = 36.0f; // 0.5 inch float fMarginBottom = 36.0f; // 0.5 inch float fLabelSpacingHorizontal = 10.08f; float fLabelWidth = 186.732f; float fLabelHeight = 72.0f; float fLabelPadding = 5.0f; float fLabelPaddingLeft = 20.0f; float fLabelPaddingBottom = 5.0f; float fLabelPaddingTop = 0.0f; int nRow = 0; int nCol = -1; bool bDebug = true; try { BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED); Font font = new Font(bf, 8, Font.NORMAL, BaseColor.BLACK); Font fontBold = new Font(bf, 8, Font.BOLD, BaseColor.BLACK); PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("d:\\tempjunk\\test.pdf", FileMode.Create)); document.SetMargins(fMarginLeft, fMarginRight, fMarginTop, fMarginBottom); document.Open(); PdfContentByte cb = writer.DirectContent; for (int i = 0; i < 26; i++) { nCol++; if (nCol > 2) { nCol = 0; nRow++; } if (nRow > 9) { nRow = 0; document.NewPage(); Console.WriteLine("document.NewPage()"); } float fLabelBottomLeftX = fMarginLeft + (nCol * fLabelSpacingHorizontal) + (nCol * fLabelWidth); float fLabelBottomLeftY = fMarginBottom + ((9 - nRow) * fLabelHeight); if (bDebug) { cb.SetRGBColorStroke(0x00, 0x00, 0xFF); cb.Rectangle(fLabelBottomLeftX, fLabelBottomLeftY, fLabelWidth, fLabelHeight); cb.Stroke(); } cb.BeginText(); ColumnText ct = new ColumnText(cb); ct.SetSimpleColumn( fLabelBottomLeftX + fLabelPaddingLeft, fLabelBottomLeftY + fLabelPaddingBottom, fLabelBottomLeftX + fLabelWidth - (fLabelPaddingLeft + fLabelPadding), fLabelBottomLeftY + fLabelHeight - (fLabelPaddingBottom +
ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses JavaScript https://forums.adobe.com/thread/596537 and much of it will not work correctly without it enabled. http://nabble.documentfoundation.org/How-to-fix-quot-error-exists-on-this-page-quot-PDF-error-from-LibreOffice-3-4-generated-documents-td3700176.html Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Acrobat SDK All CommunitiesAcrobatAcrobat SDK 18 Replies Latest reply on May 7, an error 2014 5:11 AM by Test Screen Name Error in Acrobat 8: An error exists on this page. Acrobat may not display the page correctly...? anaghad Mar 15, 2010 2:24 AM Hi,We perform the e-signing on any PDF using our custom e-signature plug-in. Once that's done, when we try re-opening the PDF in Acrobat an error exists version 8.0.0.0, we get the following error:-"An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem" Please note that this error occurs intermittently and is NOT observed in Acrobat 7 or 9. Also, when a plain PDF is opened (i.e. a PDF without any signature on it) then there is NO error.Could you let me know what could be the issue here? I read it in Acrobat 8.1.3 release notes that such an error was a known bug in version 8.0.0.0 (http://kb2.adobe.com/cps/407/kb407016.html), but I am not sure of its cause.Let me know your comments/suggestions.Thanks! I have the same question Show 0 Likes(0) 15658Views Tags: none (add) This content has been marked as final. Show 18 replies 1. Re: Error in Acrobat 8: An error exists on this page. Acrobat may not display the page correctly...? lrosenth Mar 15, 2010 7:59 AM
♦ Locked 6 messages prashant Patil Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ How to fix "error exists on this page" PDF error from LibreOffice 3.4 generated documents? Dear Admin, I have exported a document to PDF file in LibreOffice 3.4 Writer. In this PDF, I am inserting image and text using ITextsharp dll 5.0.5.0 The processing is done successfully. But while opening the processed PDF first time; is displayed the following error: "An error exists on this page. Acrobat may not display the page correctly. please contact the person who created the pdf document to the problem" Kindly advice how to remove the error message. Thanks & Regards, Prashant Patil, Senior Software Engineer, Software ICICI-SA, 3i Infotech Ltd. Tel.Direct: + 91 22 4084 5767 | Email: [hidden email] | www.3i-infotech.com -- For unsubscribe instructions e-mail to: [hidden email] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/Posting guidelines + more: http://wiki.documentfoundation.org/NetiquetteList archive: http://listarchives.libreoffice.org/global/users/All messages sent to this list will be publicly archived and cannot be deleted Tom Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: How to fix "error exists on this page" PDF error from LibreOffice 3.4 generated documents? Hi :) I found the bug-tracking thing for them http://sourceforge.net/tracker/?group_id=72954&atid=536236Can you insert the image and text into the original using LibreOffice before exporting as Pdf? Does that give the same error message? I think copy&paste might help. Regards from Tom :) --- On Mon, 30/1/12, prashant Patil <[hidden email]> wrote: From: prashant Patil <[hidden email]> Subject: [libreoffice-users] How to fix "error exists on this page" PDF error from LibreOffice 3.4 generated documents? To: [hidden email] Date: Monday, 30 January, 2012, 7:55 Dear Admin, I have exported a document to PDF file in LibreOffice 3.4 Writer. In this PDF, I am inserting image and text using ITextsharp dll 5.0.5.0 The processing is done successfully. But while opening the processed PDF first ti