We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cannot print PDFs with html inserted in the header

Hi,

We recently added a feature that takes an existing PDF and inserts an html in the header of each page.
Here is the code we are using for inserting the html:

//stream is the input stream that contains the PDF
//html is the html we are inserting
var pdfDocument = new PdfDocument(stream);
for (int i = 1; i <= pdfDocument.Pages.Count; i++)
{
var hf = new AsposePdf.HeaderFooter { Margin = new MarginInfo(40, 0, 40, 0) };
var html = new HtmlFragment(html)
{
Margin = new MarginInfo(0, 0, 0, 40)
};
headerData.CurrentPage++;
hf.Paragraphs.Add(html);
pdfDocument.Pages[i].Header = hf;
}

Here is the html:











A: {1}

B: {2}









C

{3}

D

{4}

E

{5}

F

{6}



So the html is basically a table of data that has an image on top left and text in the rest of the cells.

We have a problems with a Sharp PostScript printer that is getting clogged when we print the PDF from Preview 7 or Acrobat Reader from Yosemite 10.9 Mac OSx. So the document is spooled and gets to the printer. The printer freezes, does not print and needs a reset.

Is this an issue you are aware of?

Thanks!

Hi Panos,


We are sorry for the inconvenience. We are looking into the printing issue on MAC and will update you soon.

Meanwhile, we will appreciate it if you please share your sample input document as well, it will help us to address your issue exactly.

Best Regards,

Hi,

Thanks for looking into it. I attached a PDF (header test.pdf) that is generated using Aspose.PDF from merging the converted to PDF version of a Word doc file (header test.doc) with another control page. All of them have the header applied using the technique mentioned previously.
This kind of file does not print well on a Sharp PostScript printer using the Preview or Acrobat Reader from Mac.

Let us know if the way we added the header might have caused that or if there is an alternative way of doing it.

Thank you!

Hi Panos,


Thanks for sharing the resource file.

We are further investigating/testing the scenario on MAC environment and will keep you updated with our findings.

Hi,

I was wondering if there are any updates on this issue.

Thank you!

Hi Panos,


Thanks for your patience.

We humbly apologize for the delay as there were other issues in the queue which were meant to be investigated before your issues. However as soon as we have some significant results to share, we will definitely let you know. We greatly appreciate your patience and cooperation in this regard. Please spare us little time.

We are sorry for the delay and inconvenience.


Best Regards,