You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by ~Clive <cl...@fnb.co.za> on 2008/12/02 07:04:59 UTC

Re: Measurement accuracy in PDF vs PCL

Hi Jeremias,

I have also run into the problem of trying to disable the scale settings in
Acrobat.  What I had to do was edit the registry key entries before I
printed:

reg add "HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\AVGeneral" /v
bprintExpandToFit /t REG_DWORD /d 0x00000000 /f
reg add "HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\AVGeneral" /v
iprintScaling /t REG_DWORD /d 0x00000000 /f

These registry entries are only applicable to version 9.0.  

I hope someone else has a cleaner solution...

Cheers,


David Gerdt wrote:
> 
> Jeremias-
>  
> Thanks for this thorough explanation. Very helpful. And I wasn't really
> thinking "bug". I assumed that there was something in the various specs
> (like the margin issue you mentioned with PCL) that was playing games with
> me. And thanks for the heads up about the settings in Acrobat. You were
> correct. I'm guessing there's no way to disable scaling/auto rotate/center
> within the PDF itself via FOP. That's certainly not a necessity, just
> curious.
>  
> Thanks again for all the work.
>  
> 
> 
>>>> Jeremias Maerki <de...@jeremias-maerki.ch> 5/9/2008 3:27 AM >>>
> I guess that goes into my department again. ;-)
> 
> Problem 1: Most likely you've fallen into the trap that you forgot to
> disable the "Page Scaling" setting in Acrobat Reader's print dialog.
> That has been the case in >95% of the cases similar problems were
> reported here.
> 
> Problem 2: Another problem that I think occurs here is that in PCL I
> cannot print without margins. If I have text that is too close to the
> paper edge, it is indented. I have never found a way to print text all
> the way to the upper/left page edge in PCL 5. That's just a language
> limitation which is explicitely mentioned in the language spec.
> Especially with these labels where the text is very near to the paper
> edges such shifting effects are to be expected.
> 
> Anyway, just to be sure I compared PDF and PCL output locally with your
> labels.fo. The only change I've applied to the file is that I switched
> to A4 because I don't have letter-sized paper. I sent the generated PCL
> to my Brother HL-1250 directly and printed the PDF via Acrobat Reader
> with all page scaling options (even page centering) off. If you don't do
> that you can't be sure that the margins are really those you specified
> in FO.
> 
> My result: The two pages are nearly identical. What I could see is that
> the first table column is shifted to the right because of the problem 2
> I noted above. If I just compare columns 2 and 3, the output has
> differences in the area of <0.3mm which I think can be tolerated.
> 
> Also note in this context that PDF and PCL use different font metric
> sources (PDF: FOP's own font subsystem, PCL: the same as the
> Java2D-based renderers). You can see the effect yourself if you generate
> the intermediate format for both renderers:
> fop -fo labels.fo -at application/pdf labels.pdf.at.xml
> fop -fo labels.fo -at application/x-pcl labels.pcl.at.xml
> So this difference accounts for different line break decisions in more
> complex situations. You can work around that to a certain degree. See:
> http://markmail.org/message/n3myr6scq6afh7uz 
> 
> Just as an illustration how the two output formats differ, I've
> generated bitmap versions of the PDF and PCL with GhostScript and
> GhostPCL and created a comparison image using TortoiseSVN's bitmap
> differ. The result is attached. You'll see that the two output formats
> use slightly different fonts and that the first column is shifted to the
> right as mentioned above. You can also see from background-colors I
> applied to some table-cells that PCL cannot paint its cell background
> all the way to the right paper edge. But the rest is practically
> identical even though the intermediate files are slightly different due
> to font metric differences.
> 
> Conclusion: Not a FOP bug. :-)
> 
> On 08.05.2008 18:17:11 David Gerdt wrote:
>> I'm curious as to the differences between how distances are measured
>> between different output formats. I've been trying to get a sheet of
>> address labels to align correctly and am noticing a vast difference
>> between how they are rendered in a PDF vs how they appear in PCL.
>>  
>> I use a combination of Eclipse and the Orangevolt XSLT plugin to
>> develop my style sheets and generate PDFs on a WinXP box because I can
>> quickly
>> see the results. Ultimately, the documents will be rendered on an AIX
>> system, normally (though not always) as PCL. There are instances where
>> the same document can be rendered in either of these two formats, and
>> that's why these differences make me nervous.
>>  
>> In the case of the mailing labels, I'm noticing about a 1mm difference
>> in height for the table cells. PDF cells are right at 26mm and PCL at
>> 27mm. That sounds like a very slight difference, but it adds up to a
>> 1cm difference over the ten rows of the sheet of labels. Also, the top
>> margin has a difference of about 5mm between the two formats, with the
>> first table row starting at 17mm in the PDF output and about 12mm for
>> the PCL version.
>>  
>> Can anyone give any insight? Is this just a driver thing?
>>  
>> I am running the 0.95beta on both machines. The fo is attached if
>> you're interested.
>>  
>> Thanks for the help!
> 
> 
> 
> 
> Jeremias Maerki
> 
> 

-- 
View this message in context: http://www.nabble.com/Measurement-accuracy-in-PDF-vs-PCL-tp17131325p20786638.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org