Tools to Capture and Convert the Web
GrabzIt's Online Community

How to create multipage pdf document from web page with dynamic content?

Hi. I need to convert web page with all styles and a lot of dynamic content to .pdf document. It means that .pdf document can have 1 or 2 or more pages and I don't know how many contents can be in different cases. But .pdf document trims all content longer than one page. How can I convert my page to a multipage pdf document?

Asked by Dawie Harmse on Friday, 4 October, 2019 07:19:50 AM

Please can you send the URL so we can have a look at it.

Answered by GrabzIt Support on Friday, 4 October, 2019 07:22:05 AM

What URL do You mean? I use ConvertPage method:  GrabzIt(this.GRABZIT_KEY).ConvertPage({'target': '#someId','format': 'pdf','download': 1,'cache': 0,'filename': username,'bheight': -1,'height': -1,'waitfor': '#someId'}).Create();

Answered by Dawie Harmse on Friday, 4 October, 2019 07:50:32 AM

Ok, I think I see what the problem is. You are using the target feature this can't work across two pages. You can either increase the page size or just pass the html you want to convert to the ConvertHTML method.

Answered by GrabzIt Support on Friday, 4 October, 2019 08:03:49 AM

Ok, but I need to convert my web page with a lot of styles. How it is possible with ConvertHTML method?

Answered by Dawie Harmse on Friday, 4 October, 2019 02:09:33 PM

You would need to remove the parts you aren't interested in while keeping the styles.

Alternatively use the target parameter use the hide parameter which can remove elements you don't need.

Or just specify a large web page size, which wil then be chopped to size by the target.

Answered by GrabzIt Support on Friday, 4 October, 2019 02:25:31 PM