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 Ryan Eldridge <RD...@comcast.net> on 2004/07/06 23:35:15 UTC
PDFTextCompression 0.20.5
I have Googled to try and understand if I am able to change the
PDFTextCompresion setting in FOP v 0.20.5? Has anyone had experience
doing this? Does anyone know if it is possible?
Thanks,
- Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: PDFTextCompression 0.20.5
Posted by Jeremias Maerki <de...@greenmail.ch>.
I've just verified and the my configuration snippet (in userconfig.xml) does
have the desired effect of not encoding normal PDF stream objects under
FOP 0.20.5.
<entry role="pdf">
<key>stream-filter-list</key>
<list/>
</entry>
The clue about addDefaultFilters in PDFStream is that if you supply an
empty list it doesn't add a FlateFilter.
protected void addDefaultFilters() {
List filters = Configuration.getListValue("stream-filter-list",
Configuration.PDF);
if (filters == null) {
// try getting it as a String
String filter = Configuration.getStringValue("stream-filter-list",
Configuration.PDF);
if (filter == null) {
// built-in default to flate
addFilter(new FlateFilter());
} else {
addFilter(filter);
}
} else {
for (int i = 0; i < filters.size(); i++) {
String v = (String)filters.get(i);
addFilter(v);
}
}
}
On 08.07.2004 13:02:29 J.Pietschmann wrote:
> Jeremias Maerki wrote:
> > That should work. Doesn't it?
>
> No it shouldn't. There is a flate filter hardcoded in case
> the filter list is empty. The only way to get around this
> is to comment out the code and recompile. I don't know how
> often I got angry about this.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: PDFTextCompression 0.20.5
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ryan Eldridge wrote:
> I am trying to work with a thrid party vendor and they need a
> decompressed (un-compressed) PDF file. Can you tell me where/how to
> make FOP generate a un-compressed PDF. What method/java file must be
> modified?
Look into PDFStream.java, addDefaultFilters(). Kill the line
containing new FlateFilter().
I also considered to write a NOOPFilter just for this purpose.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: PDFTextCompression 0.20.5
Posted by Ryan Eldridge <RD...@comcast.net>.
- J,
I am trying to work with a thrid party vendor and they need a
decompressed (un-compressed) PDF file. Can you tell me where/how to
make FOP generate a un-compressed PDF. What method/java file must be
modified?
Thanks
-Ryan
J.Pietschmann wrote:
> Jeremias Maerki wrote:
>
>> That should work. Doesn't it?
>
>
> No it shouldn't. There is a flate filter hardcoded in case
> the filter list is empty. The only way to get around this
> is to comment out the code and recompile. I don't know how
> often I got angry about this.
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: PDFTextCompression 0.20.5
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Jeremias Maerki wrote:
> That should work. Doesn't it?
No it shouldn't. There is a flate filter hardcoded in case
the filter list is empty. The only way to get around this
is to comment out the code and recompile. I don't know how
often I got angry about this.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: PDFTextCompression 0.20.5
Posted by Ryan Eldridge <RD...@comcast.net>.
No, I didn't see any change in the output of my PDF?? I calling the
userconfig.xml file for the fonts (which works), but that didn't seem to
change my output? I think you are on the right track though...Any other
ideas (anyone else have any ideas)? I really appreciate your help.
Thanks
-Ryan
Jeremias Maerki wrote:
>That should work. Doesn't it?
>
>On 07.07.2004 19:38:04 Ryan Eldridge wrote:
>
>
>>Thanks for your response.. I am not sure what to change in my
>>userconfig.xml file. I do not see a "strokeSVGText" entry? I pasted in
>>my userconfig.xml file, if you see what I have done wrong could you
>>please let me know.
>>
>>Thanks
>>-Ryan
>>
>><!--<!DOCTYPE configuration SYSTEM "config.dtd">-->
>><configuration>
>><!--
>> <entry>
>> <key>baseDir</key>
>> <value></value>
>> </entry>
>>-->
>>
>><!--
>>fontBaseDir: Similar to baseDir, except that this value is used for
>>fonts. If
>> it isn't specified, the value from baseDir is used.
>>-->
>><!--
>> <entry>
>> <key>fontBaseDir</key>
>> <value></value>
>> </entry>
>>-->
>> <entry role="pdf">
>> <key>stream-filter-list</key>
>> <!--list>ascii-85</list-->
>> <list/>
>> </entry>
>>
>><!--
>>************************************************************************
>> Add fonts here
>>************************************************************************
>>-->
>><fonts>
>> <font metrics-file="http://n2app013.hphc.org:8085/CE/conf/Fre3of9.xml"
>>embed-file="file:///c:/WINNT/FONTS/FRE3OF9X.ttf" kerning="yes">
>> <font-triplet name="FreeBarCode" style="normal" weight="normal"/>
>> </font>
>> <font metrics-file="http://n2app013.hphc.org:8085/CE/conf/C39HL4.xml"
>>embed-file="file:///c:/WINNT/FONTS/C39H12L4.ttf" kerning="yes">
>> <font-triplet name="C3of9Font" style="normal" weight="normal"/>
>> </font>
>></fonts>
>></configuration>
>>
>>
>
>
>Jeremias Maerki
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
>
>
Re: PDFTextCompression 0.20.5
Posted by Jeremias Maerki <de...@greenmail.ch>.
That should work. Doesn't it?
On 07.07.2004 19:38:04 Ryan Eldridge wrote:
> Thanks for your response.. I am not sure what to change in my
> userconfig.xml file. I do not see a "strokeSVGText" entry? I pasted in
> my userconfig.xml file, if you see what I have done wrong could you
> please let me know.
>
> Thanks
> -Ryan
>
> <!--<!DOCTYPE configuration SYSTEM "config.dtd">-->
> <configuration>
> <!--
> <entry>
> <key>baseDir</key>
> <value></value>
> </entry>
> -->
>
> <!--
> fontBaseDir: Similar to baseDir, except that this value is used for
> fonts. If
> it isn't specified, the value from baseDir is used.
> -->
> <!--
> <entry>
> <key>fontBaseDir</key>
> <value></value>
> </entry>
> -->
> <entry role="pdf">
> <key>stream-filter-list</key>
> <!--list>ascii-85</list-->
> <list/>
> </entry>
>
> <!--
> ************************************************************************
> Add fonts here
> ************************************************************************
> -->
> <fonts>
> <font metrics-file="http://n2app013.hphc.org:8085/CE/conf/Fre3of9.xml"
> embed-file="file:///c:/WINNT/FONTS/FRE3OF9X.ttf" kerning="yes">
> <font-triplet name="FreeBarCode" style="normal" weight="normal"/>
> </font>
> <font metrics-file="http://n2app013.hphc.org:8085/CE/conf/C39HL4.xml"
> embed-file="file:///c:/WINNT/FONTS/C39H12L4.ttf" kerning="yes">
> <font-triplet name="C3of9Font" style="normal" weight="normal"/>
> </font>
> </fonts>
> </configuration>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: PDFTextCompression 0.20.5
Posted by Ryan Eldridge <RD...@comcast.net>.
Thanks for your response.. I am not sure what to change in my
userconfig.xml file. I do not see a "strokeSVGText" entry? I pasted in
my userconfig.xml file, if you see what I have done wrong could you
please let me know.
Thanks
-Ryan
<!--<!DOCTYPE configuration SYSTEM "config.dtd">-->
<configuration>
<!--
<entry>
<key>baseDir</key>
<value></value>
</entry>
-->
<!--
fontBaseDir: Similar to baseDir, except that this value is used for
fonts. If
it isn't specified, the value from baseDir is used.
-->
<!--
<entry>
<key>fontBaseDir</key>
<value></value>
</entry>
-->
<entry role="pdf">
<key>stream-filter-list</key>
<!--list>ascii-85</list-->
<list/>
</entry>
<!--
************************************************************************
Add fonts here
************************************************************************
-->
<fonts>
<font metrics-file="http://n2app013.hphc.org:8085/CE/conf/Fre3of9.xml"
embed-file="file:///c:/WINNT/FONTS/FRE3OF9X.ttf" kerning="yes">
<font-triplet name="FreeBarCode" style="normal" weight="normal"/>
</font>
<font metrics-file="http://n2app013.hphc.org:8085/CE/conf/C39HL4.xml"
embed-file="file:///c:/WINNT/FONTS/C39H12L4.ttf" kerning="yes">
<font-triplet name="C3of9Font" style="normal" weight="normal"/>
</font>
</fonts>
</configuration>
Jeremias Maerki wrote:
>It is, to a certain extent. Have a look at conf/config.xml. The
>"stream-filter-list" entry controls the compression/encoding filters to
>be applied to certain PDF objects. However, not all PDF objects in FOP's
>PDF library respect this setting, if I remember correctly. But you don't
>have to change config.xml and recompile FOP. It is sufficient to add a block
>like the following after the "strokeSVGText" entry in userconfig.xml
>which you can specify on the command-line.
>
> <entry role="pdf">
> <key>stream-filter-list</key>
> <!--list>ascii-85</list-->
> <list/>
> </entry>
>
>Specifying an empty <list/> element is a good way to create an
>uncompressed PDF for debugging purposes.
>
>On 06.07.2004 23:35:15 Ryan Eldridge wrote:
>
>
>>I have Googled to try and understand if I am able to change the
>>PDFTextCompresion setting in FOP v 0.20.5? Has anyone had experience
>>doing this? Does anyone know if it is possible?
>>
>>
>
>
>Jeremias Maerki
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
>
>
Re: PDFTextCompression 0.20.5
Posted by Jeremias Maerki <de...@greenmail.ch>.
It is, to a certain extent. Have a look at conf/config.xml. The
"stream-filter-list" entry controls the compression/encoding filters to
be applied to certain PDF objects. However, not all PDF objects in FOP's
PDF library respect this setting, if I remember correctly. But you don't
have to change config.xml and recompile FOP. It is sufficient to add a block
like the following after the "strokeSVGText" entry in userconfig.xml
which you can specify on the command-line.
<entry role="pdf">
<key>stream-filter-list</key>
<!--list>ascii-85</list-->
<list/>
</entry>
Specifying an empty <list/> element is a good way to create an
uncompressed PDF for debugging purposes.
On 06.07.2004 23:35:15 Ryan Eldridge wrote:
> I have Googled to try and understand if I am able to change the
> PDFTextCompresion setting in FOP v 0.20.5? Has anyone had experience
> doing this? Does anyone know if it is possible?
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org