InfoPath 2007 - Export to PDF

L

Lou Zher

Hey all,
I'm trying to understand some differences in behavior that I'm seeing with
InfoPath 2007's Export to PDF feature.

I have a filled out form that happens to be based on a template hosted in
SharePoint that has the page setup setting of landscape.

I've performed an export on five different machines. In each case I've
cleared the template cache (%userprofile%\Local Settings\Application
Data\Microsoft\InfoPath), opened the same form .xml file from a network
share, waited for the template to be fetched from SharePoint, selected
[File] [Export to] [PDF or XPS] and selected PDF as the type and "Minimum
size (publishing online)" and hit [Publish]. The result was four different
sized PDFs. Two of those correctly preserved the landscape-ness of the
template's settings which made three pages, the other two did not and made
two. Opening the PDF and looking at their page sizes reveal the following:
6.69x9.50 (the two portrait sized PDFs), 10.87x9.11, 10.56x8.88.

I seem to recall that there were a few versions of the SaveAsPdfAndXps
download, but I think all my machines have the same one. They all have the
same %CommonProgramFile%\Microsoft Shared\OFFICE12\EXP_PDF.DLL file anyway
(compared with FC /b).

I looked around in [Tools][Options] looking for settings that could affect
it, but couldn't find any. I tried using ProcMon to see if I could find some
registry keys or config files that InfoPath was using that could cause the
variance in output but nothing stood out. I thought that perhaps Export
would be affected by the default printer settings, but it didn't seem to be.

I don't mind terribly that there is a subtle size variation, but I need to
figure out how to consistently make it Export with landscape preserved.

In general, the export doesn't really behave as I would expect in any case.
I would expect it to make PDF pages the size specified in the template with
the margins, headers and footers specified as well, but this is not the
case.

I might consider exporting to XPS and then converting it to PDF, but my
initial testing shows equal variability in output on XPS.

Printing to the XPS Document Writer seems to produce consistent results, but
this is more problematic for me to automate.

Any ideas?
-HS
 
L

Lou Zher

Thanks for the reply. I read the article. (Actually, I had read it before).
I probably failed to make it clear in my post that I am already doing PDF
export programmatically... I was merely using the client tool interactively
to try to isolate what causes changes in the PDF. I am using the .Export()
method which appears to have the same output as [File][Export To][PDF or
XPS].

The export is working for documents based on portrait templates, but not
landscape... well, not consistently. The landscape-ness is sometimes lost on
the output PDF.

Something new that I didn't see in the article the first time I read it was
"Both these solutions only work for forms that are filled out through the
InfoPath client application and not for those filled out through a
browser." -- well, that's what I'm doing and it works, except for the
landscape issue. I did have to jump through some other hoops which I
mentioned in another thread ("Automate PDF exports") earlier this month. I'm
pretty sure I can repro the landscape non-preservation on export issue in a
InfoPath client only scenario. I'll try that today.

