Printing multiple iframes as one page












0














I have a webpage that contains multiple iFrames.
I'm trying to get the pages to print the contents as one page but unfortunately I can't get this to print clearly. Is it possible to achieve this with some javascript or dojo if needed?



For example- this was an attempt at an answer but if you actually try using a valid src url that returns content you'll see that the contents of the page is truncated.



example here:
Print preview from multiple iframes?



Note: Check out the fiddle and try substituting a local html file you have with content in it and you should see that the content is truncated and doesn't include all of it.










share|improve this question






















  • This is default behavior of iFrames. You have to give a height to each frame but you dont know how tall the contents of the iFrame might be. You might give a height too tall and have lots of white space on the bottom or too short and your cntents are truncated. Only if you know the exact height of the content of ifram (like they do in banners) then you can set it accordingly. Javascript may or may not always able to read the height of the content in iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:13










  • Even if I max out the height to 100% it doesn't seem to take into account all of the content. Is there a way to say merge the content windows to one? I didn't think it would be this hard to be able to setup printing a page with only the areas needed! :/
    – jimgug
    Nov 23 '18 at 21:52






  • 1




    it wont! because 100% of what? you are setting 100% of the parent element, be it a div, or the whole document in view.... not the 100% of the contents of the iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:54










  • Is there a way to grab the html including styles from each frame I need? Then I can try to aggregate the content that way? Or say I do know the size of the content of the frame how/where can I specify it so the contents is not truncated?
    – jimgug
    Nov 23 '18 at 23:08










  • I have suggested an answer to a similar question of yours here stackoverflow.com/questions/53456976/…. Does that help?
    – customcommander
    Nov 24 '18 at 22:36
















0














I have a webpage that contains multiple iFrames.
I'm trying to get the pages to print the contents as one page but unfortunately I can't get this to print clearly. Is it possible to achieve this with some javascript or dojo if needed?



For example- this was an attempt at an answer but if you actually try using a valid src url that returns content you'll see that the contents of the page is truncated.



example here:
Print preview from multiple iframes?



Note: Check out the fiddle and try substituting a local html file you have with content in it and you should see that the content is truncated and doesn't include all of it.










share|improve this question






















  • This is default behavior of iFrames. You have to give a height to each frame but you dont know how tall the contents of the iFrame might be. You might give a height too tall and have lots of white space on the bottom or too short and your cntents are truncated. Only if you know the exact height of the content of ifram (like they do in banners) then you can set it accordingly. Javascript may or may not always able to read the height of the content in iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:13










  • Even if I max out the height to 100% it doesn't seem to take into account all of the content. Is there a way to say merge the content windows to one? I didn't think it would be this hard to be able to setup printing a page with only the areas needed! :/
    – jimgug
    Nov 23 '18 at 21:52






  • 1




    it wont! because 100% of what? you are setting 100% of the parent element, be it a div, or the whole document in view.... not the 100% of the contents of the iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:54










  • Is there a way to grab the html including styles from each frame I need? Then I can try to aggregate the content that way? Or say I do know the size of the content of the frame how/where can I specify it so the contents is not truncated?
    – jimgug
    Nov 23 '18 at 23:08










  • I have suggested an answer to a similar question of yours here stackoverflow.com/questions/53456976/…. Does that help?
    – customcommander
    Nov 24 '18 at 22:36














0












0








0







I have a webpage that contains multiple iFrames.
I'm trying to get the pages to print the contents as one page but unfortunately I can't get this to print clearly. Is it possible to achieve this with some javascript or dojo if needed?



For example- this was an attempt at an answer but if you actually try using a valid src url that returns content you'll see that the contents of the page is truncated.



example here:
Print preview from multiple iframes?



Note: Check out the fiddle and try substituting a local html file you have with content in it and you should see that the content is truncated and doesn't include all of it.










share|improve this question













I have a webpage that contains multiple iFrames.
I'm trying to get the pages to print the contents as one page but unfortunately I can't get this to print clearly. Is it possible to achieve this with some javascript or dojo if needed?



For example- this was an attempt at an answer but if you actually try using a valid src url that returns content you'll see that the contents of the page is truncated.



example here:
Print preview from multiple iframes?



Note: Check out the fiddle and try substituting a local html file you have with content in it and you should see that the content is truncated and doesn't include all of it.







javascript html iframe printing dojo






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 23 '18 at 21:10









jimgugjimgug

757




