iclems / iOS-htmltopdf

MIT License
305 stars 79 forks source link

Unwanted scale factor when rendering pages #35

Open MartinBell opened 8 years ago

MartinBell commented 8 years ago

Hello.

Ive been trying to use the library to create a pdf from a simple html with a fixed pixel size. However the resulting page is always 80% smaller than it should be. Changing the viewport meta tag does not seem to make any difference. The page should fill the screen with kPaperSizeLetter. Ive pasted the code,html and resulting pdf. Am I missing something?

Thank you. Any help much appreciated.

delegateDemo.pdf

self.PDFCreator = [NDHTMLtoPDF createPDFWithURL:[NSURL fileURLWithPath:srcPath] pathForPDF:[@"~/Documents/delegateDemo.pdf" stringByExpandingTildeInPath] delegate:self pageSize:kPaperSizeLetter margins:UIEdgeInsetsMake(0, 0, 0, 0)];

Test2.txt