BTW: I also read "Use Word 2007 To Programmatically Convert an InfoPath 2007
Form to PDF"
(http://enterprise-solutions.swits.n...2007-convert-infopath-2007-pdf&c=infopath2007)
-- it's an option I might consider.

Thanks again KRR and SYMWAT.


K.Ramana Reddy(GGK Tech) said:
Hi,

Check out this link,
http://enterprise-solutions.swits.n...port-infopath-2007-form-to-pdf&c=infopath2007

I hope this will help for you.
--
k.Ramana Reddy
http://www.GGKtech.com


Lou Zher said:
Hey all,
I'm trying to understand some differences in behavior that I'm seeing
with
InfoPath 2007's Export to PDF feature.

I have a filled out form that happens to be based on a template hosted in
SharePoint that has the page setup setting of landscape.

I've performed an export on five different machines. In each case I've
cleared the template cache (%userprofile%\Local Settings\Application
Data\Microsoft\InfoPath), opened the same form .xml file from a network
share, waited for the template to be fetched from SharePoint, selected
[File] [Export to] [PDF or XPS] and selected PDF as the type and "Minimum
size (publishing online)" and hit [Publish]. The result was four
different
sized PDFs. Two of those correctly preserved the landscape-ness of the
template's settings which made three pages, the other two did not and
made
two. Opening the PDF and looking at their page sizes reveal the
following:
6.69x9.50 (the two portrait sized PDFs), 10.87x9.11, 10.56x8.88.

I seem to recall that there were a few versions of the SaveAsPdfAndXps
download, but I think all my machines have the same one. They all have
the
same %CommonProgramFile%\Microsoft Shared\OFFICE12\EXP_PDF.DLL file
anyway
(compared with FC /b).

I looked around in [Tools][Options] looking for settings that could
affect
it, but couldn't find any. I tried using ProcMon to see if I could find
some
registry keys or config files that InfoPath was using that could cause
the
variance in output but nothing stood out. I thought that perhaps Export
would be affected by the default printer settings, but it didn't seem to
be.

I don't mind terribly that there is a subtle size variation, but I need
to
figure out how to consistently make it Export with landscape preserved.

In general, the export doesn't really behave as I would expect in any
case.
I would expect it to make PDF pages the size specified in the template
with
the margins, headers and footers specified as well, but this is not the
case.

I might consider exporting to XPS and then converting it to PDF, but my
initial testing shows equal variability in output on XPS.

Printing to the XPS Document Writer seems to produce consistent results,
but
this is more problematic for me to automate.

Any ideas?
-HS
 
H

Humphrey

Could you give we mere mortals a leg up on the export to PDF by posting a
snippet of the code you use here? VBA I can do standing on my head VBscript
is a whole new ball game I need to learn. Many thanks.

H

Lou Zher said:
Thanks for the reply. I read the article. (Actually, I had read it before).
I probably failed to make it clear in my post that I am already doing PDF
export programmatically... I was merely using the client tool interactively
to try to isolate what causes changes in the PDF. I am using the .Export()
method which appears to have the same output as [File][Export To][PDF or
XPS].

The export is working for documents based on portrait templates, but not
landscape... well, not consistently. The landscape-ness is sometimes lost on
the output PDF.

Something new that I didn't see in the article the first time I read it was
"Both these solutions only work for forms that are filled out through the
InfoPath client application and not for those filled out through a
browser." -- well, that's what I'm doing and it works, except for the
landscape issue. I did have to jump through some other hoops which I
mentioned in another thread ("Automate PDF exports") earlier this month. I'm
pretty sure I can repro the landscape non-preservation on export issue in a
InfoPath client only scenario. I'll try that today.

BTW: I also read "Use Word 2007 To Programmatically Convert an InfoPath 2007
Form to PDF"
(http://enterprise-solutions.swits.n...2007-convert-infopath-2007-pdf&c=infopath2007)
-- it's an option I might consider.

Thanks again KRR and SYMWAT.


K.Ramana Reddy(GGK Tech) said:
Hi,

Check out this link,
http://enterprise-solutions.swits.n...port-infopath-2007-form-to-pdf&c=infopath2007

I hope this will help for you.
--
k.Ramana Reddy
http://www.GGKtech.com


Lou Zher said:
Hey all,
I'm trying to understand some differences in behavior that I'm seeing
with
InfoPath 2007's Export to PDF feature.

I have a filled out form that happens to be based on a template hosted in
SharePoint that has the page setup setting of landscape.

I've performed an export on five different machines. In each case I've
cleared the template cache (%userprofile%\Local Settings\Application
Data\Microsoft\InfoPath), opened the same form .xml file from a network
share, waited for the template to be fetched from SharePoint, selected
[File] [Export to] [PDF or XPS] and selected PDF as the type and "Minimum
size (publishing online)" and hit [Publish]. The result was four
different
sized PDFs. Two of those correctly preserved the landscape-ness of the
template's settings which made three pages, the other two did not and
made
two. Opening the PDF and looking at their page sizes reveal the
following:
6.69x9.50 (the two portrait sized PDFs), 10.87x9.11, 10.56x8.88.

I seem to recall that there were a few versions of the SaveAsPdfAndXps
download, but I think all my machines have the same one. They all have
the
same %CommonProgramFile%\Microsoft Shared\OFFICE12\EXP_PDF.DLL file
anyway
(compared with FC /b).

I looked around in [Tools][Options] looking for settings that could
affect
it, but couldn't find any. I tried using ProcMon to see if I could find
some
registry keys or config files that InfoPath was using that could cause
the
variance in output but nothing stood out. I thought that perhaps Export
would be affected by the default printer settings, but it didn't seem to
be.

I don't mind terribly that there is a subtle size variation, but I need
to
figure out how to consistently make it Export with landscape preserved.

In general, the export doesn't really behave as I would expect in any
case.
I would expect it to make PDF pages the size specified in the template
with
the margins, headers and footers specified as well, but this is not the
case.

I might consider exporting to XPS and then converting it to PDF, but my
initial testing shows equal variability in output on XPS.

Printing to the XPS Document Writer seems to produce consistent results,
but
this is more problematic for me to automate.

Any ideas?
-HS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top