757












  • This is default behavior of iFrames. You have to give a height to each frame but you dont know how tall the contents of the iFrame might be. You might give a height too tall and have lots of white space on the bottom or too short and your cntents are truncated. Only if you know the exact height of the content of ifram (like they do in banners) then you can set it accordingly. Javascript may or may not always able to read the height of the content in iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:13










  • Even if I max out the height to 100% it doesn't seem to take into account all of the content. Is there a way to say merge the content windows to one? I didn't think it would be this hard to be able to setup printing a page with only the areas needed! :/
    – jimgug
    Nov 23 '18 at 21:52






  • 1




    it wont! because 100% of what? you are setting 100% of the parent element, be it a div, or the whole document in view.... not the 100% of the contents of the iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:54










  • Is there a way to grab the html including styles from each frame I need? Then I can try to aggregate the content that way? Or say I do know the size of the content of the frame how/where can I specify it so the contents is not truncated?
    – jimgug
    Nov 23 '18 at 23:08










  • I have suggested an answer to a similar question of yours here stackoverflow.com/questions/53456976/…. Does that help?
    – customcommander
    Nov 24 '18 at 22:36


















  • This is default behavior of iFrames. You have to give a height to each frame but you dont know how tall the contents of the iFrame might be. You might give a height too tall and have lots of white space on the bottom or too short and your cntents are truncated. Only if you know the exact height of the content of ifram (like they do in banners) then you can set it accordingly. Javascript may or may not always able to read the height of the content in iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:13










  • Even if I max out the height to 100% it doesn't seem to take into account all of the content. Is there a way to say merge the content windows to one? I didn't think it would be this hard to be able to setup printing a page with only the areas needed! :/
    – jimgug
    Nov 23 '18 at 21:52






  • 1




    it wont! because 100% of what? you are setting 100% of the parent element, be it a div, or the whole document in view.... not the 100% of the contents of the iFrame.
    – Nawed Khan
    Nov 23 '18 at 21:54










  • Is there a way to grab the html including styles from each frame I need? Then I can try to aggregate the content that way? Or say I do know the size of the content of the frame how/where can I specify it so the contents is not truncated?
    – jimgug
    Nov 23 '18 at 23:08










  • I have suggested an answer to a similar question of yours here stackoverflow.com/questions/53456976/…. Does that help?
    – customcommander
    Nov 24 '18 at 22:36
















This is default behavior of iFrames. You have to give a height to each frame but you dont know how tall the contents of the iFrame might be. You might give a height too tall and have lots of white space on the bottom or too short and your cntents are truncated. Only if you know the exact height of the content of ifram (like they do in banners) then you can set it accordingly. Javascript may or may not always able to read the height of the content in iFrame.
– Nawed Khan
Nov 23 '18 at 21:13




This is default behavior of iFrames. You have to give a height to each frame but you dont know how tall the contents of the iFrame might be. You might give a height too tall and have lots of white space on the bottom or too short and your cntents are truncated. Only if you know the exact height of the content of ifram (like they do in banners) then you can set it accordingly. Javascript may or may not always able to read the height of the content in iFrame.
– Nawed Khan
Nov 23 '18 at 21:13












Even if I max out the height to 100% it doesn't seem to take into account all of the content. Is there a way to say merge the content windows to one? I didn't think it would be this hard to be able to setup printing a page with only the areas needed! :/
– jimgug
Nov 23 '18 at 21:52




Even if I max out the height to 100% it doesn't seem to take into account all of the content. Is there a way to say merge the content windows to one? I didn't think it would be this hard to be able to setup printing a page with only the areas needed! :/
– jimgug
Nov 23 '18 at 21:52




1




1




it wont! because 100% of what? you are setting 100% of the parent element, be it a div, or the whole document in view.... not the 100% of the contents of the iFrame.
– Nawed Khan
Nov 23 '18 at 21:54




it wont! because 100% of what? you are setting 100% of the parent element, be it a div, or the whole document in view.... not the 100% of the contents of the iFrame.
– Nawed Khan
Nov 23 '18 at 21:54












Is there a way to grab the html including styles from each frame I need? Then I can try to aggregate the content that way? Or say I do know the size of the content of the frame how/where can I specify it so the contents is not truncated?
– jimgug
Nov 23 '18 at 23:08




Is there a way to grab the html including styles from each frame I need? Then I can try to aggregate the content that way? Or say I do know the size of the content of the frame how/where can I specify it so the contents is not truncated?
– jimgug
Nov 23 '18 at 23:08












I have suggested an answer to a similar question of yours here stackoverflow.com/questions/53456976/…. Does that help?
– customcommander
Nov 24 '18 at 22:36




I have suggested an answer to a similar question of yours here stackoverflow.com/questions/53456976/…. Does that help?
– customcommander
Nov 24 '18 at 22:36












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53452971%2fprinting-multiple-iframes-as-one-page%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53452971%2fprinting-multiple-iframes-as-one-page%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks