setIsBlackWhite() method error
Open Protected PDF file
PDF/A_1b conversion fails with several documents
Hi,
I can not convert the attached document to a valid PDF/A_1B. I have a lot of such documents that fails. Converting with Ghostscript works.
Best regards,
Daniel
Insert first page
public MemoryStream InsertPages(MemoryStream inputFile, int index, MemoryStream pageStream) { MemoryStream retVal = new MemoryStream(); if (inputFile != null) { Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inputFile); Page newPage = pdfDocument.Pages.Insert(index); PageCollection pageCollection = pdfDocument.Pages; double pdfPageWith, pdfPageHeight; double lly, llx, urx, ury; if (pageCollection.Count != 0) { pdfPageWith = newPage.Rect.Width; pdfPageHeight = newPage.Rect.Height; lly = newPage.Rect.LLY; llx = newPage.Rect.LLX; ury = newPage.Rect.URY; urx = newPage.Rect.URX; newPage.SetPageSize(pdfPageWith, pdfPageHeight); Aspose.Pdf.Facades.PdfFileMend fileMend = new Aspose.Pdf.Facades.PdfFileMend(pdfDocument); using (pageStream) { float pdfPageHeightLLY = (float)lly; float pdfPageWidthLLX = (float)llx; float pdfPageHeightURY = (float)ury; float pdfPageWidthURX = (float)urx; if (pageStream != null) { fileMend.AddImage(pageStream, index, pdfPageWidthLLX, pdfPageHeightLLY, pdfPageWidthURX, pdfPageHeightURY); } } pdfDocument.Save(retVal); fileMend.Close(); } return retVal; }
New conversion engine for inline html
SSRS 2012
Adjusting Margins
I am using the PdfFileEditor class. I am called the resizeContentsPct method.
Here is the problem.
The first document the height is taller than the width. This document is adjusted correctly.
The second document, the width is greater than the height (landscape ish). Instead of the
top and bottom margins being adjusted, the left and right ones are being adjusted and it looks
like every page is shifted down and to the right. If I call the resizeContentsPct method with the
width and height parameters switched, the document gets resized correctly.
HTML tables (sized in pixles) converted to pdf
"If we were to setup a HTML table with CSS styles inline for widths using pixels as a unit of measure would the output render ok? If so do you know how it converts pixels into a unit of measure for printing>? I’m assuming via page size/paper size maybe?"
Best practices: HTML inline styles
Radio button values
Aspose.Pdf.Facades.Form.GetFieldFacade method (no suitable parameter value found)
Convert PDf - epub
HTML to PDF - Inconsistent font-size
Convert pdf-Epub
This message was posted using Banckle Live Chat 2 Forum
Email ID Info
SSRS Preview
How to refer to Css file
Can someone explain to me how does the Css file reference works when I export an Html to Pdf?
I tried to set the HtmlInfo.ExternalResourcePath but it seems not working...
This is the html string:
<html><head> <link href="site.css" type="text/css" rel="stylesheet"/></head><body> ... </body></html>
and I try to set the property with the following values:
"http://localhost:xxx/content/"
or "Content"
or "/Content/"
but the result is aways the same (I'm using an asp.net mvc 4 application).
Of cource the correct url for the css is http://localhost:xxx/content/site.css.
I've already read the documentation but it is not of great help.
Thanks in advance.
PDF creator and Edit
How to Generate a Grayscale TIFF image from color PDF (using Aspose.PDF)
Table border outline not showing
I have attached an image of my pdf.
var htmlText="<html>
<body>
<div>
<table border="1" cellspacing="0" style="font-size:8px; width:300px">
<tbody>
<tr>
<td colspan="3">
<table border="0" cellspacing="0" style="font-size:8px; width:300px">
<tbody>
<tr>
<td>Employee Name</td>
<td>Department</td>
</tr>
<tr>
<td>test</td>
<td>test</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>"
var text = new Text(htmlText);
text.IsHtmlTagSupported = true;
text.IsHtml5Supported = true;
text.IfHtmlTagSupportedOverwriteHtmlFontNames = true;
document.Sections[0].Paragraphs.Add(text);
If use IsHtmlTagSupported,The pdf save the first time a minute or so.
Hello every one,
I can prove the issue is on Aspose side with a web test process we wrote, with this you can reproduce the issue when generating PDF, i.e. initial attempt is lengthy.
The way to apply this web process: deploy it in IIS, click Export PDF on WebForm1.aspx, it may take about 1 minute in first try, subsequent exporting would be faster. If you don't use IsHtmlTagSupported property,there is no this problem.
Problem is each time after IIS restarted or reached Idle Time-out(minutes) in IIS, the issue reoccurs! Deploying this web process in IIS can help reproduce the issue, only debugging it won't help.So I think this problem and used in the web project has a lot to do.